A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: mouse pointer - change to "Grab" onclick

  1. #1
    Senior Member
    Join Date
    Jun 2000
    Posts
    102

    mouse pointer - change to "Grab" onclick

    How would I make my mouse animate to a different look when the onclick event happens..this is the script I am currently using...I want my hand pointer to close to a fist when the person clicks down on the mouse button to drag...

    onClipEvent (load) {
    startDrag(pointer,1);
    }
    onClipEvent (load) {
    Mouse.hide();
    }


    How would I do this?

    THanks!
    Joey Anderson
    Mac Web Internet, Inc.,
    a web application developer and service provider.
    http://www.macwebinternet.com
    info@macwebinternet.com

  2. #2
    I tried... dbarbarian's Avatar
    Join Date
    Aug 2003
    Location
    Berkeley, California, USA
    Posts
    678
    use:
    code:
     onClipEvent(enterFrame) {
    _root.mouseMC._x = _root._xmouse;
    _root.mouseMC._y = _root._ymouse;
    }



    instead of startDrag.

    then, put:
    code:
     onClipEvent(mouseDown) {
    if (_root.mouseMC.hitTest(_root.dragItemMC)) {
    _root.mouseMC.gotoAndPlay("grab");
    }
    }



    now where _root.dragItemMC is the intance of the item you want to drag and mouseMC is the movie clip with the custom mouse (in this case, the movie clip you are putting the code on, maybe...).

    "grab" is the frame label of the first frame of your grab animation.

    i havent worked with hitTests in a while, so im not sure if thats the right code, but thats the right idea.

    i hope it works
    gl

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