PDA

View Full Version : _root.gotoAndPlay doesnt work in as3


makoinater
10-27-2008, 08:01 PM
Asked this in the newbie forum but didnt get the reponse I wanted.....

prob simple but cant find answer - I have a function inside a movie clip where I want it to change to a frame on the main timeline.

_root.gotoAndPlay("framename"); doesnt work either does

gotoAndPlay("framename");

tried

stage.gotoAndPlay("framename");

also to no joy

Someone mention that I should put the function on the main timeline and it would work, which would be fine but I really want to be able to change it from within the Movieclip.

sound out-

snickelfritz
10-27-2008, 08:37 PM
This should work from within nested timeline:
MovieClip(parent).gotoAndPlay("framename");

This would send the playhead of the parent object timeline to frame label "framename".

makoinater
10-27-2008, 09:03 PM
worked a treat snickelpuss cheers captain