PDA

View Full Version : what happened to _root.stop


Neobii
10-27-2007, 03:16 AM
Alright I'm in actionscript 3.

I can't seem to find code for this, I have a movie clip on the main time line and in the last frame of the movie clip I have a root.gotoAndPlay(1); (I want the main timeline to go back to frame one. I've tried parent. or stage... but I just can't seem to get it.

matbury
10-27-2007, 04:23 AM
It's not best practice to put code into MovieClips. You're better off using a listener for when your MovieClip reaches the last frame on the main timeline.

Just about everything from AS 2.0 has been depricated! I'm having to put in a lot of study-time to catch up with the new syntax, methods and OOP.

Check out the flash.events.* package - I'm still not too sure about how you'd do this.

Sekhar
10-27-2007, 06:06 AM
Use MovieClip(root).gotoAndPlay(1). In AS3, root can represent different things and is not always a MovieClip, so you'll need to typecast as appropriate.