Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Animating a Window and Rescaling a Toolbar

  • Animating a Window and Rescaling a Toolbar

    Posted by Ecko Locko on December 5, 2011 at 5:25 pm

    Hello,

    Im new in CreativeCOW and at first i had to say thanks for all your help and sorry for my english.

    I have a new project in process, its about to recreate a operating system interface with all the windows and icons.

    My composition is easy, i have a precompose with all the elements of the window in it, but only one is the important and problematic one, the toolbar.

    My need is when i resize the window in the MasterComp i want the toolbar to preserve this size as a real window in Mac OsX or Windows.

    I try with this but i cant finish it, its applied to the Scale of this Toolbar in the Precomp.

    Please if someone could help or guide me I would appreciate that, right now my head is not enough for much more and I have to finish soon

    Thanks a lot

    CompWidth = thisComp.width;
    CompHeight = thisComp.height;
    LayerHeight = thisComp.layer(index).height;

    ScalePercent = (LayerHeight * 100) / CompHeight;

    WindowScale = comp("MainComp").layer("BasicWindow").transform.scale;

    AppliedPercent = (WindowScale[1] * ScalePercent) / 100;

    ..... ??

    [100, ?]

    Ecko Locko replied 14 years, 5 months ago 1 Member · 1 Reply
  • 1 Reply
  • Ecko Locko

    December 5, 2011 at 6:05 pm

    SOLVED:

    WindowScale = comp(“MainComp”).layer(“BasicWindow”).transform.scale;
    result = transform.scale[1] / (WindowScale[1] * 0.01);
    [result,result]

    I have a little vibrance of the layer when i animate the scale but it can be acceptable, at less for now…

    Sorry for the thread, its was very easy one but my head is out of his limits today.

    Thanks if anyone was thinking of helping me, I leave the question open about the vibration in case you encourage to answer..

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