Skip to main content
New Participant
February 23, 2017
Answered

Get symbol

  • February 23, 2017
  • 1 reply
  • 604 views

On Edge we use sym.getSymbol("Symbol");

On Flash we use getChild("Symbol");

Now what I do to get the symbol Symbol and change his Frame position to frame 1 (the second frame)?

Also how I work to get to Stage from inside a symbol (Edge we used sym.getComposition().getStage() )??

    This topic has been closed for replies.
    Correct answer ClayUUID

    this.Symbol.gotoAndStop(1);

    stage

    1 reply

    ClayUUIDCorrect answer
    Brainiac
    February 23, 2017

    this.Symbol.gotoAndStop(1);

    stage

    erlingg27797165
    Known Participant
    July 27, 2017

    what if you are in a symbol S1 and want a timeline action to get symbol S2 (which is on the stage) to stop on frame 1?

    Colin Holgate
    Inspiring
    July 27, 2017

    He doesn't say how deeply nested S1 is, and we have to guess that by "on the stage" (everything is on the stage) he actually means on the root timeline. In which case it would be:

    exportRoot.S2.gotoAndStop(0);


    To cover all eventualities he could use Window variables, and in S2 have:

    window.s2 = this;

    and in S1 have:

    window.s2.gotoAndStop(0);

    Then both symbols can be at any level. Though of course you would want to make sure that S1 had set its variable before S2 used it.

    I know the 'window' part may be implied, but I include it for readability.