2009
09.06

In your application create a function that will be called when an event like click on link or button happens

import mx.managers.PopUpManager;

private function showTestPopup():void {
var win:TestPopup = PopUpManager.createPopUp(this.parent, TestPopup, true) as TestPopup;
PopUpManager.centerPopUp(win);
}

TestPopup.mxml will look like this:

<?xml version=”1.0″ encoding=”utf-8″?>
<!– TestPopup.mxml –>
<mx:TitleWindow xmlns:mx=”http://www.adobe.com/2006/mxml”
layout=”vertical”
title=”Test Popup”
showCloseButton=”true”
width=”400″
height=”300″
close=”titleWindow_close(event);”>

<mx:Script>
<![CDATA[
import mx.events.CloseEvent;
import mx.managers.PopUpManager;

private function titleWindow_close(evt:CloseEvent):void {
PopUpManager.removePopUp(this);
}

]]>
</mx:Script>

<mx:Text text=”This is a test 12345″>
</mx:Text>

</mx:TitleWindow>

Hope this helps…

No Comment.

Add Your Comment