[Flash]Move a MovieClip using arrow keys.
- Create a Movie Clip and Create a Rectangle or your design in the Movie Clip.
- Come Back to Scene 1.
- Select the Movie Clip and set them instance name = “movie”.
- Select the first Frame.
- Press F9 and Copy Code Below and paste it.
Good Luck.Code:setInterval(function () { if (Key.isDown(Key.RIGHT)) { setDirection(0); _root.movie._x += 3; } if (Key.isDown(Key.LEFT)) { setDirection(1); _root.movie._x -= 3; } if (Key.isDown(Key.DOWN)) { _root.movie._y += 3; } if (Key.isDown(Key.UP)) { _root.movie._y -= 3; } updateAfterEvent(); }, 10);
Example:http://svprm.x10hosting.com/for_forums/move.swf


LinkBack URL
About LinkBacks


Reply With Quote
