home *** CD-ROM | disk | FTP | other *** search
/ FCE Gold Plus / GOLD.iso / pc / fscommand / linux / main.swf / scripts / __Packages / com / screen / ScreenFactory.as < prev    next >
Encoding:
Text File  |  2007-09-06  |  1.9 KB  |  64 lines

  1. class com.screen.ScreenFactory
  2. {
  3.    var c_hQuestionState;
  4.    var c_objTest;
  5.    var c_objResultInstance;
  6.    function ScreenFactory()
  7.    {
  8.       this.c_hQuestionState = new com.util.HashMap();
  9.    }
  10.    function showScreen(_strScreenName, _objScreenData, _objSourceRef, _blnPersist)
  11.    {
  12.       var _loc1_ = this;
  13.       var _loc2_ = _objSourceRef;
  14.       var _loc3_ = _objScreenData;
  15.       switch(_strScreenName)
  16.       {
  17.          case "Login":
  18.             _loc1_.c_objLogin = new com.screen.Login();
  19.             _loc1_.c_objLogin.init(_loc3_,_loc2_);
  20.             if(!_blnPersist)
  21.             {
  22.                delete _loc1_.c_objLogin;
  23.             }
  24.             break;
  25.          case "TestSelect":
  26.             var objTestSelector = new com.screen.TestSelector();
  27.             objTestSelector.init(_loc3_,_loc2_);
  28.             break;
  29.          case "Test":
  30.             var c_objTest = new com.screen.Test();
  31.             c_objTest.init(_loc3_,_loc2_);
  32.             break;
  33.          case "Instruction":
  34.             _loc1_.c_objInstruction = new com.screen.Instruction();
  35.             _loc1_.c_objInstruction.init(_loc3_,_loc2_);
  36.             if(!_blnPersist)
  37.             {
  38.                delete _loc1_.c_objInstruction;
  39.             }
  40.             break;
  41.          case "ShowResult":
  42.             var c_objShowResult = new com.screen.Result(_level101);
  43.             _loc1_.resultInstance = c_objShowResult;
  44.             c_objShowResult.init(_loc3_,_loc2_);
  45.             break;
  46.          case "TestSound":
  47.             var c_objCheckSound = new com.screen.CheckSound(_level101);
  48.             c_objCheckSound.init(_loc3_,_loc2_);
  49.       }
  50.    }
  51.    function showQuestion(_strQuesType, _iQuestionNo)
  52.    {
  53.       this.c_objTest.init(_strQuesType,_iQuestionNo);
  54.    }
  55.    function set resultInstance(_objInstance)
  56.    {
  57.       this.c_objResultInstance = _objInstance;
  58.    }
  59.    function get resultInstance()
  60.    {
  61.       return this.c_objResultInstance;
  62.    }
  63. }
  64.