Hi folks,
I'm new to Flash and Actionscript and I'm trying to move a movie clip with the directional arrows, using AS 3.0.
The old code I had:
The code is broken for AS 3.0 and I don't how to fix it.Code:var speed = 7; this.onEnterFrame = function() { if (Key.isDown(Key.UP)) { square._y -= speed; } if (Key.isDown(Key.DOWN)) { square._y += speed; } if (Key.isDown(Key.LEFT)) { square._x -= speed; } if (Key.isDown(Key.RIGHT)) { square._x += speed; } };![]()
Thanks in advance.




Reply With Quote