Index: lams_central/src/flash/org/lamsfoundation/lams/authoring/Application.as =================================================================== diff -u -r2660b217f8c29774a7c8c1bf737ebfaccb8af022 -r4284f9cbedf81a91845057886de8d3cc6d18d8d5 --- lams_central/src/flash/org/lamsfoundation/lams/authoring/Application.as (.../Application.as) (revision 2660b217f8c29774a7c8c1bf737ebfaccb8af022) +++ lams_central/src/flash/org/lamsfoundation/lams/authoring/Application.as (.../Application.as) (revision 4284f9cbedf81a91845057886de8d3cc6d18d8d5) @@ -92,26 +92,16 @@ private var _toolbar:Toolbar; private var _toolkit:Toolkit; private var _canvas:Canvas; - private var _workspace:Workspace; - private var _comms:Communication; - private var _themeManager:ThemeManager; - private var _dictionary:Dictionary; - private var _config:Config; + private var _workspace:Workspace; private var _debugDialog:MovieClip; //Reference to the debug dialog - private var _appRoot_mc:MovieClip; //Application root clip private var _dialogueContainer_mc:MovieClip; //Dialog container private var _tooltipContainer_mc:MovieClip; //Tooltip container private var _cursorContainer_mc:MovieClip; //Cursor container private var _menu_mc:MovieClip; //Menu bar clip private var _container_mc:MovieClip; //Main container - //Data flags - private var _dictionaryLoaded:Boolean; //Dictionary loaded flag - private var _dictionaryEventDispatched:Boolean //Event status flag - private var _themeLoaded:Boolean; //Theme loaded flag - private var _themeEventDispatched:Boolean //Dictionary loaded flag private var _UILoadCheckIntervalID:Number; //Interval ID for periodic check on UILoad status private var _UILoaded:Boolean; //UI Loading status @@ -136,12 +126,8 @@ * Application - Constructor */ private function Application(){ - super(); + super(this); - _themeLoaded = false; - _themeEventDispatched = false; - _dictionaryLoaded = false; - _dictionaryEventDispatched = false; _toolkitLoaded = false; _canvasLoaded = false; _menuLoaded = false; @@ -173,13 +159,9 @@ Cursor.addCursor(C_GATE); Cursor.addCursor(C_GROUP); - - //Comms object - do this before any objects are created that require it for server communication - _comms = new Communication(); - - //Get the instance of config class + //Get the instance of config class _config = Config.getInstance(); - + //Assign the config load event to _config.addEventListener('load',Delegate.create(this,configLoaded)); @@ -222,33 +204,7 @@ } - /** - * Called when Dictionary loaded - * @param evt:Object the event object - */ - private function onDictionaryLoad(evt:Object){ - if(evt.type=='load'){ - _dictionaryLoaded = true; - Debugger.log('Dictionary loaded :',Debugger.CRITICAL,'onDictionaryLoad','Application'); - } else { - Debugger.log('event type not recognised :'+evt.type,Debugger.CRITICAL,'onDictionaryLoad','Application'); - } - } - /** - * Called when the current selected theme has been loaded - * @param evt:Object the event object - */ - private function onThemeLoad(evt:Object) { - if(evt.type=='load'){ - _themeLoaded = true; - Debugger.log('!Theme loaded :',Debugger.CRITICAL,'onThemeLoad','Application'); - } else { - Debugger.log('event type not recognised :'+evt.type,Debugger.CRITICAL,'onThemeLoad','Application'); - } - - } - /** * Periodically checks if data has been loaded */ @@ -682,38 +638,8 @@ return _workspace; } - /** - * returns the the Comms instance - */ - public function getComms():Communication{ - return _comms; - } + - /** - * returns the the Dictionary instance - */ - public function getDictionary():Dictionary{ - return _dictionary; - } - - /** - * Returns the Application root, use as _root would be used - * - * @usage Import authoring package and then use as root e.g. - * - * import org.lamsfoundation.lams.authoring; - * Application.root.attachMovie('myLinkageId','myInstanceName',depth); - */ - static function get root():MovieClip { - //Return root if valid otherwise raise a big system error as app. will not work without it - if(_instance._appRoot_mc != undefined) { - return _instance._appRoot_mc; - } else { - //TODO DI 11/05/05 Raise error if _appRoot hasn't been created - - } - } - /** * Returns the Dialogue conatiner mc * Index: lams_central/src/flash/org/lamsfoundation/lams/learner/Application.as =================================================================== diff -u -r2660b217f8c29774a7c8c1bf737ebfaccb8af022 -r4284f9cbedf81a91845057886de8d3cc6d18d8d5 --- lams_central/src/flash/org/lamsfoundation/lams/learner/Application.as (.../Application.as) (revision 2660b217f8c29774a7c8c1bf737ebfaccb8af022) +++ lams_central/src/flash/org/lamsfoundation/lams/learner/Application.as (.../Application.as) (revision 4284f9cbedf81a91845057886de8d3cc6d18d8d5) @@ -22,7 +22,8 @@ */ import org.lamsfoundation.lams.common.comms.* //communications -import org.lamsfoundation.lams.common.util.*; // utilities +import org.lamsfoundation.lams.common.util.*; // utilities +import org.lamsfoundation.lams.common.ui.*; // ui import org.lamsfoundation.lams.common.*; import org.lamsfoundation.lams.learner.ls.*; import org.lamsfoundation.lams.learner.lb.*; @@ -35,10 +36,10 @@ class org.lamsfoundation.lams.learner.Application extends ApplicationParent { // private constants - private var _comms:Communication; + //private var _comms:Communication; private var _seqLib:Library; - private var _appRoot_mc:MovieClip; //Application root clip + //private var _appRoot_mc:MovieClip; //Application root clip private static var LIBRARY_X:Number = 0; @@ -70,8 +71,9 @@ * Application - Constructor */ private function Application(){ - trace('Begin Application...'); - trace("appInt: " + ApplicationParent.C_DEFAULT); + super(this); + + trace('Begin Application...'); _seqLibLoaded = false; _seqLibEventDispatched = false; @@ -100,7 +102,7 @@ Cursor.addCursor(C_HOURGLASS); //Comms object - do this before any objects are created that require it for server communication - _comms = new Communication(); + //_comms = new Communication(); setupUI(); checkUILoaded(); @@ -238,9 +240,9 @@ /** * returns the the Comms instance - */ - public function getComms():Communication{ - return _comms; - } - + * + *public function getComms():Communication{ + * return _comms; + *} + */ } \ No newline at end of file