Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scene transition infinite loop 1

Status
Not open for further replies.

Tanag

Programmer
Oct 5, 2005
18
CA
Basically I have a flash file with 3 scenes, Each scene currently has no animation or action scripts. I want the main scene to have 2 buttons that link to the other 2 scenes.

I have all 3 scenes created and the buttons made, however when I run the Test Movie it just loops between all 3 scenes in order infiniately. I tried adding a stop into the action script of the original scene. It stops the scene but then the links do not work.
As for links they are just plain text, I made them into movie clips so I could make them buttons The action script for them is as follows:

on(press){
gotoAndStop("Scene 2 - Provinces", 1);
}

Does anyone know a way to stop it from looping other than stop? Any help would be appreciated. Thanks
 
Don't ever target a scene name in your Flash life again!

ONLY target labeled frames, and add the targeted timeline to your path on your buttons' scripts...

Thus label the first frame (or for that matter any possibly targetable frame...) of each scene with a unique label such as my_scene1, my_scene2, etc... (no number only labels or at least not starting off with a number, no spaces, no caps and no special character other than the underscore...), add the targeted timeline to your path - in your case, _root or _level0 - and only target that labeled frame on your button' script...

on(release){
_level0.gotoAndPlay("my_scene1");
}

Regards. Affiliate Program - Web Hosting - Web Design
After 25,000 posts, banned on FK, but proud not to have bowed down to them!
 
The reason I was targetting the scene name was that's what I gathered it meant from the tooltip that pops up when you starts to type gotAndPlay(...

Thanks though, that worked like a charm.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top