Flash Question
Flash Question
Out of context: Reply #4
- Started
- Last post
- 4 Responses
- 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;
}
};