-
[n00b][Question] About this engine I found...
onClipEvent(load) {
speed = 5;
}
onClipEvent(enterFrame) {
if (key.isDown(key.RIGHT)) {
_x += speed;
} else if (key.isDown(key.LEFT)){
_x -= speed;
} else if (key.isDown(key.UP)){
_y -= speed;
} else if (key.isDown(key.DOWN)){
_y += speed;
}
}
This is what I am using to make the character move, I am just testing this thing. I don't get one thing, what if I wanted to make the right arrow key make it go up? I do not see any reference to the direction except for the key and the negative and positive.
I know how to change left into right, and vice versa, and the same with up and down. Just wondering what makes it change so I can make the right key move the Symbol upwards.
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|