TitleWindowApp.mxml
- <?xml version="1.0" encoding="utf-8"?>
- <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
- <mx:Script>
- <![CDATA[
- import mx.managers.PopUpManager;
- import mx.containers.TitleWindow;
- import flash.geom.Point;
- private var point1:Point = new Point();
- private var file:FileReferenceList=new FileReferenceList();
- private var imagesFilter:FileFilter = new FileFilter("Images (*.jpg, *.gif, *.png)", "*.jpg;*.gif;*.png");
- private function showWindow():void {
- file.browse([imagesFilter]);
- file.addEventListener(Event.SELECT, onFileSelect);
- }
- private function onFileSelect(event : Event) : void {
- for(var i:int=0;i<file.fileList.length;i++){
- var f:FileReference = FileReference(file.fileList[i]);
- returnedName.text=f.name;
- }
- }
- ]]>
- </mx:Script>
- <mx:Panel title="TitleWindow Container Example" height="75%" width="75%"
- paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
- <mx:Button id="myButton" label="Click to open the TitleWindow container"
- click="showWindow();"/>
- <mx:Image id="imgTest" x="10" y="50"/>
- <mx:Text id="returnedName" width="100%" />
- </mx:Panel>
- </mx:Application>