Basically thats not how to create a component for flex.
The value for title has not been set at the time the constructor runs.

You should look at Flex's component invalidation cycle.

createChildren();
commitProperties();

Its all in the docs.

--- In flexcoders@yahoogroups.com, "flexawesome" <[EMAIL PROTECTED]> wrote:
>
> 
> Hey there,
> 
> I was trying to create a very simple component in as, there was no error
> in compiling. However, I was unable to see the text. :( can you take a
> quick look? thank you
> 
> =================== AS ====================
> 
> package
> {
>   import mx.controls.Text;
>   import mx.core.UIComponent;
> 
>   public class Footer extends UIComponent
>   {
>    public var title:String;
>    private var _txt:Text;
> 
>    public function Footer()
>    {
>     super.setActualSize(50 , 20 );
> 
>     _txt= new Text();
>     _txt.text = title;
>     addChild( _txt );
>    }
>   }
> }
> 
> ============ in main.mxml ===========
> 
> <local:newText title="asdfasdfa" />
>


Reply via email to