im having problem with my script. ball.onEnterFrame = function(){ var speed:Number = 5; if(Key.isdown(Key.RIGHT)){ ball.gotoAndPlay(“animate”); ball._x+=speed; } } ball.onKeyUp = function(){ ball.gotoAndStop(“idle”); when i release the right dir key, still, it is animating.
ball.onEnterFrame = function ()
{
var speed:Number = 5;
if ( Key.isdown ( Key.RIGHT ) ) {
ball.gotoAndPlay ( "animate" );
ball._x += speed;
}
};
ball.onKeyUp = function()
{
ball.gotoAndStop ( "idle" );
};
Works fine here…