Groups | Blog | Home
all groups > flash actionscript > july 2006 >

flash actionscript : MovieClip.gotoAndPlay problem



Afarchy
7/3/2006 10:43:57 PM
Hi, I'm using Flash 8 Professional and am trying to make a movie clip play and
stop from the main timeline using gotoAndPlay. I got this to work on another
movie clip, but it just doesn't work with this one. On a given keyframe I put:

valve_w.gotoAndPlay(2);

to make it play to a certain point until it reaches the script in itself that
says stop(); Then, later I add

valve_w.gotoAndPlay(10);

To make it skip the stop until it reaches the end of its timeline and hits
stop();

However, nothing happens! It completely ignores my script. Anyone know why?
kglad
7/3/2006 11:41:15 PM
either that code doesn't execute of the path/instance name to your movieclip is not valve_w.

to resolve which problem it is, use:

trace(valve_w);

Afarchy
7/5/2006 1:35:52 PM
kglad
7/5/2006 2:14:17 PM
attached to the timeline of valve_w's first frame place trace(this). and below
your trace(valve_w) statement place trace("g "+this) and we'll be able to
resolve your issue(s).

but if you're sure you have the path/name correct then your goto statement is
executing before valve_w exists. in particular, if you're loading an external
swf into valve_w, you can't control the external swf's timeline until loading
is complete.
AddThis Social Bookmark Button