From 18efd8024dd9df7e1c82b4e411f4bb06467d5d7a Mon Sep 17 00:00:00 2001 From: Dave Stubbs Date: Wed, 12 Aug 2009 22:39:39 +0000 Subject: [PATCH] nice zoom buttons and a loading message --- halcyon.mxml | 41 ++++++++++++++++--- net/systemeD/halcyon/connection/Connection.as | 4 ++ .../halcyon/connection/XMLConnection.as | 3 ++ 3 files changed, 43 insertions(+), 5 deletions(-) diff --git a/halcyon.mxml b/halcyon.mxml index 49f5f6d4..8e9d2e2b 100755 --- a/halcyon.mxml +++ b/halcyon.mxml @@ -7,20 +7,40 @@ horizontalAlign="center" addedToStage="initApp()"> + + + + + - - - - - + + + + + + + diff --git a/net/systemeD/halcyon/connection/Connection.as b/net/systemeD/halcyon/connection/Connection.as index 9cfa9ecb..6fad3e0f 100755 --- a/net/systemeD/halcyon/connection/Connection.as +++ b/net/systemeD/halcyon/connection/Connection.as @@ -38,6 +38,10 @@ package net.systemeD.halcyon.connection { public function getEnvironment(responder:Responder):void {} // connection events + public static var LOAD_STARTED:String = "load_started"; + public static var LOAD_COMPLETED:String = "load_completed"; + public static var SAVE_STARTED:String = "save_started"; + public static var SAVE_COMPLETED:String = "save_completed"; public static var NEW_NODE:String = "new_node"; public static var NEW_WAY:String = "new_way"; public static var NEW_RELATION:String = "new_relation"; diff --git a/net/systemeD/halcyon/connection/XMLConnection.as b/net/systemeD/halcyon/connection/XMLConnection.as index 2d05fb26..0fa1c6b5 100644 --- a/net/systemeD/halcyon/connection/XMLConnection.as +++ b/net/systemeD/halcyon/connection/XMLConnection.as @@ -38,6 +38,7 @@ package net.systemeD.halcyon.connection { var mapLoader:URLLoader = new URLLoader(); mapLoader.addEventListener(Event.COMPLETE, loadedMap); mapLoader.load(mapRequest); + dispatchEvent(new Event(LOAD_STARTED)); } private function parseTags(tagElements:XMLList):Object { @@ -48,6 +49,8 @@ package net.systemeD.halcyon.connection { } private function loadedMap(event:Event):void { + dispatchEvent(new Event(LOAD_COMPLETED)); + var map:XML = new XML(URLLoader(event.target).data); var id:Number; var version:uint; -- 2.30.1