0 Replies Latest reply on Oct 16, 2014 9:03 AM by CatSulzmann

    Access a nested symbol timeline from the main stage

    CatSulzmann

      Hi all,

       

      Would love some help on accessing a nested symbol from the main stage please.

       

      To set the scene.....

      "Its an autumn day..

      no sorry...just joking...

       

      So i have a symbol called "NormalAnatomy" - its not on the main stage, but when a button is clicked it appears in the 'content' box which is just a rectangle on the main stage.

      Inside "NormalAnatomy" symbol is another symbol called "Scrub_all" which is an animation

      For users to view the animation they use a scrub bar like this lovely lady has invented:

      Create Click and Touch Draggable Scrubbers with Edge Animate CC | sarahjustine.com

       

      So for Sarah Justines scrubber to work - the main stage has a lot of actions added to it. Also the "timelinePlay" symbol is on the main stage

      Its starts:

      var symDur = sym.getSymbol("timelinePlay").getDuration();

      var mySymbol = sym.getSymbol("timelinePlay");

      var scrubber = sym.$("scrubber");

      var bar = sym.$("bar");

      sym.$("mobileHit").hide();

      var dragme = false;

       

      So I put my "NormalAnatomy" symbol on my main stage to see if the code would work and changed all the relevant details.. and indeed it worked!

      var symDur = sym.getSymbol("NormalAnatomy").getSymbol("Scrub_all").getDuration();

      var mySymbol = sym.getSymbol("NormalAnatomy").getSymbol("Scrub_all");

      var scrubber = sym.getSymbol("NormalAnatomy").$("scrubber");

      var bar = sym.getSymbol("NormalAnatomy").$("bar");

      sym.getSymbol("NormalAnatomy").$("mobileHit").hide();

      var dragme = false;

       

      But i don't want the "NormalAnatomy" symbol to be on the main stage as I want it to appear in the 'content' box only when i hit a btn

      So as soon as I took this symbol off the main stage, the scrubber doesn't work. So I click a btn, and the symbol appears in the content box but the scrubber doesn't work.

      so I tried in front of the "NormalAnatomy"

      getStage().

      getStage("content").

      getComposition().getStage().

      getSymbol("content").

       

      but nothing works

      The main problem must be the fact that the NormalAnatomy symbol appears inside a content box so the MainStage actions doesn't know how to find it??

      So my question is... what should I put in the main stage actions to make it access the "NormalAnatomy" symbol?

       

      Thanks for your help in advance!