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!

play/pause button

Status
Not open for further replies.

luckyy

Technical User
Sep 29, 2001
40
AU
Could someone help me in creating a play/pause button, which starts in the play state, and goes to the pause state when the movie (or whatever it's controlling) is playing then back to the play state when paused .. like the button on the Quicktime player..

thanks
 
for a movie playing in a clip with instance name myclip
and button with instance name pause_btn

put this code on main timeline

stopped= false;
pause_btn.onRelease = function(){
if (stopped){
myclip.play();
stopped = false;
}else{
myclip.stop();
stopped = true;
}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top