5 Replies Latest reply on Sep 16, 2010 7:14 PM by Ned Murphy

    Some way to make a animation playthrough when i press a key?

    HellEmbracer Level 1

      hey you wouldnt know how to make a gif play throught once when you press lets say space. i know the coding for to make button link to the animation but u have to hold it to for it to play throught once  i want to make my char do a attack thing and i dont want to use toggle i want to press it like for halfd a sec and see about 2 secs of my char do his attack i have the gif, and i have it stoping at the end of the gif but is there a way to make it so i just have to press not hold?! heres my code


         var rollSpeed = Number=14;
           var facingRight = true;
           ichigo_mc.onEnterFrame = function() {
            if (Key.isDown(Key.RIGHT)) {
             this._x += rollSpeed;
             facingRight = true;
            } else if (Key.isDown(Key.LEFT)) {
             this._x -= rollSpeed;
             facingRight = false;
         } else if (Key.isDown(Key.SPACE)) {

            } else {
             if (facingRight) {
             } else {