com.theoworlds.TheoApp |
TheoApp class -- basic Theo application class. All other Theo apps should extend it
1.0
© TheoWorlds.com, 2007--2008.
| com. | TheoApp class -- basic Theo application class. |
| Variables | |
| _confInstance | |
| _ui | |
| _worldTargetMC | |
| _world | |
| _worldLogic | |
| _worldDelegates | |
| _mapXML | this object is used for loading and parcing the map XML. |
| _library | loads, parces and manages the libraries data |
| Functions | |
| TheoApp | Constructor. |
| initUI | UI initialization -- to be implemented in the child classes |
| initConfig | loads the configuration XML |
| onLoadedConfig | event generated at the end of the loading and parcing of the config.xml file |
| init | called after the parcing of config.xml. |
| loadMapXML | loads the XML of a given map |
| onLoadXMLMap | event generated when the map XML is loaded |
| onParsedMapXMLLibrary | event generated when the map XML is parsed |
| parseMapXMLLibrary | this function does: 1 -- “finds” the <library> tag in the XML of the map, and parses it 2 -- creates a new object (Library) 3 -- generates an event when the parcing is over -- this.onParsedMapXMLLibrary(); |
| parseMapXML | Parses the loaded XML of a map |
| createNewWorld | this function does: 1 -- destroys the old World 2 -- creates a new one (if there is no UI -- directly in the _root) |
| getNewChatColorForCharater | |
| uiHandler | to be implemented in the child classes |
| worldLogicHandler | |
| worldHandler | |
| onMouseDown | |
| destroyWorld | destroys the World |
private function parseMapXMLLibrary():Void
this function does: 1 -- “finds” the <library> tag in the XML of the map, and parses it 2 -- creates a new object (Library) 3 -- generates an event when the parcing is over -- this.onParsedMapXMLLibrary();
private var _confInstance: Config
private var _ui: ITheoUI
private var _worldTargetMC: MovieClip
private var _world: World
private var _worldLogic: WorldLogic
private var _worldDelegates: Array
this object is used for loading and parcing the map XML.
private var _mapXML: XML
loads, parces and manages the libraries data
private var _library: Library
Constructor.
function TheoApp( gui )
UI initialization -- to be implemented in the child classes
private function initUI():Void
loads the configuration XML
private function initConfig():Void
event generated at the end of the loading and parcing of the config.xml file
private function onLoadedConfig( event: Object ):Void
called after the parcing of config.xml.
private function init():Void
loads the XML of a given map
private function loadMapXML( url: String ):Void
event generated when the map XML is loaded
private function onLoadXMLMap( success: Boolean ):Void
event generated when the map XML is parsed
private function onParsedMapXMLLibrary():Void
this function does: 1 -- “finds” the <library> tag in the XML of the map, and parses it 2 -- creates a new object (Library) 3 -- generates an event when the parcing is over -- this.onParsedMapXMLLibrary();
private function parseMapXMLLibrary():Void
Parses the loaded XML of a map
private function parseMapXML():Object
this function does: 1 -- destroys the old World 2 -- creates a new one (if there is no UI -- directly in the _root)
private function createNewWorld( mapInfo: Object ):Void
private function getNewChatColorForCharater():Number
to be implemented in the child classes
private function uiHandler( o: Object ):Void
private function worldLogicHandler( o: Object ):Void
private function worldHandler( o: Object ):Void
function onMouseDown():Void
destroys the World
private function destroyWorld():Void