Link to home
Start Free TrialLog in
Avatar of judsonmusic
judsonmusicFlag for United States of America

asked on

gotoandplay not working

I have a flv file inbedded in a movieclip instance on frame 2 of my main scene(scene 1)

when the flv finishes playing, on the very end ihave this

gotoAndPlay('Scene 1', 3);

it is not working.

how do I tell it to go back to the main level and play frame 3??

I even tried _root.gotoandplay(3);

this errored out saying that I had to have a button or on event handler.

I am using actionscript 2.0
Avatar of blue-genie
blue-genie
Flag of South Africa image

ok if you've just started on your project, i'l recommend not to use scenes. they always make headaches in some way or the other.
anyway if you're in scene 1 there's no need to reference scene 1

so i've just simulated your setup and _root.gotoAndPlay(3); works perfectly.
if the error says button/event handler you've simply put the code in the wrong place, it must be in the frame action and not the MovieClip action.



Avatar of judsonmusic

ASKER

It is not in scene one, it is insie a movie clip in scene 1.
How do I tell is to jump back up to the main movie and play frame 3???

BTW, how do I not use scenes???? Whats the difference???
Avatar of Aneesh Chopra
as blue-genie suggested, following code should work fine for you

_root.gotoAndPlay(3);


AS2 is case sensitive and I can see  in your comment that you following code is not correct:
_root.gotoandplay(3);

A of and, P of play should be in uppercase.

Please try changing it as following and it should be working fine.

_root.gotoAndPlay(3);

it doesn't matter if you're inside a movieclip thats inside a movieclip that's inside a movieclip thats in scene 1, you're still in scene 1.
if you only have the one scene (default stage in AS2) - then don't worry about it, if you are creating additional scenes, stop and create new files and load them in as swfs.
but one problem at a time.
if you check out my site www.judsonmusic.com

it is basically 1 scene with instances inside of it.

I tried that _root.gotoAndPlay(3)

It just replays the intro video again from frame 3 inside that movie clip.

Its not jumping back up to the root. What do I do?????

PLus it is giving an error that I can not use this without an on handler event??

Again the intro video sits on frme 2 of the main scene. I stop on frame 2, the movie clip plays and then inside the movie clip at the end I want ti to go back to top level and play 3. RIght now it just sits there.

I have the button working just fine (enter site) but when I try to use that code by itself, it doesnt work it says I need an on event handler?

pLease help
ASKER CERTIFIED SOLUTION
Avatar of blue-genie
blue-genie
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
it works now. thank you so much