views:

26

answers:

1

So far, I have the following Actionscript 2.0 code - I'm trying to make the animation change on a key press then loop to simulate running. But it sticks on the gotoAndPlay(9) trigger, regardless of what frame the animation is on.

onClipEvent(keyDown)
{
        if (Key.isDown(Key.RIGHT))
        {
            this._x += 5;

                if (this.currentFrame <= 9)
                {
                    if (this.currentFrame <= 8)
                    {

                    gotoAndPlay(9);
                    }
                    else
                    {
                        //nothing
                    }
                }
        }
A: 

If it's AS2 it should be:

_currentframe

instead of

currentFrame

But it could be something else, perhaps a stop() on frame 9?

Birk
I made a silly mistake with that :P. Cheers for pointing it out.
Someone

related questions