com.theoworlds.TheoChat

com.theoworlds.TheoChat

TheoChatUI class - TheoChat application main class

Version

1.0

Author

© TheoWorlds.com, 2007-2008.

Summary
com.theoworlds.TheoChatTheoChatUI class - TheoChat application main class
Variables
_ui
_iCharacterSettingssaves the settings on the main character (“I”) when the chat is launched or when switching maps
_teleportsaves the settings of the teleport location (“door” to another map) destRoom:Number; destTile:Point; destDir:Number;
_socketName“SF”,”ES”
_socket
_login
_roomList
_charactersLibraries
Functions
TheoChatConstructor.
onMouseDown
init
initUI
initSocket
onParsedMapXMLLibrary
characterSelectionModethis function is used just when joining initially the chat and defining the main character settings (look)
connect
uiHandler
updateUserList<{data:String, label:String}>Array - data for component List data - user.netID label - user.name
getRoomListForUI<{data:String, label:String}>Array - data for component List data - room name label - room name + users current number
socketHandler
worldHandler
getNewChatColorForCharater

Variables

_ui

private var _ui: TheoChatUI

_iCharacterSettings

private var _iCharacterSettings: CharacterSettings

saves the settings on the main character (“I”) when the chat is launched or when switching maps

_teleport

private var _teleport: FurnitureSettings

saves the settings of the teleport location (“door” to another map) destRoom:Number; destTile:Point; destDir:Number;

_socketName

private var _socketName: String

”SF”,”ES”

_socket

private var _socket: IServer

_login

private var _login: String

_roomList

private var _roomList: Array

_charactersLibraries

private var _charactersLibraries: Array

Functions

TheoChat

public function TheoChat(gui: TheoChatUI)

Constructor.  Gets the link to the UI object as the single parametter

Parameters

param gui:UI (UI)

onMouseDown

function onMouseDown():Void

init

private function init():Void

initUI

private function initUI():Void

initSocket

private function initSocket():Void

onParsedMapXMLLibrary

private function onParsedMapXMLLibrary():Void

characterSelectionMode

private function characterSelectionMode(mc: MovieClip):Void

this function is used just when joining initially the chat and defining the main character settings (look)

Parameters

mc- the UI window in which the character will be selected TheoChat manages it directly can be re-coded to use the events, but this way is easier and faster

connect

private function connect():Void

uiHandler

private function uiHandler(o: Object):Void

updateUserList

private function updateUserList():Array

Returns

<{data:String, label:String}>Array - data for component List data - user.netID label - user.name

getRoomListForUI

private function getRoomListForUI():Array

Returns

<{data:String, label:String}>Array - data for component List data - room name label - room name + users current number

socketHandler

private function socketHandler(o: Object):Void

worldHandler

private function worldHandler(o: Object):Void

getNewChatColorForCharater

private function getNewChatColorForCharater():Number
TheoApp class -- basic Theo application class.
private var _ui: TheoChatUI
private var _iCharacterSettings: CharacterSettings
saves the settings on the main character (“I”) when the chat is launched or when switching maps
private var _teleport: FurnitureSettings
saves the settings of the teleport location (“door” to another map) destRoom:Number; destTile:Point; destDir:Number;
private var _socketName: String
“SF”,”ES”
private var _socket: IServer
private var _login: String
private var _roomList: Array
private var _charactersLibraries: Array
public function TheoChat(gui: TheoChatUI)
Constructor.
function onMouseDown():Void
private function init():Void
private function initUI():Void
private function initSocket():Void
private function onParsedMapXMLLibrary():Void
private function characterSelectionMode(mc: MovieClip):Void
this function is used just when joining initially the chat and defining the main character settings (look)
private function connect():Void
private function uiHandler(o: Object):Void
private function updateUserList():Array
<{data:String, label:String}>Array - data for component List data - user.netID label - user.name
private function getRoomListForUI():Array
<{data:String, label:String}>Array - data for component List data - room name label - room name + users current number
private function socketHandler(o: Object):Void
private function worldHandler(o: Object):Void
private function getNewChatColorForCharater():Number
Close