home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FCE Gold Plus
/
GOLD.iso
/
pc
/
shell.swf
/
scripts
/
__Packages
/
com
/
screen
/
ScreenFactory.as
< prev
next >
Wrap
Text File
|
2007-10-16
|
2KB
|
61 lines
class com.screen.ScreenFactory
{
function ScreenFactory()
{
this.c_hQuestionState = new com.util.HashMap();
}
function showScreen(_strScreenName, _objScreenData, _objSourceRef, _blnPersist)
{
var _loc1_ = this;
var _loc2_ = _objSourceRef;
var _loc3_ = _objScreenData;
switch(_strScreenName)
{
case "Login":
_loc1_.c_objLogin = new com.screen.Login();
_loc1_.c_objLogin.init(_loc3_,_loc2_);
if(!_blnPersist)
{
delete _loc1_.c_objLogin;
}
break;
case "TestSelect":
var objTestSelector = new com.screen.TestSelector();
objTestSelector.init(_loc3_,_loc2_);
break;
case "Test":
var c_objTest = new com.screen.Test();
c_objTest.init(_loc3_,_loc2_);
break;
case "Instruction":
_loc1_.c_objInstruction = new com.screen.Instruction();
_loc1_.c_objInstruction.init(_loc3_,_loc2_);
if(!_blnPersist)
{
delete _loc1_.c_objInstruction;
}
break;
case "ShowResult":
var c_objShowResult = new com.screen.Result(_level101);
_loc1_.__set__resultInstance(c_objShowResult);
c_objShowResult.init(_loc3_,_loc2_);
break;
case "TestSound":
var c_objCheckSound = new com.screen.CheckSound(_level101);
c_objCheckSound.init(_loc3_,_loc2_);
}
}
function showQuestion(_strQuesType, _iQuestionNo)
{
this.c_objTest.init(_strQuesType,_iQuestionNo);
}
function set resultInstance(_objInstance)
{
this.c_objResultInstance = _objInstance;
}
function get resultInstance()
{
return this.c_objResultInstance;
}
}