Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions dynamic wiggler not so dynamic

  • dynamic wiggler not so dynamic

    Posted by Darren Hardaway on June 4, 2009 at 5:47 am

    Ok, I’m not sure what I’m doing wrong, but I got this wiggler expression I made to work on any comp size, but wiggle() won’t accept the values I’m trying to use. The only thing I can think of is I’m not restricting wiggle() correctly, but I proved that wasn’t it. here it is:

    width=thisComp.width/2;
    height=thisComp.height/2;
    freq=2;
    w=wiggle;
    x=w(freq,width)[0];
    y=w(freq,height)[1];
    [x,y]

    I didn’t move the object at all, just wrote this on position of a NTSC standard comp size and it only wiggles about 10 pixels u/d l/r
    So I tried this:

    width=360;
    height=240;
    freq=2;
    w=wiggle;
    x=w(freq,width)[0];
    y=w(freq,height)[1];
    [x,y]

    and that doesn’t work, but this works like a charm:

    freq=2;
    w=wiggle;
    x=w(freq,360)[0];
    y=w(freq,240)[1];
    [x,y]

    x_x how can I get it to let me use the comp’s size values to affect the wiggle?

    Darren

    Darren Hardaway replied 16 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Koby Goldberg

    June 4, 2009 at 7:00 am

    You are having a problem because your variables: width and height are reserved words…
    They represent the width and height of the layer…
    Give your variables different names, and it should work !

    Something like:
    wid=thisComp.width/2;
    hei=thisComp.height/2;
    freq=2;
    w=wiggle;
    x=w(freq,wid)[0];
    y=w(freq,hei)[1];
    [x,y]

    Koby.

  • Darren Hardaway

    June 4, 2009 at 4:57 pm

    hahaha that makes sense. Thats nice to know that you can call the layer’s width and height like that, and its logical. Thanks for the help!

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