A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Mouse Pointer Controling Anim

  1. #1
    Junior Member
    Join Date
    Sep 2000
    Posts
    19

    Mouse Pointer Controling Anim

    Here's an example of what I want to do.

    http://www.frozencpu.com/images/prod...a_ramsinks.swf

    I want to know how this guy control his animation with the mouse pointer. If you move your mouse pointer over the anim you can play it in slow or on reverse. How can you do this ?

    I know the animation is simply 100 pictures on 100 frames. No tweening or anything like that.

    Here's a similar animation I've done using 3DS and Flash:

    http://www.frozencpu.com/images/prod...lpha_8045.html

    But I'm missing the "control" feature. Can anyone help me or point me to a good tutorial ??

    Thanks
    Last edited by JCT; 07-04-2003 at 09:30 PM.

  2. #2
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    I think you could create a movie clip containing the animation, maybe 100 frames long. then you need to convert the mouses x position into a value between 1 and 100 (or 1 and however many frames are in the movie clip)

    you can use a clip event attached to the movie clip to send it to the desired frame.
    code:

    onClipEvent(enterFrame) {
    frame = Math.ceil((_root._xmouse / Stage.width) * this._totalframes;
    this.gotoAndStop(frame);
    }


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