15 Replies Latest reply on Sep 29, 2010 6:07 AM by HellEmbracer

    Flash as2 game animation, problem.

    HellEmbracer

      hello i am making a flash animation game but i have a problem, i have my guy running and everything its all gifs, so when he stops its a gif its not one picture its 4 of em (gif) which i made them all compressed into a gif and added to my library then added that to my flash made it work blah blah blah-

      well my problem is when my guy runs left he turn right after i let go of the key i no whats it is doing it using my 1 animation i have in their for standing  i to add my other animation which he standing left basically he runs left after i press left then i let go he turns right, i need to know how to make it so either when i let go of the (LEFT) key it uses my animation ('still2') which is him facing left which i need i have him running right and he stays right after so thats good, or if u know if theres a way i can make the code say like after i let go of like left it uses gotoAndStop('still2') then for running right it uses gotoAndStop('still') so he dosent turn around after i let go of left! well i hope u can find out, and its all animated, so dont just make it so it dosent stop using the animation of left or right, cause then hes running in place for enternity thanks heres my code.

       

            var rollSpeed = Number=14;

           ichigo_mc.onEnterFrame = function() {
            if (Key.isDown(Key.RIGHT)) {
             this._x += rollSpeed;
             this.gotoAndStop("right");
            } else if (Key.isDown(Key.LEFT)) {
             this._x -= rollSpeed;
             this.gotoAndStop("left");
            } else {
             this.gotoAndStop("still");
            }
           };