home *** CD-ROM | disk | FTP | other *** search
/ FCE Gold Plus / GOLD.iso / pc / shell.swf / scripts / __Packages / com / screen / ScreenFactory.as < prev    next >
Text File  |  2007-10-16  |  2KB  |  61 lines

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