tags:

views:

38

answers:

2

hi,

I would like to know if it is the same to assign properties to my custom component in its own class, or from the parent document. Please see snippet below:

Here I assign the property bottom in my custom component class:

<?xml version="1.0"?>
<mx:LinkButton bottom="20" >        

    <mx:Script>
...

Here I assign the property bottom when I use the component in my main MXML file

<myComp:Brick bottom="10"/>

Am I overriding the original one ?

Thanks

+2  A: 

Yes. The one which you gave in the main MXML will get applied.

Manoj M
+1  A: 

You don't override in the sense of oop, but you reassign the value of the property to a new value, yes.

codymanix