I'm pretty sure that gotoandplay just advances the playhead and doesn't
execute the script on that frame until your script finishes so the
widgets it creates won't be ready right after the call.

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Matthias Dittgen
Sent: Wednesday, November 21, 2007 8:13 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] getDefinitionByName and gotoAndPlay

 

Hello,

I am loading a SWF into my application, which I created in FlashCS3.
I have exported MovieClips with timeline animation and textfield, etc.
for AS in my library.

After loading of the SWF is complete I get the Class like this:
var MyClass:Class = getDefinitionByName("MyClass") as Class;

Then I create a MovieClip instance an add it to stage, like this:
var mc:MovieClip = new MyClass() as MovieClip;
addChild(mc);

this works great, but when I want to gotoAndPlay() to another frame an
change the content of a Textfield there, then the Textfield is null
and it takes some time (Timer or Enterframe script) to wait for the
Textfield being not null.

Can someone imagine why?
Matthias

 

Reply via email to