0 Replies Latest reply on Nov 15, 2007 8:26 AM by aya::karpinska

    scrub video with arrow keys

    aya::karpinska Level 1
      hello all,

      i'm seeing several posts on controlling video playback with no replies... hope the following question isn't strange or impossible: i want to have a video play forward (normally) while the right arrow key is pressed. i want the video to play backwards (like rewind, but not just rewind to zero) while the left arrow key is pressed.

      so far my video simply plays and keeps going if i hit right arrow only once, and rewinds all the way to the beginning if i press left arrow only once. how can i improve my controls? thanks for any help you can offer.

      best,
      aya.

      -------- the following code is on main timeline --------
      stop();

      //create the listener object
      var keyListener:Object = new Object();

      //create a function for handling the onKeyDown (or onKeyUp) event.
      keyListener.onKeyDown = function() {
      //check to see if an arrow key was pressed
      //right = 39, left = 37
      if (Key.getCode() == 39){
      movieWaves.play();
      }
      //want to try reverse playback here, but not there yet!
      //if (Key.getCode() == 37){
      // movieWaves.play(0);
      //}


      }

      Key.addListener(keyListener);