1 Attachment(s)
[RESOLVED] Easing with buttons
Hello!
I've written some basic code to move a ball to the mouses _x and _y position with easing.
Code:
onClipEvent (enterFrame) {
xp = _xmouse/10;
yp = _ymouse/10;
_x = _x+xp;
_y = _y+yp;
}
Thing is, i'd like to control the ball by pressing on screen keys (up, down, left, right) instead of using the mouse position as this will be appearing on a touch screen without a keyboard or mouse.
How do I go about doing this?
I've attached my .fla so show what I mean.
Thanks!