Skip to main content
avid_body16B8
Legend
May 2, 2018
Answered

How do I address the main timeline from a nested symbol placed on main timeline?

  • May 2, 2018
  • 2 replies
  • 1854 views

What is the equivalent from Edge Animate?

sym.getComposition().getStage().stop('lableName);

My setup:

Main timeline has symbol named intro.

Intro has a button named startbtn

Main timeline has several stops with labels - intro, tutorial, problem, etc... which also have symbols with buttons and questions, etc...

I want to move the play head of the main timeline from the startBtn symbol inside the intro symbol while the intro symbol is on the main time.

    This topic has been closed for replies.
    Correct answer JoãoCésar17023019

    Hi.

    Try using exportRoot to refer to the main timeline.

    2 replies

    Colin Holgate
    Inspiring
    May 2, 2018

    Going back to the original need, although you can use exportRoot, you can also use the window itself. That can be handy if you need non-Animate Javascript to talk to Animate Javascript. Something like this:

    window.connectiontosomethingthatcanbedeeplyburied = this;

    in the location that you need to access, and:

    var whototalkto = window.connectiontosomethingthatcanbedeeplyburied;

    somewhere else. Then that other location can use whototalkto as a way to access the original location, no matter where it is.

    avid_body16B8
    Legend
    May 2, 2018

    Interesting! I'll have to explore this.

    It's just hard to get back to Flash after having devoted my time to EA since preview 1.

    JoãoCésar17023019
    Community Expert
    JoãoCésar17023019Community ExpertCorrect answer
    Community Expert
    May 2, 2018

    Hi.

    Try using exportRoot to refer to the main timeline.

    avid_body16B8
    Legend
    May 2, 2018

    Thanks, I'll try that.

    And what if I wanted to address the nested symbol from the main timeline?

    In Edge Animate it is

    in compositionReady:

    sym.getSymbol().$('button').css({'background-color':'red'});

    JoãoCésar17023019
    Community Expert
    Community Expert
    May 2, 2018

    Nice.

    You can write:

    this.intro.startbtn

    Start with 'this' and continue with dot notation.