A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Cursor Trick

  1. #1
    Member
    Join Date
    Feb 2002
    Posts
    38
    (sorry if im stepping on any toes in re-posting in this forums, just after i thought about it, i suppose its more action-scripty than general flash, again sorry if im out of line)

    Im intriqued as to how this site managed to create the dragable cursor.

    Im aware of the tutorials for this on this site and others, im just having problems with giving the object the delayed dragging feeling that this cursor has.

    I would love to know how to achieve this effect so i could incorporate it into an experiment im doing, that could do with such dragging "effects"(for want of a better word)

    The site:-

    http://www.nka.com.mk/

    Thanx in advance,
    G

  2. #2
    half as fun, double the price senocular's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, CA (USA)
    Posts
    4,361
    this goes on the cursor clip

    Code:
    onClipEvent (load) {
    	Mouse.hide()
    	ease = 4
    }
    onClipEvent (enterFrame) {
    	_x += _xmouse/ease
    	_y += _ymouse/ease
    }
    onClipEvent (unload) {
    	Mouse.show()
    }
    at ease of 1 the clip follows the mouse exactly. The greater the value of ease there after, the longer it will take to reach the mouse.

    as for the rotation, its just a factor of the _x position of the clip relative to the width of the movie, Im sure you could figure that out if you wanted that effect too (and if not you know where to ask )

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