Here's an example that uses createPopUp() to create a TextArea popup (no other file required):
 
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">
<mx:Script>
import mx.managers.PopUpManager;
var app = mx.core.Application.application;
var a = mx.controls.TextArea;
var p:MovieClip;
 
function createTextAreaPopup() {
 p = PopUpManager.createPopUp(app,a,false,{ width:200,height:150,text:'Pop goes the weasel and the weasel goes pop' });
}
 
function destroyPopup() {
 p.deletePopUp();
}
</mx:Script>
 
<mx:VBox xmlns:mx="http://www.macromedia.com/2003/mxml" width="500" height="200">
 <mx:Button id="b1" label="Create TextArea Popup" click="createTextAreaPopup();" />
 <mx:Button id="b2" label="Destroy Popup" click="destroyPopup();" />
</mx:VBox>
</mx:Application>
 
HTH,
 
matt horn
flex docs


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL
Sent: Thursday, May 12, 2005 2:26 PM
To: [email protected]
Subject: Re: [flexcoders] Internal popups

It's compiled into the final SWF so there isn't technically a dependency.
 
However, if you want a simple popup, you could use an Alert.
 
check out Alert.show for that, and for loading internal components as popups, look up PopUpManager.createPopUp
 
----- Original Message -----
Sent: Thursday, May 12, 2005 2:21 PM
Subject: RE: [flexcoders] Internal popups

I can’t find an example or description of how to use the TitleWindow component without it being in an external file.  Any pointers?

 

 

/******************************************
* Jeff Beeman
******************************************/


From: [email protected] [mailto:[email protected]] On Behalf Of Tracy Spratt
Sent: Thursday, May 12, 2005 10:45 AM
To: [email protected]
Subject: RE: [flexcoders] Internal popups

 

You probably want the TitleWindow component.

 

Tracy

 


From: [email protected] [mailto:[email protected]] On Behalf Of Jeff Beeman
Sent: Thursday, May 12, 2005 12:56 PM
To: [email protected]
Subject: [flexcoders] Internal popups

 

I’ve been scouring the documentation, but I can’t seem to find how to do something that should be quite simple.  How do I create a popup window that doesn’t reference an external file?  All examples point to loading in an external mxml file, but I would like to simply create a panel that is hidden on startup and have it hide / unhide on different events.  Is this possible?

 

 

/*******************************************
* Jeff Beeman
* Digital Media & Instructional Technologies
* Arizona State University
*******************************************/

 

 



Yahoo! Groups Links

Reply via email to