bubba
12-14-2007, 11:28 PM
Hello All ---
I am just learning Flex2, although I am experienced with Flash and AS3. I have what I think is a pretty basic question, but I can not seem to figure it out. My Application file is calling a PopUp Component created with a TitleWindow (SimpleDialogue). I have a button in the Application that when it's clicked will open the PopUpComponent. How can I pass a variable/parameter from the Application to the TitleWindow for the text. Here's the code I am using in Application:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="1055" height="826">
<mx:Script>
<![CDATA[
import dialogue.SimpleDialogue;
import mx.managers.PopUpManager
import mx.containers.TitleWindow;
private var myPopUp:TitleWindow
private function showPopUp():void
myPopUp = PopUpManager.createPopUp(this,dialogue.SimpleDialo gue,true) as TitleWindow;
PopUpManager.centerPopUp(myPopUp)
}
]]>
</mx:Script>
<mx:Button label="Show Popup Dialogue" click="showPopUp()"></mx:Button>
</mx:Application>
Here's the (basic) code in the SimpleDialogue Class:
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" title="My First Dialogue Box" >
<mx:Label id="message" text="" fontSize="24">
</mx:Label>
</mx:TitleWindow>
I know this is got to be very basic, but I think I am just too new at Flex.
Thanks for any and all replies.
I am just learning Flex2, although I am experienced with Flash and AS3. I have what I think is a pretty basic question, but I can not seem to figure it out. My Application file is calling a PopUp Component created with a TitleWindow (SimpleDialogue). I have a button in the Application that when it's clicked will open the PopUpComponent. How can I pass a variable/parameter from the Application to the TitleWindow for the text. Here's the code I am using in Application:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="1055" height="826">
<mx:Script>
<![CDATA[
import dialogue.SimpleDialogue;
import mx.managers.PopUpManager
import mx.containers.TitleWindow;
private var myPopUp:TitleWindow
private function showPopUp():void
myPopUp = PopUpManager.createPopUp(this,dialogue.SimpleDialo gue,true) as TitleWindow;
PopUpManager.centerPopUp(myPopUp)
}
]]>
</mx:Script>
<mx:Button label="Show Popup Dialogue" click="showPopUp()"></mx:Button>
</mx:Application>
Here's the (basic) code in the SimpleDialogue Class:
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" title="My First Dialogue Box" >
<mx:Label id="message" text="" fontSize="24">
</mx:Label>
</mx:TitleWindow>
I know this is got to be very basic, but I think I am just too new at Flex.
Thanks for any and all replies.