1 Reply Latest reply on Aug 17, 2006 4:24 AM by eric76

    Electricution game

    Sterockicy
      i am attemting at the moment to create an Electricution minigame. i am trying to make a bar that gets smaller continuesly. this is motion tweened. once the bar is empty you lose. i have added a on space previous frame so that to win you have press space as many times as possible and not alloy the bar to empty. the problem is that with the actions i gave it when you click the space bar it goes to the previous frame of the motion tween but the bar stops moving. i want the bar to continue getting smaller but still alloy it to go back up on a continues space push.

      do i make sence

      Thanks

      Sterockicy
        • 1. Re: Electricution game
          eric76 Level 1

          You don't give much information to go on. I'm assuming you want the movie to proceed one frame at a time, except for when space bar is pressed, in case it should move one frame backwards? In that case, define:

          lis = new Object();
          lis.onKeyDown = function() {
          if (Key.getCode() == Key.SPACE) {
          gotoAndPlay(_currentframe - 1);
          }
          }
          Key.addListener(lis);