Packageorg.wak.dialog
Classpublic class DialogManager
InheritanceDialogManager Inheritance flash.events.EventDispatcher

Manager of all the dialogs in the adventure.



Public Methods
 MethodDefined by
  
DialogManager(pLayer:Sprite, pAdvStyle:String)
Constructor.
DialogManager
  
CharacterSay(pCharId:String, pText:String, pOnComplete:Function = null):void
Makes a character say something.
DialogManager
  
DisplayInfo(pText:String, pOnCompleteFunc:Function = null):void
Display a dialgo with an information message.
DialogManager
  
GetDialog(pDialogId:String):AdventureDialog
Get an AdvenureDialog by its id.
DialogManager
  
Initialize(pDialogSettings:XML):void
Initialize the Dialog manager
DialogManager
  
LoadDialogs(pXMLItemsDef:XML):void
Loads the dialogs from xml
DialogManager
  
SetOptionVisible(pDialogId:String, pTopicId:String, value:Boolean):void
DialogManager
  
StartDialog(pDialogId:String):void
Starts a dialog
DialogManager
  
UpdateScroll():void
DialogManager
Constructor detail
DialogManager()constructor
public function DialogManager(pLayer:Sprite, pAdvStyle:String)

Constructor.

Parameters
pLayer:Sprite — The DisplayObject layer where the dialogs will be drawn.
 
pAdvStyle:String — the type of the adventure to choose the apropiate interface.
Method detail
CharacterSay()method
public function CharacterSay(pCharId:String, pText:String, pOnComplete:Function = null):void

Makes a character say something.

Parameters
pCharId:String — The character speaker.
 
pText:String — the text to say.
 
pOnComplete:Function (default = null) — function reference to call when the task is completed.
DisplayInfo()method 
public function DisplayInfo(pText:String, pOnCompleteFunc:Function = null):void

Display a dialgo with an information message.

Parameters
pText:String — The message to display.
 
pOnCompleteFunc:Function (default = null) — callback function for when the message display ends.
GetDialog()method 
public function GetDialog(pDialogId:String):AdventureDialog

Get an AdvenureDialog by its id.

Parameters
pDialogId:String — String with dialog id.

Returns
AdventureDialog — the AdventureDialog with the id in pDialogId.
Initialize()method 
public function Initialize(pDialogSettings:XML):void

Initialize the Dialog manager

Parameters
pDialogSettings:XML
LoadDialogs()method 
public function LoadDialogs(pXMLItemsDef:XML):void

Loads the dialogs from xml

Parameters
pXMLItemsDef:XML — input xml with the dialogs.
SetOptionVisible()method 
public function SetOptionVisible(pDialogId:String, pTopicId:String, value:Boolean):voidParameters
pDialogId:String
 
pTopicId:String
 
value:Boolean
StartDialog()method 
public function StartDialog(pDialogId:String):void

Starts a dialog

Parameters
pDialogId:String — dialog id to start.
UpdateScroll()method 
public function UpdateScroll():void