Changing the animation on a movie clip? (AS 2.0)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Luke Hackel
    New Member
    • Oct 2010
    • 2

    Changing the animation on a movie clip? (AS 2.0)

    Basically, I'm trying to animate movement on a movieclip made up of segments that loop (so, Frame's 1->8 are an idle animation, while Frame's 9-16 are a running animation.)

    So far, while the movement works no problem, the animation change doesn't...

    Code:
    		if (Key.isDown(Key.LEFT))
    		{
    			this._x -= 5;
    				if (this.currentFrame <= 9)
    				{
    					if (this.currentFrame <= 8)
    					{
    						
    					gotoAndPlay(9);
    					}
    					else
    					{
    						//nothing
    					}
    				}
    		}
    While moving to the looped animation (it loops via actions on frames in the MC) works fine, if the key is held down then it'll stick on the gotoAndPlay frame, regardless of what frame it's on!

    It's been driving me nuts, if you could help me out I'd be grateful. (I'm a complete beginner to AS, I'm a C# guy.) Cheers!
Working...