Copy link to clipboard
Copied
The DisplayList methodes like, addChild, setChildIndex(),addChildAt() etc work fine when you add a DisplayObject with Javascript/ EaselJS
for example I have Javascript in the first frame, putting a Movieclip with linkage name "Car"
var mc = new lib.Car();
this.addChild(mc);
When I add a Movieclip from the library by Hand to the stage und put an Instance Name in the propertyinspector, can I use addChild, to put it to the top of all Displayobjects
for example, the movieclip has the instancename myMc
this.addChild(this.myMc);
should put it on top
Is it possible in easeljs
I tried getting it to work, but I had no luck. A work around could be to add a duplicate of the symbol on the top, and then hide the one you don't want to be visible.
Copy link to clipboard
Copied
I tried getting it to work, but I had no luck. A work around could be to add a duplicate of the symbol on the top, and then hide the one you don't want to be visible.
Copy link to clipboard
Copied
thanks, it works
var myMcClone = this.myMc.clone();
myMc.visible = false;
this.addChild(myMcClone);