Flash Question
Flash Question
- Started
- Last post
- 4 Responses
- univers
Can anyone link me to a tutorial on how to use the arrow keys to make a movie clip move?
Thanks!
- skt0
- mightyj0
found this one using google: http://www.flashfridge.com/tutor…
- univers0
Thanks guys will give both directions a try. keep em coming if anyone else finds some links. Thanks!
- univers0
I guess my main go is to hit a key lets say right, and it will move the object 1280 pixels right.
The code you provided mightyj is great.
Anyone have input on how to make this work?
var speed:Number = 4;
fullscreenview_mc.onEnterFrame = function() {
if (Key.isDown(Key.RIGHT)) {
this._x = this._x+speed;
} else if (Key.isDown(Key.LEFT)) {
this._x = this._x-speed;
}
if (Key.isDown(Key.UP)) {
this._y = this._y-speed;
} else if (Key.isDown(Key.DOWN)) {
this._y = this._y+speed;
}
};