Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Doc Effect

  • Doc Effect

    Posted by Elaan Dak on June 27, 2011 at 11:13 am

    I found this expression posted by Colin Braley, and I need some help to modify it.
    Its about making an effect similar to Apple doc that magnify the icons when the mouse cursor come close.


    //Begin expression
    mouse_layer = thisComp.layer("mouse layer");//Mouse layer
    beginScale = 100;//Scale begins at this
    endScale = 250;//Scale ends at this
    beginDistance = 200;//Distance to begin magnifying in pixels
    endDistance = 0;//Distance to end magnifying in pixels
    //--Don't modify below here
    dis = length(this.position, mouse_layer.position);
    ease(dis, beginDistance, endDistance, beginScale, endScale)

    //end expression

    What I want to ask, is it possible that instead of scaling the layers, they move forward and backward toward the camera in z-axis when the mouse layer get close to them?

    Thanks in advance.

    Anders Hattne replied 14 years, 10 months ago 3 Members · 2 Replies
  • 2 Replies
  • John Cuevas

    June 27, 2011 at 1:50 pm

    Post this in the After Effects Expressions forum. Dan Ebberts checks in there a lot and he REALLY knows this stuff.

    Johnny Cuevas, Editor

  • Anders Hattne

    June 27, 2011 at 5:15 pm

    I can’t even get the expression to work as is..
    But in theory ..in my theory at least, this should work:

    //–Do modify below here
    dis = length(this.position, mouse_layer.position);
    z=ease(dis, beginDistance, endDistance, beginScale, endScale);

    transform.position+[0,0,z]

    But as I can’t get the expression to work, I cant confirm it. Dan Ebberts is the man I want to be, hence why i tried to have a look at it.. to no avail.

    http://www.ardillamedia.com

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy