A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: movie clip follow mouse

  1. #1
    Junior Member
    Join Date
    Dec 2004
    Posts
    1

    movie clip follow mouse

    What do i need to do to have a movie clip follow my mouse around the stage? Thanks

  2. #2
    Senior Member
    Join Date
    Aug 2001
    Location
    new york
    Posts
    205
    you need to set the _x and _y property of the mc to the _xmouse and _ymouse

    mcName.enterFrame= function(){
    this._x= _xmouse;
    this._y= _ymouse;
    }

  3. #3
    Member
    Join Date
    Nov 2004
    Location
    Pasig City, Philippines
    Posts
    68
    I am not sure, but if the code of dnystwn doesn't work, try this:
    code:
    mcName.onEnterFrame= function(){ //onEnterFrame instead of enterFrame
    this._x= _root._xmouse; // added _root for absolute
    this._y= _root._ymouse; // added _root for absolute
    }

    "Life is unfair... but beautiful."

    Scarlette Krimson
    marte_raphael.soliza@up.edu.ph

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