4 Replies Latest reply: Aug 29, 2013 4:56 AM by vari25 RSS

    sequence of images, adding loop to keyboard event?

    vari25 Community Member

      Hi All,

       

      I have a 3d images sequence  which i want to rotate with mouse click and drag.

       

      I am so far successful with that.

       

      ALso added keyboard event.

       

      stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);

      function keyPressed(event:KeyboardEvent):void
      {
      if (event.keyCode == 39)
      {
        images_mc.gotoAndStop(images_mc.currentFrame + 1);
      }
      else if (event.keyCode==37)
      {
        images_mc.gotoAndStop(images_mc.currentFrame - 1);
      }
      }

       

      I wanted to loop this event, i.e., have to play continously till the key is down.

       

      Please help.

       

      Thanks in advance.