Jump to content


Hovering Effect on images

Recommended Posts

Is it possible to create a hovering effect on an object using a Green Sock Solution? Instead of a static button I would like to have a button that looks like it is hovering.

  • Like 1
Link to comment
Share on other sites

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});

Link to comment
Share on other sites


I tried it and its close to what I want but I need it to be smoother. I will play with the values.


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.