PDA

View Full Version : Quick code question



Axauv
May 23rd, 2008, 11:20 AM
quick paste of the problem code:

onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
gotoAndPlay("walk");
this._xscale = 100;
}
}

ok so right here, when i hold down the right arrow key my character should start playing the "walk" animation, which is several frames. the problem is she freezes on the first frame and only PLAYS the walk animation after i let go of the key lol. How do i get it to actually play while holding down the button?

eilsoe
May 23rd, 2008, 11:46 AM
because you tell it to go and play the "walk" frame, which is 1 frame, on each enterframe... you're telling the clip to restart the animation per frame.