A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: on rollover shake?

  1. #1
    Senior Member
    Join Date
    Oct 2000
    Posts
    126
    Hi,

    have been trying to search for some script that will allow a button to shake when you hover over it.....i'm sure i've seen something like this done in actionscript, but i have no idea, any help would be great..

    ta.

    Cam.

  2. #2
    Senior Member
    Join Date
    Jun 2000
    Posts
    1,180
    Hi..
    The following is placed on an MC. You could place a button in the MC for the desired effect:

    onClipEvent (enterFrame) {
    if (this.hitTest(_root._xmouse,_root._ymouse,true)) {
    this._x+=Math.random()*2;
    this._y-=Math.random()*2;
    this._x-=Math.random()*2;
    this._y+=Math.random()*2;
    } else {
    this._x=250;
    this._y=150;
    }
    }

    I'm sure there are better scripts out there but this is one that sprung to mind.

    Hope this helps.

  3. #3
    Senior Member
    Join Date
    Oct 2000
    Posts
    126

    nice one...

    excellent, cheers.....

    cam.

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