How to add Stop, Previos, Play, Pause, buttons on this script. <html> <head> <script type="text/javascript"> <!-- var image1=new Image() image1.src="firstcar.gif" var image2=new Image() image2.src="secondcar" var image3=new Image() image3.src="thirdcar.gif" //--> </script> </head> <body> <img src="firstcar.gif" name="slide" width="100" height="56" /> <script> <!-- //variable that will increment through the images var step=1 function slideit(){ //if browser does not support the image object, exit. if (!document.images) return document.images.slide.src=eval("image"+step+".src") if (step<3) step++ else step=1 //call function "slideit()" every 2.5 seconds setTimeout("slideit()",2500) } slideit() //--> </script> </body> </html> PHP:
hi mate,, The actual pause function was obsoleted some versions ago, these days one pauses the timeline by looping on the current frame. There's really little difference between stop and pause. here are some scripts that would control the main timeline, the global could be checked by a external linked movie member the closest thing to the more functional film clips in flash. --You pause button script could be: on mouseUp global myPauseState myPauseState = true -- to toggle the pause state: -- myPauseState = not myPauseState end --The score script spread over all frames of thge controled segment would be: on exitFrame global myPauseState if myPauseState then go to the frame -- else play to next frame a movie frame rate end -- a rewind could just go to the first marker to the left. on mouseUp go to loop end
My suggestion is to go to a website like www.dynamicdrive.com and find a script with similar functionality and see how the code works.