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

gotoandStop gotoAndPlay inside nested movieclip timeline

Community Beginner ,
Apr 25, 2018 Apr 25, 2018

Hi all

Since adobe flash cc to adobe animate 2018 , there isn't method to go to specific frame by type code inside Movieclip timeline

if i have MovieClip named inMC inside Movieclip named mainMC

in inMC I have 10 frames of tween

in mainMC I have 10 frames  in frame 5, i add script

this.stop();

this.inMC.gotoAndStop(4);

the inMC still played, I want to note I can hide inMC if I typed  this.inMC.visible=false;!!!!

if I put gotoAndStop code in event click , Movieclip will stop , how to add this code to run immediately on timeline code

1.3K
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 Expert ,
Apr 25, 2018 Apr 25, 2018

is this an html5/canvas project?

what happens to inMC when your mainMC reaches its frame 5?

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 ,
Apr 25, 2018 Apr 25, 2018

yes it's html5/canvas

inMC will play in loop

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 ,
Apr 25, 2018 Apr 25, 2018

It would happen if you do that as soon as you get to the main timeline frame, because unlike Flash Player 10 and later, the movieclip doesn't yet exist. You might have had the same problem in Flash Player 9.

A different approach would be to use a window variable. This would work:

inMCframe = 4; //in the main timeline

this.gotoAndStop(inMCframe);//in the timeline of inMC

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 ,
Apr 25, 2018 Apr 25, 2018

How inMC doesn't yet exist? ,if I traced it by console I can find movieclip, also I can do transformation and visible and all properties ???

if I used last version of createjs framework from EASElJS , the movie stopped

why adobe use 2015.11.26 version not last version of createJS

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 ,
Apr 25, 2018 Apr 25, 2018

inMC exists enough to set its location and visibility, but its internal timeline isn't initialized yet.

The later version of CreateJS includes some features that Animate doesn't yet support. That may be why they're stuck on the 2015 version.

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 ,
Apr 25, 2018 Apr 25, 2018

Is there method or event like validate in as3 for createJS to invoke when MC got ready

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 ,
Apr 25, 2018 Apr 25, 2018
LATEST

Try/Catch works in JavaScript, but telling a movieclip to gotoAndStop before it's ready doesn't trigger an error. Not sure about validate.

The movieclip will be ready the next time that frame is drawn, but the user would see a glitch because the first frame will appear briefly.

You could add the movieclip from the library:

var inMC = new lib.mc();

inMC.x = 100;

inMC.y = 100;

inMC.gotoAndStop(2);

this.addChild(inMC);

That works fine. Or you could do what I said, and put the code inside the movieclip.

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