RSS twitter

How to Add Play, Stop, Fast Forward and Rewind buttons to external video

Control how external movies play with stop and play buttons

  1. Launch Flash Designer and set frame size at 300 x 300 (Frame > Frame Size)
  2. Change frame to stop (Frame > Frame Delay and check Stop)
  3. Choose “Insert” > “Flash”
  4. Type the path to your video file or use the test file “http://www.flashdesignerzone.com/testvideo.swf”
  5. Choose Item > Placement Properties, change Item Name to “mymovie” and check ActionScript Target, click OK
  6. Choose Insert > Navigation and choose Play, repeat the same and insert Stop button.
  7. Select Play button and choose Action > OnClick
  8. Check ActionScript and type the code:mymovie.play();
  9. Select Stop button and choose Action > OnClick
  10. Check ActionScript and type the code:mymovie.stop();
  11. Hit F9 for preview

Download surce code here

Adding Fast Forward and Rewind buttons

  1. Choose Insert > Navigation and choose Fast Forward, repeat the same and insert Rewind button.
  2. Select Forward button and choose Action > OnClick
  3. Check ActionScript and type the code:movieforward=1;
  4. Select the Forward button and choose Action > OnUp
  5. Check ActionScript and type the code:movieforward=0;
  6. Select the Rewind button and choose Action > OnClick
  7. Check ActionScript and type the code:movieforward=-1;
  8. Select the Forward button and choose Action > OnUp
  9. Check ActionScript and type the code:movieforward=0;
  10. Choose Frame > ActionScript and type the code to handle rewind or fast forward flags:
    function moviecontrol() {
    if(movieforward==-1) mymovie.gotoAndPlay(mymovie._currentframe-5);
    if(movieforward==1) mymovie.gotoAndPlay(mymovie._currentframe+5);
    }
    
    movieforward=0;
    setInterval(moviecontrol,10);
    
  11. Hit F9 for preview

Download surce code here

Similar Posts:

Leave a Reply