Creating and removing pop-up windows, Chapter 13, Solution 2

­
<?xml version="1.0" encoding="utf-8"?>
<!--
////////////////////////////////////////////////////////////////////////////////
// Flex Solutions: Essential Techniques for Flex 2 and Flex 3 Developers
// Author: Marco Casario 
// Editor: FriendsOfED www.friendsofed.com
// All Rights Reserved.
//
// Chapter 13: User Navigation in Flex Applications
// 
// Solution 13-2: Creating and removing pop-up windows
//
// 
// @author      Marco Casario
// @date        26 November 2007
// @version     1.0
// @site        flexsolutions.comtaste.com
//
////////////////////////////////////////////////////////////////////////////////
-->
 
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
	layout="absolute" 
	paddingLeft="0" paddingRight="0" xmlns:effects="com.adobe.effects.*">
 
	<mx:Script>
		<![CDATA[
			import com.flexsolutions.chapter13.popup.MyPopUpWin;
 
 
			import mx.managers.PopUpManager;
 
			public function zoomPopUp(event:MouseEvent):void
			{ 
				PopUpManager.createPopUp(this, MyPopUpWin, true);			
			} 
 
		]]>
	</mx:Script>
 
 
	<mx:Canvas width="340" height="250" x="191" y="81">
		<mx:Image id="Image1"  source="@Embed('data/maldive.jpg')"  width="320" height="240"
		    click="zoomPopUp(event)"/>
	</mx:Canvas>
 
	<mx:Label x="191" y="46" text="Click on the image"/>
</mx:Application>