i want to make a stop/play button where the button changes from stop to play when the user clicks on it and then if they want the music to play again the use clicks on the now play button it turns into the stop button, how do i do that?
movie clips..on one have the start button that calls the sound..once clicked it sets itself to visible=false and then sets the stop mc to visible=true..when you click the stop button it mutes the sound and switches back over to the start..make sure you use the same graphic for the two buttons in the same spot on each clip..
or you could do it all in one clip just by using frames..seperating the two with frames and targeting it that way..
Make a MC with 2 frames...each one with a stop action.
Put your button in each frame. the first one (on position) has an action which stops the music and moves playhead to frame 2.
the second button in frame 2 has an action to move the playhead back to frame 1 which starts the music again.
this is just a quick synopsis...I am assuming you know how to write basic script... if you need more detailed help... post back and I or someone else will try to help. Ya' Gotta Love It!
Basicly, this would be done on 2 frames with two identical buttons (except for text or color...), exactly positioned in the same spot. On press of one of the buttons, you simply move the clip from one frame to the other while you start or stop sound.
Within a 2 frame movie clip...
Frame 1: (play button displayed)
stop();
stopAllSounds ();
on(press){
nextFrame();
}
Frame 2: (stop button displayed)
// insert sound on this frame
stop();
on(press){
prevFrame();
}
In the above, you would have to press the play button to start the sound. If you inverse the frame and logic, the sound would be playing, and you would have to press the stop button to mute it.
If you want to have a selection of tracks... Well, that's another story!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.