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

EaselJS / setChildIndex with Movieclips added by hand

Participant ,
Sep 20, 2017 Sep 20, 2017

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

Views

1.1K

Translate

Translate

Report

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

Contributor , Sep 20, 2017 Sep 20, 2017

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.

Votes

Translate

Translate
Contributor ,
Sep 20, 2017 Sep 20, 2017

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.

Votes

Translate

Translate

Report

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
Participant ,
Sep 20, 2017 Sep 20, 2017

Copy link to clipboard

Copied

LATEST

thanks, it works

var myMcClone =  this.myMc.clone();

myMc.visible = false;

this.addChild(myMcClone);

Votes

Translate

Translate

Report

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