1 Reply Latest reply on Aug 18, 2008 7:01 PM by kglad

    MovieClip Buttun Mayhem (k)

    Level 7
      I am truly baffled. This makes absolutely no sense to me why this isn't
      working. I have a movie clip floating above my movie with the following
      code:

      onClipEvent (keyDown) {
      _global.KeyCode = Key.getCode();
      trace(_global.KeyCode);
      //KeyCode for SPACE = 32
      //KeyCode for Right Arrow = 39
      //KeyCode for Left Arrow =37
      }
      onClipEvent (keyUp) {
      if (_global.KeyCode == 39) {
      _global.backframe = (_root._currentframe-1);
      trace("_global.backframe "+_global.backframe);
      nextFrame();
      stop();
      }
      if (_global.KeyCode == 32) {
      _global.backframe = (_root._currentframe-1);
      trace("_global.backframe "+_global.backframe);
      nextFrame();
      stop();
      }
      if (_global.KeyCode == 37) {
      trace("gotoAndPlay(_global.backframe) "+_global.backframe);
      _root.gotoAndStop(_global.backframe);
      stop();
      }
      }


      It's a simple navigation. Press the right arrow, go to the next frame
      and put the currentframe's number minuse 1 into the variable
      _global.backframe.

      When I hit the left arrow I know it goes to the frame I want it to, but
      it gets there and immediately continues playing even though there is a
      stop action in there.

      The frame it goes to contains a stop action on the main timeline and a
      movieclip that has no actions assigned to it.

      It's as if the Movie is possessed.

      -Kirk