Merge branch 'master' into flex4
[potlatch2.git] / net / systemeD / potlatch2 / find / FindDialog.mxml
index 653dfe605e61a5579eb827c49624cd6f58d1bdc2..887aa9947936b16a51252d79816dcfe8f7a8397a 100644 (file)
@@ -1,12 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
 <mx:TitleWindow
-       xmlns:mx="http://www.adobe.com/2006/mxml" 
+       xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
        layout="vertical" showCloseButton="true"
        horizontalAlign="center" title="Search"
        width="458" height="350" verticalGap="0" creationComplete="txtFind.setFocus()">
-       <mx:Script><![CDATA[
+       <fx:Script><![CDATA[
         import flash.events.Event;
                import mx.core.Application;
+               import mx.core.FlexGlobals;
                import mx.events.CloseEvent;
                import mx.events.FlexEvent;
                import mx.managers.PopUpManager;
@@ -27,7 +29,7 @@
                                
                
                public function init():void {
-                       PopUpManager.addPopUp(this, Application(Application.application), true);
+                       PopUpManager.addPopUp(this, Application(FlexGlobals.topLevelApplication), true);
                        PopUpManager.centerPopUp(this);
                        this.addEventListener(CloseEvent.CLOSE, findDialog_close);
                        
         }
         
         private function goToSelected():void {
-            Application.application.theMap.moveMapFromLatLon(selectedResult.lat, selectedResult.lon);
-            //Application.application.theMap.redraw();            
+            FlexGlobals.topLevelApplication.theMap.moveMapFromLatLon(selectedResult.lat, selectedResult.lon);
+            //FlexGlobals.topLevelApplication.theMap.redraw();
             PopUpManager.removePopUp(this);
         }
         
         
        ]]>
-       </mx:Script>
+       </fx:Script>
 
        <mx:HBox horizontalAlign="left" width="100%">
                <mx:Label text="Enter place name: " />