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

On/off button

Status
Not open for further replies.

Chrischo

Technical User
Jun 11, 2001
13
US
I want to make an on/off button that pauses the current scene and when hit again starts playing it. I created a movie clip with two buttons, one for pause the other for play. I also set the button properties to stop and play respectively, but this doesn't stop the current scene. Any suggestions on how to do this? Thanks for the help!
 
You're probably using simple play(); and stop(); actions on your buttons, but since it's from witin a movie clip and you're targeting the main timeline, you'll have to add _root to your scripts, something like...

on (press){
_root.play();
} Regards,

new.gif
 
As I posted! What's your present script on those buttons in your movie clip? Regards,

new.gif
 
What I mean is, how do I get the _root.play()? Can't seem to find it anywhere.
 
OH! You've got to type it in. When in the Object or Frame action boxes, in Flash 5, there's a top-right arrow menu where you can select Normal mode or Expert mode. In Expert mode you can type whatever in the actions box. One trick is then to switch back to Normal mode, before closing the window, and Flash won't let you do so if you have syntax errors. Kind of a fast syntax check!
If you're using MX, the icon is more of an arrow inside a frame type of think, it's the last one to the top right. Regards,

new.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top