The component needs time to initialize. If you're coding on the main timeline, you can replace the line that assigns the text with this:

   this.con_mc.data_mc["kid_mc" + i].onEnterFrame = function() {
       if (this.ifBD1.text != undefined) {
           this.ifBD1.text = "Test";
           this.onEnterFrame = null;
       }
   }

If you're coding with classes, you can use something like

   <reference to kid_mc>.onLoad = Delegate.create(this, setText);

instead and do the text assignment inside the setText method.

Helen


payal wrote:

I am using the following code



for (var i = 0; i < 20; i++)
{
        this.con_mc.data_mc.attachMovie ("kid_mc", "kid_mc"+i, i);
        
        this.con_mc.data_mc["kid_mc" + i]._x = 0;
        if (i == 0)
        {
                this.con_mc.data_mc["kid_mc" + i]._y = 0;
        }
        else
        {
                var prev = i-1;
                this.con_mc.data_mc["kid_mc" + i]._y =
this.con_mc.data_mc["kid_mc" + prev]._y + this.con_mc.data_mc["kid_mc" +
prev]._height + 4
                
        }
        
        
        this.con_mc.data_mc["kid_mc" + i].ifBD1.text = "Test"
        trace(this.con_mc.data_mc["kid_mc" + i].ifBD1.text)
        //trace(this.con_mc.data_mc["kid_mc" + i].ifBD1.text)
        //trace(this.con_mc.data_mc["kid_mc" + i])
}

Regards
Payal


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Andrews
Sent: Tuesday, July 17, 2007 04:47 PM
To: [email protected]
Subject: Re: [Flashcoders] Text Input Component

----- Original Message ----- From: "payal" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, July 17, 2007 12:00 PM
Subject: [Flashcoders] Text Input Component


Hi All

I am trying to attach a movieclip containg  textInput component to the
stage. Its attaching successfully But I am not able to set its Text.

If you don't show what you are doing to set the text, we can't tell what's wrong..

Are you trying to assign to the textinput object itself rather than the text property?

Regards
Payal

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to