PDA

View Full Version : Key.isDown vs. MovieClip(KeyDown)



Hexagram
April 4th, 2005, 10:55 PM
I have had trouble with both systems of these. For some reason the Key.isDown doesn't like to play animation like.
if(Key.isDown(38)){
this.gotoAndPlay(2);
this._x-=speed;
}
MovieClip(KeyDown) doesn't like to move things at the same right of animation thought. For some reason (if the above code was placed in the movieclip function) the animation plays but the movement doesn't occur until seconds later.

So I'm just asking which is the best one to use in terms of movment.

nathan99
April 4th, 2005, 11:14 PM
i think that it is Key.isDown, post i fla of wat u want, if u can:D

Blackspirit
April 4th, 2005, 11:25 PM
If i'm not mistaken, if you consistantly test key.isDown, it will continue doing whatever is in the braces.
If I constantly hold down the key, it will constantly gotoAndPlay(2), so you'll never actualy leave frame 2. So it'll look like the animation isn't working.