• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1164
  • Last Modified:

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
0
judsonmusic
Asked:
judsonmusic
  • 3
  • 3
1 Solution
 
blue-genieCommented:
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.



0
 
judsonmusicAuthor Commented:
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???
0
 
Aneesh ChopraCommented:
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);

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
blue-genieCommented:
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.
0
 
judsonmusicAuthor Commented:
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
0
 
blue-genieCommented:
>> as per my previous post

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.

>> RIght now it just sits there.
sits where. I simulated your setup according to your description and it works fine, its just not working because your code is in the wrong place.
0
 
judsonmusicAuthor Commented:
it works now. thank you so much
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now