Listen for "close" event of the title window
and perform the actions you wish to perform.

e.g.

<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"; layout="vertical" width="100%" height="100%"
        title="MyTitleWindow" showCloseButton="true" close="{onClose(event)}"
        creationComplete="{init()}">
        <mx:Label text="this is a title window"/>
        <mx:Script>
                <![CDATA[
                        import mx.controls.Alert;
                        import mx.managers.PopUpManager;

                        private function onClose(event : Event) :  void
                        {
                                PopUpManager.removePopUp(this);
                        }
        ]]>
        </mx:Script>
</mx:TitleWindow>

Hope this helps.






http://flex-apollo.blogspot.com

On May 31, 2007, at 12:49 AM, Rohan Pinto wrote:

Flex newbie here... (lots of questions to follow)

question 1:

<mx:TitleWindow showCloseButton="true">
-> this shows the close button, but how do i get the mx:TileWindow
to close when a user clicks on it... ?

question1:
in my main.mxl i have 3 components
1. TileWindow1
2. TileWindow2
3. TileWindow3

TileWindow2 has button1 and button2
when a user clicks button 1 i want TileWindow1 to open and
TileWindow3 to close, when the user clicks on button 2 I'd like to
close TileWindow3 and openTileWindow1

HELP - ADVISE - EXAMPLES - anything would help...

Rohan Pinto
flex-newbie




Reply via email to