Search code examples
canvasjquery-animatecreatejscc

Animate CC HTML5/Canvas controling a nested MovieClip timeline with actionscript


I have a problem i can't seem to wrap my head around. In the Animate CC Canvas IDE I created a Movieclip with several frames and on each frame is another nested movieclip and ocasionally that also contains other movieclips (all with instance names while the mainMc is added via addChild() to the stage).

so "mainMc > subMc > subSubMc"

Now i try to control the timeline of the subMc, respectively the subSubMc

I figuered it would be easy as mainMc.stop(); or mainMc.gotoAndStop('label'); works like a charm.

If i try to control the timeline of a subMC like mainMc.subMc.stop(); or any other timeline command absolutely nothing happens and the MC keeps looping.

The console doesn't throw any errors and it works absolutely fine if i try to do any other operations on a nested mc - like alpha, rotation, coordinates etc. Every property except "paused" seems to be responsive. I absolutely do not understand why ...

Why the heck can't i control the timeline of nested MovieClips/Symbols/Instances? Help please? Anyone?


Solution

  • This could be related to a bug where nested content is not immediately available. Usually as long as you call gotoAndStop/gotoAndPlay on the parent movieClip first, then the children should be available.

    mainMc.gotoAndStop(0);
    mainMc.subMc.stop(); // Might need gotoAndStop here for the next line to work...
    mainMc.subMc.subSubMc.stop();
    

    Currently, this is an issue that needs to be solved by Adobe (not CreateJS), so we are working on getting it solved.