You are the MANish!
I had to do a little changing, but you were very close. Note I had to cast p1 & p2 as DisplayObject:
import mx.controls.Alert;
import mx.core.* ;
import flash.events.*;
import flash.display.*;
import mx.managers.*;
import comps.*;
private var popupParent:DisplayObjectContainer;
private var p1:DisplayObject;
private var p2:DisplayObject;
private function init() {
p1 = DisplayObject(PopUpManager.createPopUp(this, comps.TestPanel, false));
p2 = DisplayObject(PopUpManager.createPopUp(this, comps.TestPanel, false));
p1.x = 150;
p1.y = 150;
popupParent = p1.parent;
//move p1 to top
popupParent.setChildIndex(p1, popupParent.getChildIndex(p2) + 1); // or -1 or 0 );
}
On 2/6/06, Manish Jethani <[EMAIL PROTECTED]> wrote:
On 2/3/06, Scott Langeberg <[EMAIL PROTECTED]> wrote:> Anyone found how to control the depths of windows created in such a manner?:p1.parent.setChildIndex(p2.parent.getChildIndex(p2) + 1 /* or -1 or 0 */);
>
> private var p1:IFlexDisplayObject;
> private var p2:IFlexDisplayObject;
>
> private function init() {
> p1 = PopUpManager.createPopUp(this, comps.TestPanel, false);
> p2 = PopUpManager.createPopUp(this, comps.TestPanel, false);
> }
>
> I want to be able to overlap popups and exchange their depths, so the one clicked overlaps all others.
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development Computer software development Software design and development Macromedia flex Software development best practice
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service .
--
: : ) Scott
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

