8 Replies Latest reply on Jul 15, 2010 6:46 AM by toastiesmonster

    Question about keyboard control in Flash presentation


      I created a presentation in Flash. And I embedded the following keyboard control scripts so that I can pause the slide by pressing "Spacebar" and play it again by pressing "Enter".


      keyListener = new Object();
      var isStopped : Boolean = false;

      keyListener.onKeyUp = function() {
          var keyCode = Key.getCode();
          if (keyCode == 13) {
      if (keyCode == 32) {


      I also embedded getTimer script to delay the speed of the flow so that key-point can be loaded one by one.


      t = getTimer();
      onEnterFrame = function(){
          if(getTimer()>= t+3000){
              onEnterFrame = undefined;


      Other than the above keyboard control, I also add four buttons at the right bottom so that I can play and pause, fast forward and rewind by clicking those four buttons.

      1. the 1st and 2nd slide cannot be paused by the above keyboard control command.

      2. the play and pause buttons at the right bottom is not functional in the 1st and 2nd slide


      (i attached the fla for easier understanding of the above descriptions. appreciated if you can help me to figure out what goes wrong.