A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Sprite following mouse

  1. #1
    Junior Member
    Join Date
    Dec 2010
    Posts
    12

    Sprite following mouse

    Is there a way that I could make a symbol/button follow my mouse without having to drag it? for example, a car following the cursor.

  2. #2
    Junior Member
    Join Date
    Dec 2010
    Posts
    18
    Yep. Which version of AS are you using?

  3. #3
    Senior Member
    Join Date
    Jan 2010
    Location
    England
    Posts
    268
    i don't know which version of Actionscript your using but here's how to do that with as2.

    Actionscript Code:
    onEnterFrame = function() {
    movieclipName._x = _xmouse;
    movieclipName._y = _ymouse;
    }
    might be addicted to flash...
    _______________________________________

  4. #4
    Junior Member
    Join Date
    Dec 2010
    Posts
    12
    Sorry, I have CS4 so I can use AS3 and below, but I heard that AS3 is difficult. thank you for the code, I will try it out immediatly!

  5. #5
    Junior Member
    Join Date
    Dec 2010
    Posts
    12
    (Fixed my problem, thank you so much!)
    Last edited by tonya1790; 12-28-2010 at 07:45 PM.

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