Hi, 
  Well did u read the source code of TitleWindow?
  This is my swap up function:

        private function swapObjUp( obj:mx.core.UIObject ){
                var depth = ( obj[ "modalWindow" ] == undefined
)?DepthManager.kTop : DepthManager.kTopmost;
                var o =
obj._parent.createChildAtDepthWithStyles("BoundingBox", depth,
{_visible:false});
                obj.swapDepths(o);
                o.removeMovieClip();
        }

Regards


-----邮件原件-----
发件人: [email protected] [mailto:[EMAIL PROTECTED] 代表
Rajesh Jayabalan
发送时间: 2005年8月16日 8:10
收件人: [email protected]
主题: [flexcoders] Re: move window up

Hi Rob,

 That does not work.. in cases its hiding the window, and in some
cases it is not doing anything.

 I am comparing the depth of all the windows that I have in the array
and then setting the window depth above the most highest one. and that
seems to work.

Regards
Rajesh J

--- In [email protected], "Rob Rusher" <[EMAIL PROTECTED]> wrote:
> Rajesh,
> Because each title window has a parent you can simply get the top
child with
> the getChildAt() method and then set your target above that.
> 
> function popToTop( target : mx.core.UIObject )
> {
>     var parent = target.parent;         
>     var topSibling = parent.getChildAt( parent.numChildren - 1 );
> 
>     if ( topSibling != target )
>         target.setDepthAbove( topSibling );
> }
> 
> HTH,
> 
> Rob Rusher
> 
> RIA Consultant
> Macromedia Certified Flex Instructor
> e:[EMAIL PROTECTED] c:303.885.7044 im:robrusher
> 
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Rajesh Jayabalan
> Sent: Monday, August 15, 2005 5:50 PM
> To: [email protected]
> Subject: [flexcoders] move window up
> 
> Hi,
> 
>  My application uses multiple titlewindows, and I am storing the
> reference of them in a arraylist, and creating a dynamic menu. Now in
> the script how do I set the depth of the window so that the window can
> be on the top. I cannot use setdepthabove since I do not know which
> window is on the top currently.
> 
> Regards
> Rajesh J
> 
> 
> 
> 
> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



 






------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hg7uesb/M=362329.6886308.7839368.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1124162303/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to