Skip to main content
New Participant
September 26, 2019
Question

Animate Createjs container children order (z-index) not working

  • September 26, 2019
  • 2 replies
  • 3160 views

In Animate 19.2.1 I've been having issues bringing a child MovieClip to the front of its siblings. I'm using MovieClips published from a CreateJS HTML5 canvas document. According to the CreateJS documentation, the following should work:

 

// Where there are 3 children in the parent...
var child = parent.children[0];
parent.setChildIndex(child, parent.numChildren - 1);

I've also tried:

parent.addChild(child);

The order of children changes, but the child isn't rendered in front of the other children. Any idea where I'm going wrong, and is there a solution to this?

 

Thanks,

Tim

This topic has been closed for replies.

2 replies

Brainiac
September 26, 2019

I seem to recall that bringing to front only works with symbols that are on the same layer.

New Participant
October 4, 2019
I don't think there is really a concept of layers (in the Animate sense) in CreateJS. I've found that if you clone the MovieClip you can move the clone to the front as expected, but the original item just won't change depth for some reason.
JoãoCésar17023019
Community Expert
September 26, 2019

Hi.

 

I've just moved your thread because it's related to Animate CC.

 

About your question, please check out this thread and see if it helps you:
https://community.adobe.com/t5/Animate/CC-Animate-HTML5-Canvas-Bring-Button-to-Front-on-Click/td-p/10632259

 

 

Regards,

JC