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

setChildIndex 2015.11.26 vs createjs 1.0.0 differences

Community Beginner ,
Jan 07, 2020 Jan 07, 2020

Copy link to clipboard

Copied

So I have some older content that I have been trying to update publishing with Animate 20 and createJS 1.0.0 and I have hit a bit of a snag.  

 

I have a tool that selects "badges".  Let's call Badge the main display object, which is comprised of a background circle (drawn as a Createjs.Shape filled in with a variable color at runtime), a level indicator (a movie clip exported/design time), and a individual player icon (also a movie clip exported/design time) that is one on a specific frame, each with a this.stop();

 

This rendered fine with the older version of createjs (2015.11.26), but it seems that now the shape drawn in code now occludes the other children no matter what z-index I try to assert.

 

Among other things, I've tried to control the z-index by adding in the following order:

(this = parent = main badge object)

 

  this.addChildAt(this.bg,0); 
  this.addChild(this.levelIcon);
  this.addChild(this.playerIcon);
//stage.update(); // Tested, no impact
console.log("BG:"+this.getChildIndex(this.bg));
console.log("LI:"+this.getChildIndex(this.levelIcon));
console.log("PI:"+this.getChildIndex(this.playerIcon));

 

 

Properly shows me the correct and expected index, yet I only see my drawn background.

 

CreateJS_Badge.png

 

If I make the bg object visible=false, I believe I can see my desired icon.

 

Something is slightly different that I don't quite have a handle on yet.  Anyone have any thoughts?

 

Thanks,

jpwalters

 

 

 

TOPICS
Code , Timeline

Views

400

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

LEGEND , Jan 07, 2020 Jan 07, 2020

Try adding a this.stop();

 

Single-frame movieclips in CreateJS 1.0.0 "play" continuously, reverting any changes made to timeline symbols.

Votes

Translate

Translate
LEGEND ,
Jan 07, 2020 Jan 07, 2020

Copy link to clipboard

Copied

Try adding a this.stop();

 

Single-frame movieclips in CreateJS 1.0.0 "play" continuously, reverting any changes made to timeline symbols.

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
Community Beginner ,
Jan 07, 2020 Jan 07, 2020

Copy link to clipboard

Copied

Spot on as always!  Thank you so much.  That did indeed fix the problem!

 

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
Community Beginner ,
Sep 28, 2020 Sep 28, 2020

Copy link to clipboard

Copied

I have the same problem.
Where do I add the "this.stop ()"?
Thank you for your reply.

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
Community Beginner ,
Oct 26, 2020 Oct 26, 2020

Copy link to clipboard

Copied

LATEST

J'ai trouvé ! Tout simplement en début d'action.

 

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