A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Why won't this work?

  1. #1
    Junior Member
    Join Date
    Mar 2006
    Posts
    12

    Why won't this work?

    This code is attached to a MovieClip:
    code:
    _x = _xmouse;
    _y = _ymouse;


    Why won't the MovieClip appear where the mouse is?

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    try -
    onClipEvent(enterFrame){
    _x = _root._xmouse;
    _y = _root._ymouse;
    }

  3. #3
    FK Newb Beater
    Join Date
    Dec 2002
    Location
    Seattle
    Posts
    676
    code:
    this.onMouseMove = function() {
    my_mc._y = this._ymouse;
    my_mc._x = this._xmouse;
    updateAfterEvent();
    }


    All on the main timeline and you're set...Much, much smoother movement too. No jerking.
    Last edited by Sleeve; 03-04-2006 at 07:17 PM.
    Just because you changed the code, doesn't mean it's yours

    Most Recent Work:
    Commercial tanning beds website

  4. #4
    Junior Member
    Join Date
    Mar 2006
    Posts
    12
    Okay thanks, I just forgot I had to put _root before _xmouse and _ymouse .

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