Jump to content
Search Community

Hovering Effect on images

BakerShoeMaker test
Moderator Tag

Recommended Posts

Not exactly sure what you are looking for but start with this

 

place a clip with instance name mc on the stage and add this code

 

import com.greensock.*;


//record start position so that the mc never moves too far away from its origin
var startX = mc.x;
var startY = mc.y;




//move random 4 pixels
function move():void {
//create a random tween and call this function again when its done
TweenLite.to(mc, 0.6, {x:startX + Math.random()*5, y:startY + Math.random()*5, onComplete:move});
}


move();
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...