Copy link to clipboard
Copied
Working on an alphabet card game that's reads BTN's from an array but I can seem to get the selected button to go above the rest of the buttons on stage.
here's the code I'm using
_this.setChildIndex( letter[i].BTN, _this.getNumChildren -1);
setChildIndex works it provides me with the BTN index.
but
getNumChildren - 1 doesn't do anythink am i missing something out?
Hi.
The getNumChildren method is deprecated.
You should use the numChildren property or children.length - 1;
Also, you must use a stop method to prevent the timeline from looping even in single frame Movie Clips.
Please let us know if you have any further questions.
Regards,
JC
Copy link to clipboard
Copied
Hi.
The getNumChildren method is deprecated.
You should use the numChildren property or children.length - 1;
Also, you must use a stop method to prevent the timeline from looping even in single frame Movie Clips.
Please let us know if you have any further questions.
Regards,
JC
Copy link to clipboard
Copied
Thank you so much. It works now.
set the children.length-1 but didn't think about having a stop method on a single frame.