A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: [RESOLVED] Easing with buttons

Threaded View

  1. #1
    Senior Member
    Join Date
    Mar 2006
    Posts
    139

    resolved [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!
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center