Does this help? I put together a simple Popup scenario for you.

============= TestPopup.mxml ==========================
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml" xmlns="*">
<mx:Script>
    <![CDATA[
        import mx.managers.PopUpManager;
    ]]>
</mx:Script>
<mx:Button label="Popup Window" click="PopUpManager.createPopUp(this,LoginForm,true);" />
</mx:Application>
=============LoginForm.mxml==========================
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.macromedia.com/2005/mxml" xmlns="*" width="300" height="300">
<mx:Script>
    <![CDATA[
        import mx.managers.PopUpManager;
    ]]>
</mx:Script>
    <mx:Text text="This is the Login Form" />
    <mx:Button label="Close this Popup" click="PopUpManager.removePopUp(this)" />
</mx:TitleWindow>
===================================================

All of us are learning and I never tried this in Flex2.
But the easiest way to do this is to use the FlexBuilder2 and wait for the code-completion hint provided by the IDE.
For example, in this case, after you write the import statement within the <mx:Script> tag, type in PopUpManager.
If in doubt, use the Builder and key in inside the script tag ... :-)
This will popup all the functions that is available with a fairly decent amount of description.
Just a friendly tip! :-)

Regards
Sree

Ralf Rottmann wrote:

Created a PopUp Window via Window Manager from MXML Application.

PopUp Window contents are in an MXML Component containing the following Button control:

 

<mx:Button id="ButtonClose" x="330" y="12" label="Close" click="deletePopUp()"/>

 

Flex answers with an

 

Access of undefined property deletePopUp

 

error. At the start of the MXML Component I do have the following imports:

 

import mx.containers.TitleWindow;

import mx.managers.PopUpManager;

 

Assigning a function to the click event and calling this.deletePopUp() doesn’t help either.

 

Any idea?

 

Ralf Rottmann

 

 




--
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




Reply via email to