|
|
|
|
![]() ![]() |
Oct 4 2007, 01:47 AM
Post
#1
|
|
|
Newbie [Level 1] ![]() Group: Members Posts: 16 Joined: 3-October 07 From: India Member No.: 51,046 |
Movie Clip
1.Create a Movie Clip and draw a Rectangle or your design in the Movie Clip. 2.Come Back to Scene 1. 3.Select the Movie Clip and set them instance name = “movie”. 4.Select the first Frame. 5.Press F9 and Copy Code Below and paste it. 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); Demo:http://img57.imageshack.us/img57/1401/movezf8.swf |
|
|
|
Oct 9 2007, 06:00 PM
Post
#2
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 28 Joined: 5-October 07 Member No.: 51,172 |
Oooh, I like that. Quite clever, changing the x and y coordinates. I like it. This would be useful for making a flash based game.
|
|
|
|
Oct 20 2007, 08:48 AM
Post
#3
|
|
|
Newbie [Level 1] ![]() Group: Members Posts: 16 Joined: 3-October 07 From: India Member No.: 51,046 |
Thanks for your Comments.
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 22nd November 2008 - 07:53 PM |