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

How to go to another scene on mouse click?.. 1

Status
Not open for further replies.

EugenePaliev

Programmer
Jul 18, 2001
537
UA
Hi people,

I know it's very easy and stupid queation, but I'm a newbie to Flash so... I have a button, I want when I click on it scene2 to be loaded. I've looked thru Flash's help and didn't find how to do it... Would you please explain how to do it step by step.

Your help will be GREATLY appreciated!!! [roll2] Good Luck! :)
 
Click on your button to select it (a blue outline rectangular box should appear around the button when it has been successfully selected). Now right click on the button, and click "Actions" from the menu that appears. This will open the ACTIONS panel (if nothing happens, open the menu again and click "Actions" again - if the panel is already open, clicking "Actions" will close it). Now that you have selected the button, and opened the ACTIONS panel, you're ready to put the actions in.

In the ACTIONS panel, click the + button. A menu will drop down - out of this menu, go to BASIC ACTIONS, then click on GO TO. Now you should see the parameters for the GO TO action at the bottom of the ACTIONS PANEL. The script on the button at this point is:
Code:
on (release){
    gotoAndPlay(1);
}
You don't want to go to frame 1 though, so change the parameters using the drop-down boxes at the bottom of the panel:

Scene = Scene 2
Type = Frame Number
Frame = 1

Bear in mind that you have to HAVE a Scene 2 in your movie to be able to pick it out of the drop down list.

And that's it. Your actions should now read:
Code:
on (release){
    gotoAndPlay("Scene 2", 1);
}
 
Great! Great! and one more time GREAT!!!

star.gif
++

I see how easy it is but I was digging in the wrong direction... Thank you for your time! Good Luck! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top