View Full Version : How do I make one panel on top?
cpthk
February 26th, 2009, 03:41 AM
I have many panels in my flex, they are freely draggable. If one is overlap of another, how do I control one to be on top?
.ral:cr
February 26th, 2009, 07:11 AM
you add it again to the stage, this operation will remove it from the current level and add it to the highest level.
dr_tchock
February 26th, 2009, 07:41 AM
put this in your MouseDown function:
e.target.parent.setChildIndex(e.target, (e.target.parent.numChildren - 1));
cpthk
February 28th, 2009, 05:26 AM
put this in your MouseDown function:
e.target.parent.setChildIndex(e.target, (e.target.parent.numChildren - 1));
The code you gave does not work for me.
snickelfritz
February 28th, 2009, 11:32 AM
I think you have to cast the parent as a display object container (Movieclip for example) in order to manipulate its children in actionscript.
cbeech
February 28th, 2009, 12:51 PM
yes snick, but ral:cr was also correct in the first place, use - MovieClip(e.target.parent).addChild(e.target);
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.