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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link Button to Scene

Status
Not open for further replies.

Packet7

IS-IT--Management
Jun 20, 2003
751
US
Hello,

I'm new to flash, but doing OK thus far. I have two scenes (Scene 2 is a duplicate of the first), Scene 1 and Scene 2, and I would like to use a button in Scene 1 to open Scene 2.

I have labled the first frame of Scene 2 with "Scene2", and added the code below to the Action, but when I press it, it plays Scene 1 again?

on (release) {
_root.gotoAndPlay("Scene2");
}

Anyone have any ideas how to resolve this? The only difference between Scene 1 and 2, is that Scene 2 has a differnet Image in it and the labled Frame. Any ideas?

Thank you!

Rgds,

John
 
Your code should be working.

Are these 1 frame scenes?
 
Hey,

Scene 2 is 89 frames in total. I though it should be working too. But, Scene 1 plays again. I opened Scene 2, and went to test Scene. Plays fine, and I checked that the First frame of Scene 2 is labled correctly. Any ideas?

Rgds,

John
 
A wild guess... Possible conflict with the actual "Scene2" label if the scene name is "Scene 2", or caps in one and not in the other?
Have you tried with an unrelated other label?
 
Hello,

Good idea. I changed the label to "BW05002" on the first frame of Scene 2 and changed the action script on the button in Scene 1. Saved and launched the movie, but Scene 1 still plays, instead of Scene 2. I'm really scratching my head on this one.

When I created Scene 2, I just made a duplicate of Scene 1 and modified the pic. COuld that be the issue? Any ideas?

Thanks for all your help.

Rgds,

John
 
Can you post a link to this .fla or a mockup .fla replicating the problem, zipped up and in MX only format, not MX2004?
 
Hello,

I saved the .fla in MX format and zipped it. Try the link below. The .fla contains two scenes, the first scene (Scene 1) has two buttons (each girl). The issue is with the second (BW-05002 pic). This part of the site is still being tested, so please let me know what you come up with. Thanks again for all your help!



Rgds,

John
 
Your preloader at the beginning of Scene 2 is useless and is causing the problem, because it sends the playhead to frame 2 of the first scene.

If you would change your preloading script on this second preloader, as...
...
if (loaded == total) {
_root.gotoAndPlay(84);
}...
84 being the 2nd frame of your Scene 2, it would work, but as I said above, that second preloader is but useless, since everything in your file has already been preloaded with the first preloader. A preloader once initiated cannot preload only one scene. It will preload the whole movie whether you like it or not.

Best would simply be to remove that whole preloader bit (including the fade out), and remove that stop(); action you have on the first frame of your Scene 2... Then the button's script works fine.

 
Hey,

I removed the Stop bit and Layer 5 (preloader) and the Preloader in Layer 6. Works great!

Thanks for all your help.

Rgds,

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top