SwapDepths in ActionScript 3?
- November 23, 2009
- 2 replies
- 2548 views
Hi all,
Having issues with swapping stacking order in the new version of flash. I am developing a drag n drop activity and the educators aren't really making it easy for me (no one really understands you can't use paragraphs for drag n drop activities...).
Anyway so when you roll over the drag object, you see a "tool tip" appear in a blue rounded square explaining the meaning of the drag object better.
There are paragraphs on the left of the stage where the draggable objects need to be matched with (on the black rounded rectangle next to the sentence).
Even though i have the "tool tip" movies on a layer on the top of the timeline - once a drag object has been placed into its correct target, it sits on top of everything - especially the other tool tips of drag objects that have yet to be matched with their correct targets.
I have tried the following code to action once the drag object has been placed:
parent.setChildIndex(this, parent.numChildren-1);
Sadly, it doesn't work at all it seems. Does anyone have a solution that may work? And i suppose it is hard trying to convey this message in text so I am attaching the FLA file to this post.
Thanks in advance,