Hello,
I am new to this board so please forgive me if I missed a topic replying to my question.
I am trying to use a swf library in a project and I managed to import successfully and also instantiate an exported MovieClip from that.
Now, that MovieCip has two nested MovieClips that can be easily used as instances of their parent.
Each one of them has also a nested MovieClip and I am trying to use it by its instance name but I get an error in Chrome devtools that the object is undefined.
All movieclips are exported in the swf > as3 > frame1 and I can see them in HaxeDevelop assets > swf
The same thing works great if I choose swf compile.
So, to explain better I have this code:
var snd = new Music();
snd.ms.msmc.gotoAndStop(2);
snd.fx.fxmc.gotoAndStop(2);
which works fine in flash but not in html
If I change to
var snd = new Music();
cast(snd.ms.getChildByName(“msmc”), MovieClip).gotoAndStop(2);
cast(snd.fx.getChildByName(“fxmc”), MovieClip).gotoAndStop(2);
works fine on both platforms.
This means that nesting instances work only for the first level in html5 and then I have to use children array of the MovieClip?
Thanks!