Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Get symbol

New Here ,
Feb 23, 2017 Feb 23, 2017

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() )??

512
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Feb 23, 2017 Feb 23, 2017

this.Symbol.gotoAndStop(1);

stage

Translate
LEGEND ,
Feb 23, 2017 Feb 23, 2017

this.Symbol.gotoAndStop(1);

stage

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 27, 2017 Jul 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 27, 2017 Jul 27, 2017

this.parent.S2.gotoAndStop(0);

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 27, 2017 Jul 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);

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 27, 2017 Jul 27, 2017
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines