home *** CD-ROM | disk | FTP | other *** search
/ Champak 48 / cdrom_image.iso / Games / miffysamegame.swf / scripts / frame_2 / DoAction.as
Encoding:
Text File  |  2007-09-27  |  39.2 KB  |  1,305 lines

  1. GS_Intro = new Object();
  2. GS_Intro.enter = function()
  3. {
  4.    mLog("entering GS_Intro");
  5.    stop();
  6. };
  7. GS_Intro.exit = function()
  8. {
  9.    mLog("exiting GS_Intro");
  10. };
  11. GS_Intro.eventNotify = function(event, obj)
  12. {
  13.    var _loc1_ = null;
  14.    var _loc0_ = null;
  15.    if(typeof (_loc0_ = event) != typeof (_loc1_ = OnStop) ? false : _loc0_ == _loc1_)
  16.    {
  17.       play();
  18.    }
  19. };
  20. GS_CharacterSelect1 = new Object();
  21. GS_CharacterSelect1.enter = function()
  22. {
  23.    mLog("entering GS_CharacterSelect1");
  24.    init();
  25.    this.isRollOverOk = false;
  26.    allGoTo("button_1");
  27.    playSoundClip("s1_intro",false);
  28.    iDelayer.addDelayedEvent(90,OnPlaySound,"s2_intro");
  29.    iDelayer.addDelayedEvent(150,OnTimeOut);
  30. };
  31. GS_CharacterSelect1.exit = function()
  32. {
  33.    mLog("exiting GS_CharacterSelect1");
  34.    playSoundClip("s3_intro");
  35.    iDelayer.removeEvent(OnPlaySound);
  36. };
  37. GS_CharacterSelect1.eventNotify = function(event, obj)
  38. {
  39.    var _loc1_ = null;
  40.    var _loc0_ = null;
  41.    if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnCharacterSelect) ? false : _loc0_ == _loc1_))
  42.    {
  43.       if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnCharacterRoll) ? false : _loc0_ == _loc1_))
  44.       {
  45.          if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnAudioTimeout) ? false : _loc0_ == _loc1_))
  46.          {
  47.             if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnPlaySound) ? false : _loc0_ == _loc1_))
  48.             {
  49.                if(typeof (_loc0_ = event) != typeof (_loc1_ = OnTimeOut) ? false : _loc0_ == _loc1_)
  50.                {
  51.                   this.isRollOverOk = true;
  52.                }
  53.             }
  54.             else
  55.             {
  56.                playSoundClip(obj);
  57.                if(obj eq "s2_intro")
  58.                {
  59.                   iDelayer.addDelayedEvent(900,OnPlaySound,"s2_intro");
  60.                }
  61.             }
  62.          }
  63.          else
  64.          {
  65.             this.isRollOverOk = true;
  66.          }
  67.       }
  68.       else if(this.isRollOverOk)
  69.       {
  70.          if(obj.myIndex == BORIS_INDEX)
  71.          {
  72.             playSoundClip("sBoris");
  73.             this.isRollOverOk = false;
  74.             iDelayer.addDelayedEvent(12,OnAudioTimeout);
  75.          }
  76.          else if(obj.myIndex == MIFFY_INDEX)
  77.          {
  78.             playSoundClip("sMiffy");
  79.             this.isRollOverOk = false;
  80.             iDelayer.addDelayedEvent(12,OnAudioTimeout);
  81.          }
  82.          else if(obj.myIndex == POPPY_INDEX)
  83.          {
  84.             playSoundClip("sPoppy");
  85.             this.isRollOverOk = false;
  86.             iDelayer.addDelayedEvent(12,OnAudioTimeout);
  87.          }
  88.          else if(obj.myIndex == SNUFFY_INDEX)
  89.          {
  90.             playSoundClip("sSnuffy");
  91.             this.isRollOverOk = false;
  92.             iDelayer.addDelayedEvent(12,OnAudioTimeout);
  93.          }
  94.       }
  95.    }
  96.    else
  97.    {
  98.       mLog("selecting Character = " + obj);
  99.       selectCharacter(obj);
  100.       switchState(GS_CharacterSelect2);
  101.    }
  102. };
  103. GS_CharacterSelect2 = new Object();
  104. GS_CharacterSelect2.enter = function()
  105. {
  106.    mLog("entering GS_CharacterSelect2");
  107.    this.isRollOverOk = false;
  108.    iDelayer.addDelayedEvent(20,OnPlaySound,"s4_intro");
  109.    iDelayer.addDelayedEvent(95,OnAudioTimeOut);
  110. };
  111. GS_CharacterSelect2.exit = function()
  112. {
  113.    mLog("exiting GS_CharacterSelect2");
  114.    iDelayer.removeEvent(OnPlaySound);
  115.    playSoundClip("s5_intro");
  116. };
  117. GS_CharacterSelect2.eventNotify = function(event, obj)
  118. {
  119.    var _loc1_ = null;
  120.    var _loc0_ = null;
  121.    if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnCharacterSelect) ? false : _loc0_ == _loc1_))
  122.    {
  123.       if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnPlaySound) ? false : _loc0_ == _loc1_))
  124.       {
  125.          if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnCharacterRoll) ? false : _loc0_ == _loc1_))
  126.          {
  127.             if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnAudioTimeout) ? false : _loc0_ == _loc1_))
  128.             {
  129.                if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnTimeOut) ? false : _loc0_ == _loc1_))
  130.                {
  131.                   mLog("unkown event " + event);
  132.                }
  133.             }
  134.             else
  135.             {
  136.                this.isRollOverOk = true;
  137.             }
  138.          }
  139.          else if(this.isRollOverOk)
  140.          {
  141.             if(obj.myIndex == BORIS_INDEX)
  142.             {
  143.                playSoundClip("sBoris");
  144.                this.isRollOverOk = false;
  145.                iDelayer.addDelayedEvent(12,OnAudioTimeout);
  146.             }
  147.             else if(obj.myIndex == MIFFY_INDEX)
  148.             {
  149.                playSoundClip("sMiffy");
  150.                this.isRollOverOk = false;
  151.                iDelayer.addDelayedEvent(12,OnAudioTimeout);
  152.             }
  153.             else if(obj.myIndex == POPPY_INDEX)
  154.             {
  155.                playSoundClip("sPoppy");
  156.                this.isRollOverOk = false;
  157.                iDelayer.addDelayedEvent(12,OnAudioTimeout);
  158.             }
  159.             else if(obj.myIndex == SNUFFY_INDEX)
  160.             {
  161.                playSoundClip("sSnuffy");
  162.                this.isRollOverOk = false;
  163.                iDelayer.addDelayedEvent(12,OnAudioTimeout);
  164.             }
  165.          }
  166.       }
  167.       else
  168.       {
  169.          playSoundClip(obj);
  170.          if(obj eq "s4_intro")
  171.          {
  172.             iDelayer.addDelayedEvent(900,OnPlaySound,"s4_intro");
  173.          }
  174.       }
  175.    }
  176.    else
  177.    {
  178.       mLog("selecting Character = " + obj);
  179.       selectCharacter(obj);
  180.       switchState(GS_Transition1);
  181.    }
  182. };
  183. GS_Transition1 = new Object();
  184. GS_Transition1.enter = function()
  185. {
  186.    mLog("entering GS_Transition1");
  187.    this.hasAnimated = false;
  188. };
  189. GS_Transition1.exit = function()
  190. {
  191.    mLog("exiting GS_Transition1");
  192. };
  193. GS_Transition1.eventNotify = function(event, obj)
  194. {
  195.    var _loc1_ = null;
  196.    var _loc0_ = null;
  197.    if(typeof (_loc0_ = event) != typeof (_loc1_ = OnStop) ? false : _loc0_ == _loc1_)
  198.    {
  199.       if(this.hasAnimated == false)
  200.       {
  201.          this.animate();
  202.       }
  203.       gotoAndPlay(96);
  204.    }
  205. };
  206. GS_Transition1.animate = function()
  207. {
  208.    this.hasAnimated = true;
  209.    swapForStatic(SelectedCharacters[0]);
  210.    swapForStatic(SelectedCharacters[1]);
  211.    var tween1 = new Object();
  212.    var tween2 = new Object();
  213.    tween1.mc = SelectedCharacters[0];
  214.    tween1.x = 265;
  215.    tween1.y = 147;
  216.    tween1.scale = 125;
  217.    tween1.frames = 18;
  218.    tween1.delay = 5;
  219.    tween2.mc = SelectedCharacters[1];
  220.    tween2.x = 512.3;
  221.    tween2.y = 147;
  222.    tween2.scale = 125;
  223.    tween2.frames = 18;
  224.    tween2.delay = 5;
  225.    iTween.addTween(tween1);
  226.    iTween.addTween(tween2);
  227.    var i = 0;
  228.    while(i < AllCharacters.length)
  229.    {
  230.       var mc = AllCharacters[i];
  231.       if(mc != SelectedCharacters[0] && mc != SelectedCharacters[1])
  232.       {
  233.          mc.gotoAndPlay("popOff");
  234.       }
  235.       i++;
  236.    }
  237. };
  238. GS_DisplayItems = new Object();
  239. GS_DisplayItems.enter = function()
  240. {
  241.    mLog("entering GS_DisplayItems");
  242.    playSoundClip("sTrillUpShort",false);
  243.    if(CurrentRound == undefined)
  244.    {
  245.       CurrentRound = 1;
  246.    }
  247.    else
  248.    {
  249.       CurrentRound++;
  250.    }
  251.    this.displayItems();
  252. };
  253. GS_DisplayItems.exit = function()
  254. {
  255.    mLog("exiting GS_DisplayItems");
  256. };
  257. GS_DisplayItems.eventNotify = function(event, obj)
  258. {
  259.    var _loc1_ = null;
  260.    var _loc0_ = null;
  261.    if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnDisplayItem) ? false : _loc0_ == _loc1_))
  262.    {
  263.       if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnTimeOut) ? false : _loc0_ == _loc1_))
  264.       {
  265.          if(typeof (_loc0_ = event) != typeof (_loc1_ = OnSwitchState) ? false : _loc0_ == _loc1_)
  266.          {
  267.             switchState(GS_AskIfSame);
  268.          }
  269.       }
  270.       else
  271.       {
  272.          mLog("timeout");
  273.       }
  274.    }
  275.    else
  276.    {
  277.       obj.gotoAndPlay("PopOn");
  278.    }
  279. };
  280. ItemMax = 5;
  281. ItemMin = 1;
  282. YStart = 208;
  283. YIncrement = 45;
  284. XLeftStart = 358;
  285. XRightStart = 420;
  286. FrameIncrement = 3;
  287. FramesBetween = 5;
  288. FramesTillStart = 0;
  289. GS_DisplayItems.displayItems = function()
  290. {
  291.    if(LeftItems == undefined)
  292.    {
  293.       LeftItems = new Array();
  294.    }
  295.    else
  296.    {
  297.       while(0 < LeftItems.length)
  298.       {
  299.          var mc = LeftItems.pop();
  300.          mc.removeMovieClip();
  301.       }
  302.    }
  303.    if(RightItems == undefined)
  304.    {
  305.       RightItems = new Array();
  306.    }
  307.    else
  308.    {
  309.       while(0 < RightItems.length)
  310.       {
  311.          var mc = RightItems.pop();
  312.          mc.removeMovieClip();
  313.       }
  314.    }
  315.    libItem = "lItem" + SelectedItem;
  316.    var multiplier = ItemMax - ItemMin + 1;
  317.    if(currentRound == 1)
  318.    {
  319.       var leftCount = ItemMin + Math.floor(Math.random() * multiplier);
  320.       var rightCount = ItemMin + Math.floor(Math.random() * multiplier);
  321.       if(rightCount < leftCount)
  322.       {
  323.          isLeftMaster = true;
  324.          masterCount = leftCount;
  325.       }
  326.       else
  327.       {
  328.          isLeftMaster = false;
  329.          masterCount = rightCount;
  330.       }
  331.    }
  332.    else if(currentRound >= 3)
  333.    {
  334.       leftCount = masterCount;
  335.       rightCount = masterCount;
  336.    }
  337.    else if(isLeftMaster)
  338.    {
  339.       leftCount = masterCount;
  340.       rightCount = ItemMin + Math.floor(Math.random() * multiplier);
  341.    }
  342.    else
  343.    {
  344.       leftCount = ItemMin + Math.floor(Math.random() * multiplier);
  345.       rightCount = masterCount;
  346.    }
  347.    mLog("CurrentRound = " + CurrentRound);
  348.    this.placeItems(LeftItems,leftCount,XLeftStart,libItem);
  349.    this.placeItems(RightItems,rightCount,XRightStart,libItem);
  350.    var i = 0;
  351.    while(i < LeftItems.length)
  352.    {
  353.       var delay = i * FrameIncrement + 1;
  354.       iDelayer.addDelayedEvent(delay,onDisplayItem,LeftItems[i]);
  355.       i++;
  356.    }
  357.    var i = 0;
  358.    while(i < RightItems.length)
  359.    {
  360.       var delay = (i + LeftItems.length) * FrameIncrement + FramesBetween + 1;
  361.       iDelayer.addDelayedEvent(delay,onDisplayItem,RightItems[i]);
  362.       i++;
  363.    }
  364.    var numItemsCreated = LeftItems.length + RightItems.length;
  365.    var delay = numItemsCreated * FrameIncrement + FramesBetween + FramesTillStart;
  366.    iDelayer.addDelayedEvent(delay,OnSwitchState);
  367. };
  368. GS_DisplayItems.placeItems = function(itemArray, numItems, xStart, libItem)
  369. {
  370.    var yLast = YStart;
  371.    while(0 < numItems)
  372.    {
  373.       var mc = attachMC(libItem);
  374.       mc._x = xStart;
  375.       mc._y = yLast;
  376.       itemArray.push(mc);
  377.       yLast -= YIncrement;
  378.       numItems--;
  379.    }
  380. };
  381. GS_AskIfSame = new Object();
  382. GS_AskIfSame.enter = function()
  383. {
  384.    mLog("enetering GS_AskIfSame");
  385.    this.SentanceParts = new Array();
  386.    if(CurrentRound == 1)
  387.    {
  388.       this.SentanceParts.push(eval("iS1a" + SelectedCharacterNames[0] + SelectedCharacterNames[1]));
  389.       this.SentanceParts.push(eval("iS1b" + SelectedItem));
  390.       eventNotify(OnSoundStop);
  391.    }
  392.    else
  393.    {
  394.       playSoundClip("s1d");
  395.       iDelayer.addDelayedEvent(50,OnSoundStop);
  396.    }
  397. };
  398. GS_AskIfSame.exit = function()
  399. {
  400. };
  401. GS_AskIfSame.eventNotify = function(event, obj)
  402. {
  403.    var _loc1_ = null;
  404.    var _loc0_ = null;
  405.    if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnSoundStop) ? false : _loc0_ == _loc1_))
  406.    {
  407.       if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnSwitchState) ? false : _loc0_ == _loc1_))
  408.       {
  409.          if(typeof (_loc0_ = event) != typeof (_loc1_ = OnTimeOut) ? false : _loc0_ == _loc1_)
  410.          {
  411.             mLog("timeout");
  412.          }
  413.       }
  414.       else
  415.       {
  416.          switchState(obj);
  417.       }
  418.    }
  419.    else if(0 < this.SentanceParts.length)
  420.    {
  421.       var snd = this.SentanceParts.shift();
  422.       snd.play();
  423.       this.currentPlay = snd;
  424.    }
  425.    else if(LeftItems.length == RightItems.length)
  426.    {
  427.       iDelayer.addDelayedEvent(20,OnSwitchState,GS_GamePlaySame);
  428.    }
  429.    else
  430.    {
  431.       iDelayer.addDelayedEvent(20,OnSwitchState,GS_GamePlayDiff);
  432.    }
  433. };
  434. GS_GamePlayDiff = new Object();
  435. GS_GamePlayDiff.enter = function()
  436. {
  437.    mLog("entering GS_GamePlayDiff");
  438.    this.isRollOverOk = false;
  439.    this.startSpeaking();
  440.    gotoAndPlay(186);
  441. };
  442. GS_GamePlayDiff.startSpeaking = function()
  443. {
  444.    this.SentanceParts = new Array();
  445.    playSoundClip("s2a");
  446.    iDelayer.addDelayedEvent(110,OnPlaySound,"s2b");
  447.    iDelayer.addDelayedEvent(250,OnTimeOut);
  448. };
  449. GS_GamePlayDiff.exit = function()
  450. {
  451.    mLog("exiting GS_GamePlayDiff");
  452. };
  453. GS_GamePlayDiff.instructAgain = function()
  454. {
  455.    this.startSpeaking();
  456. };
  457. GS_GamePlayDiff.eventNotify = function(event, obj)
  458. {
  459.    mLog("event = " + event);
  460.    var _loc1_ = null;
  461.    var _loc0_ = null;
  462.    if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnSoundStop) ? false : _loc0_ == _loc1_))
  463.    {
  464.       if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnPlaySound) ? false : _loc0_ == _loc1_))
  465.       {
  466.          if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnRedRoll) ? false : _loc0_ == _loc1_))
  467.          {
  468.             if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnGreenRoll) ? false : _loc0_ == _loc1_))
  469.             {
  470.                if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnRedPush) ? false : _loc0_ == _loc1_))
  471.                {
  472.                   if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnGreenPush) ? false : _loc0_ == _loc1_))
  473.                   {
  474.                      if(typeof (_loc0_ = event) != typeof (_loc1_ = OnTimeOut) ? false : _loc0_ == _loc1_)
  475.                      {
  476.                         this.isRollOverOk = true;
  477.                      }
  478.                   }
  479.                   else
  480.                   {
  481.                      mLog("OnGreenPush");
  482.                      stopAllSounds();
  483.                      playSoundClip("sAreYouSure");
  484.                      iDelayer.removeEvent(OnPlaySound);
  485.                      iDelayer.removeEvent(OnTimeOut);
  486.                      this.isRollOverOk = false;
  487.                      iDelayer.addDelayedEvent(100,OnTimeOut);
  488.                   }
  489.                }
  490.                else
  491.                {
  492.                   stopAllSounds();
  493.                   playSoundClip("sNotTheSame");
  494.                   iDelayer.removeEvent(OnPlaySound);
  495.                   iDelayer.removeEvent(OnTimeOut);
  496.                   this.isRollOverOk = false;
  497.                   switchState(GS_WhoHasMore);
  498.                }
  499.             }
  500.             else if(this.isRollOverOk)
  501.             {
  502.                stopAllSounds();
  503.                playSoundClip("sGreenRoll");
  504.                iDelayer.removeEvent(OnTimeOut);
  505.                this.isRollOverOk = false;
  506.                iDelayer.addDelayedEvent(40,OnTimeOut);
  507.             }
  508.          }
  509.          else if(this.isRollOverOk)
  510.          {
  511.             stopAllSounds();
  512.             playSoundClip("sRedRoll");
  513.             iDelayer.removeEvent(OnTimeOut);
  514.             this.isRollOverOk = false;
  515.             iDelayer.addDelayedEvent(40,OnTimeOut);
  516.          }
  517.       }
  518.       else
  519.       {
  520.          playSoundClip(obj);
  521.       }
  522.    }
  523.    else
  524.    {
  525.       mLog("OnSoundStop");
  526.    }
  527. };
  528. GS_WhoHasMore = new Object();
  529. GS_WhoHasMore.enter = function()
  530. {
  531.    mLog("entering GS_WhoHasMore");
  532.    this.isButtonsActive = false;
  533.    this.isRollOverOk = false;
  534.    this.isRoundOver = false;
  535.    gotoAndPlay(196);
  536.    iDelayer.addDelayedEvent(110,OnPlaySound);
  537. };
  538. GS_WhoHasMore.startSpeaking = function()
  539. {
  540.    mLog("startSpeaking");
  541.    this.SentanceParts = new Array();
  542.    this.SentanceParts.push(iS3b);
  543.    eventNotify(OnSoundStop);
  544. };
  545. GS_WhoHasMore.correctResponse = function(selectedindex)
  546. {
  547.    swapForStatic2(SelectedCharacters[0].myIndex);
  548.    swapForStatic2(SelectedCharacters[1].myIndex);
  549.    while(0 < this.SentanceParts.length)
  550.    {
  551.       mLog("clearing sentance");
  552.       this.SentanceParts.pop();
  553.    }
  554.    this.currentPlay.gotoAndStop(1);
  555.    stopAllSounds();
  556.    this.SentanceParts.push(iS4a);
  557.    this.SentanceParts.push(eval("iS4b" + SelectedCharacterNames[selectedindex]));
  558.    var otherIndex = Math.abs(selectedIndex - 1);
  559.    this.SentanceParts.push(eval("iS4c" + SelectedCharacterNames[otherIndex]));
  560.    this.SentanceParts.push(iS4d);
  561.    eventNotify(OnSoundStop);
  562.    this.isRoundOver = true;
  563. };
  564. GS_WhoHasMore.exit = function()
  565. {
  566.    mLog("exiting GS_WhoHasMore");
  567.    while(0 < LeftItems.length)
  568.    {
  569.       mLog("deleting leftItem");
  570.       var mc = LeftItems.pop();
  571.       mc.removeMovieClip();
  572.    }
  573.    while(0 < RightItems.length)
  574.    {
  575.       mLog("deleting RightItem");
  576.       var mc = RightItems.pop();
  577.       mc.removeMovieClip();
  578.    }
  579. };
  580. GS_WhoHasMore.displayButtons = function()
  581. {
  582.    if(this.isButtonsActive == false)
  583.    {
  584.       iDelayer.addDelayedEvent(1,OnButtonTrans,SelectedCharacters[0]);
  585.       iDelayer.addDelayedEvent(8,OnButtonTrans,SelectedCharacters[1]);
  586.       this.isButtonsActive = true;
  587.    }
  588. };
  589. GS_WhoHasMore.eventNotify = function(event, obj)
  590. {
  591.    var _loc1_ = null;
  592.    var _loc0_ = null;
  593.    if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnSoundStop) ? false : _loc0_ == _loc1_))
  594.    {
  595.       if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnPlaySound) ? false : _loc0_ == _loc1_))
  596.       {
  597.          if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnCharacterSelect) ? false : _loc0_ == _loc1_))
  598.          {
  599.             if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnButtonTrans) ? false : _loc0_ == _loc1_))
  600.             {
  601.                if(typeof (_loc0_ = event) != typeof (_loc1_ = OnTimeOut) ? false : _loc0_ == _loc1_)
  602.                {
  603.                   mLog("timeout");
  604.                }
  605.             }
  606.             else
  607.             {
  608.                swapForButton(obj.myIndex);
  609.             }
  610.          }
  611.          else if(obj.myIndex == SelectedCharacters[0].myIndex && RightItems.length < LeftItems.length)
  612.          {
  613.             this.correctResponse(0);
  614.          }
  615.          else if(obj.myIndex == SelectedCharacters[1].myIndex && LeftItems.length < RightItems.length)
  616.          {
  617.             this.correctResponse(1);
  618.          }
  619.          else
  620.          {
  621.             playSoundClip("sAreYouSure");
  622.          }
  623.       }
  624.       else
  625.       {
  626.          mLog("OnPlaySound");
  627.          this.startSpeaking();
  628.       }
  629.    }
  630.    else if(0 < this.SentanceParts.length)
  631.    {
  632.       var snd = this.SentanceParts.shift();
  633.       snd.play();
  634.       this.currentPlay = snd;
  635.    }
  636.    else if(this.isRoundOver)
  637.    {
  638.       mLog("switching State");
  639.       switchState(GS_DisplayItems);
  640.    }
  641.    else
  642.    {
  643.       this.isRollOverOk = true;
  644.       this.displayButtons();
  645.    }
  646. };
  647. GS_GamePlaySame = new Object();
  648. GS_GamePlaySame.enter = function()
  649. {
  650.    mLog("entering GS_GamePlaySame");
  651.    this.isRollOverOk = false;
  652.    this.startSpeaking();
  653.    gotoAndPlay(186);
  654. };
  655. GS_GamePlaySame.startSpeaking = function()
  656. {
  657.    this.SentanceParts = new Array();
  658.    playSoundClip("s2a");
  659.    iDelayer.addDelayedEvent(140,OnPlaySound,"s2b");
  660.    iDelayer.addDelayedEvent(250,OnTimeOut);
  661. };
  662. GS_GamePlaySame.exit = function()
  663. {
  664.    mLog("exiting GS_GamePlaySame");
  665. };
  666. GS_GamePlaySame.instructAgain = function()
  667. {
  668.    this.startSpeaking();
  669. };
  670. GS_GamePlaySame.eventNotify = function(event, obj)
  671. {
  672.    mLog("event = " + event);
  673.    var _loc1_ = null;
  674.    var _loc0_ = null;
  675.    if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnSoundStop) ? false : _loc0_ == _loc1_))
  676.    {
  677.       if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnPlaySound) ? false : _loc0_ == _loc1_))
  678.       {
  679.          if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnRedRoll) ? false : _loc0_ == _loc1_))
  680.          {
  681.             if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnGreenRoll) ? false : _loc0_ == _loc1_))
  682.             {
  683.                if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnRedPush) ? false : _loc0_ == _loc1_))
  684.                {
  685.                   if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnGreenPush) ? false : _loc0_ == _loc1_))
  686.                   {
  687.                      if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnDoJig) ? false : _loc0_ == _loc1_))
  688.                      {
  689.                         if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnSwitchState) ? false : _loc0_ == _loc1_))
  690.                         {
  691.                            if(typeof (_loc0_ = event) != typeof (_loc1_ = OnTimeOut) ? false : _loc0_ == _loc1_)
  692.                            {
  693.                               this.isRollOverOk = true;
  694.                            }
  695.                         }
  696.                         else
  697.                         {
  698.                            switchState(GS_CountOffLeft);
  699.                         }
  700.                      }
  701.                      else
  702.                      {
  703.                         SelectedCharacters[0].gotoAndPlay("dance");
  704.                         SelectedCharacters[1].gotoAndPlay("dance");
  705.                      }
  706.                   }
  707.                   else
  708.                   {
  709.                      iDelayer.removeEvent(OnPlaySound);
  710.                      iDelayer.removeEvent(OnTimeOut);
  711.                      this.isRollOverOk = false;
  712.                      playSoundClip("sTheSameResponse");
  713.                      iDelayer.addDelayedEvent(80,OnPlaySound,"sWeHaveTheSame");
  714.                      iDelayer.addDelayedEvent(130,OnPlaySound,"sWeHaveTheSame");
  715.                      iDelayer.addDelayedEvent(75,OnDoJig);
  716.                      iDelayer.addDelayedEvent(130,OnDoJig);
  717.                      gotoAndPlay(207);
  718.                      iDelayer.addDelayedEvent(180,OnSwitchState);
  719.                   }
  720.                }
  721.                else
  722.                {
  723.                   playSoundClip("sAreYouSure");
  724.                   iDelayer.removeEvent(OnPlaySound);
  725.                   iDelayer.removeEvent(OnTimeOut);
  726.                   this.isRollOverOk = false;
  727.                   iDelayer.addDelayedEvent(100,OnTimeOut);
  728.                }
  729.             }
  730.             else if(this.isRollOverOk)
  731.             {
  732.                playSoundClip("sGreenRoll");
  733.                iDelayer.removeEvent(OnTimeOut);
  734.                this.isRollOverOk = false;
  735.                iDelayer.addDelayedEvent(40,OnTimeOut);
  736.             }
  737.          }
  738.          else if(this.isRollOverOk)
  739.          {
  740.             playSoundClip("sRedRoll");
  741.             iDelayer.removeEvent(OnTimeOut);
  742.             this.isRollOverOk = false;
  743.             iDelayer.addDelayedEvent(40,OnTimeOut);
  744.          }
  745.       }
  746.       else
  747.       {
  748.          playSoundClip(obj);
  749.       }
  750.    }
  751.    else
  752.    {
  753.       mLog("OnSoundStop");
  754.    }
  755. };
  756. GS_CountOffLeft = new Object();
  757. GS_CountOffLeft.enter = function()
  758. {
  759.    mLog("entering GS_CountOffLeft");
  760.    this.isCountOffStarted = false;
  761.    this.isCountOffOver = false;
  762.    var snd = eval("is5a" + SelectedCharacterNames[0]);
  763.    snd.play();
  764.    iDelayer.addDelayedEvent(20,OnTransition1);
  765.    gotoAndPlay(207);
  766. };
  767. GS_CountOffLeft.exit = function()
  768. {
  769.    mLog("exiting GS_CountOffLeft");
  770. };
  771. GS_CountOffLeft.transition = function()
  772. {
  773.    var tween1 = new Object();
  774.    tween1.mc = SelectedCharacters[0];
  775.    tween1.scale = 140;
  776.    tween1.frames = 9;
  777.    iTween.addTween(tween1);
  778.    var tween2 = new Object();
  779.    tween2.mc = SelectedCharacters[1];
  780.    tween2.scale = 100;
  781.    tween2.frames = 9;
  782.    iTween.addTween(tween2);
  783.    SelectedCharacters[1].gotoAndPlay("static");
  784.    var i = 0;
  785.    while(i < RightItems.length)
  786.    {
  787.       var tween = new Object();
  788.       tween.mc = RightItems[i];
  789.       tween.alpha = 33;
  790.       tween.delay = 3;
  791.       tween.frames = 6;
  792.       iTween.addTween(tween);
  793.       i++;
  794.    }
  795.    var i = 0;
  796.    while(i < LeftItems.length)
  797.    {
  798.       var tween = new Object();
  799.       tween.mc = LeftItems[i];
  800.       tween.alpha = 100;
  801.       tween.delay = 3;
  802.       tween.frames = 6;
  803.       iTween.addTween(tween);
  804.       i++;
  805.    }
  806.    iDelayer.addDelayedEvent(9,OnTransition2);
  807. };
  808. GS_CountOffLeft.beginCountOff = function()
  809. {
  810.    this.initalDelay = 2;
  811.    this.framesBetween = 28;
  812.    var i = 1;
  813.    while(LeftItems.length >= i)
  814.    {
  815.       var delay = this.initalDelay + this.framesBetween * i;
  816.       var j = LeftItems.length - i;
  817.       iDelayer.addDelayedEvent(delay,OnCountOff,LeftItems[j]);
  818.       i++;
  819.    }
  820.    this.isCountOffStarted = true;
  821.    this.numCounted = 0;
  822. };
  823. GS_CountOffLeft.eventNotify = function(event, obj)
  824. {
  825.    var _loc1_ = null;
  826.    var _loc0_ = null;
  827.    if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnSoundStop) ? false : _loc0_ == _loc1_))
  828.    {
  829.       if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnSwitchState) ? false : _loc0_ == _loc1_))
  830.       {
  831.          if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnCountOff) ? false : _loc0_ == _loc1_))
  832.          {
  833.             if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnTransition1) ? false : _loc0_ == _loc1_))
  834.             {
  835.                if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnTransition2) ? false : _loc0_ == _loc1_))
  836.                {
  837.                   if(typeof (_loc0_ = event) != typeof (_loc1_ = OnTimeOut) ? false : _loc0_ == _loc1_)
  838.                   {
  839.                      mLog("timeout");
  840.                   }
  841.                }
  842.                else
  843.                {
  844.                   SelectedCharacters[0].gotoAndPlay("active");
  845.                }
  846.             }
  847.             else
  848.             {
  849.                this.transition();
  850.             }
  851.          }
  852.          else
  853.          {
  854.             obj.gotoAndPlay("count");
  855.             this.numCounted = this.numCounted + 1;
  856.             var i = LeftItems.length - this.numCounted;
  857.             var j = i + 1;
  858.             if(j < LeftItems.length)
  859.             {
  860.                LeftItems[j].swapDepths(LeftItems[i]);
  861.             }
  862.             var snd = eval("iNumber" + this.numCounted);
  863.             snd.play();
  864.             if(this.numCounted >= LeftItems.length)
  865.             {
  866.                this.SentanceParts = new Array();
  867.                if(this.numCounted == 1)
  868.                {
  869.                   var sndName = "i" + SelectedItem + "Sound";
  870.                }
  871.                else
  872.                {
  873.                   var sndName = "i" + SelectedItem + "sSound";
  874.                }
  875.                this.SentanceParts.push(eval(sndName));
  876.                mLog("adding sound " + sndName);
  877.             }
  878.          }
  879.       }
  880.       else
  881.       {
  882.          switchState(GS_CountOffRight);
  883.       }
  884.    }
  885.    else if(this.isCountOffOver)
  886.    {
  887.       iDelayer.addDelayedEvent(10,OnSwitchState);
  888.    }
  889.    else if(this.isCountOffStarted == false)
  890.    {
  891.       this.beginCountOff();
  892.    }
  893.    else if(0 < this.SentanceParts.length)
  894.    {
  895.       var snd = this.SentanceParts.shift();
  896.       snd.play();
  897.       mLog("playing sound " + snd);
  898.       this.isCountOffOver = true;
  899.    }
  900.    else
  901.    {
  902.       mLog("OnSoundStop and I don\'t know what to do");
  903.    }
  904. };
  905. GS_CountOffRight = new Object();
  906. GS_CountOffRight.enter = function()
  907. {
  908.    mLog("entering GS_CountOffRight");
  909.    this.isCountOffStarted = false;
  910.    this.isCountOffOver = false;
  911.    var snd = eval("iS5a" + SelectedCharacterNames[1]);
  912.    snd.play();
  913.    iDelayer.addDelayedEvent(20,OnTransition1);
  914. };
  915. GS_CountOffRight.transition = function()
  916. {
  917.    var tween1 = new Object();
  918.    tween1.mc = SelectedCharacters[1];
  919.    tween1.scale = 125;
  920.    tween1.frames = 9;
  921.    iTween.addTween(tween1);
  922.    var tween2 = new Object();
  923.    tween2.mc = SelectedCharacters[0];
  924.    tween2.scale = 125;
  925.    tween2.frames = 9;
  926.    iTween.addTween(tween2);
  927.    SelectedCharacters[0].gotoAndPlay("static");
  928.    var i = 0;
  929.    while(i < LeftItems.length)
  930.    {
  931.       var tween = new Object();
  932.       tween.mc = LeftItems[i];
  933.       tween.alpha = 33;
  934.       tween.delay = 3;
  935.       tween.frames = 6;
  936.       iTween.addTween(tween);
  937.       i++;
  938.    }
  939.    var i = 0;
  940.    while(i < RightItems.length)
  941.    {
  942.       var tween = new Object();
  943.       tween.mc = RightItems[i];
  944.       tween.alpha = 100;
  945.       tween.delay = 3;
  946.       tween.frames = 6;
  947.       iTween.addTween(tween);
  948.       i++;
  949.    }
  950.    iDelayer.addDelayedEvent(9,OnTransition2);
  951. };
  952. GS_CountOffRight.exit = function()
  953. {
  954.    mLog("exiting GS_CountOffRight");
  955. };
  956. GS_CountOffRight.beginCountOff = function()
  957. {
  958.    this.initalDelay = 2;
  959.    this.framesBetween = 28;
  960.    var i = 1;
  961.    while(RightItems.length >= i)
  962.    {
  963.       var delay = this.initalDelay + this.framesBetween * i;
  964.       var j = RightItems.length - i;
  965.       iDelayer.addDelayedEvent(delay,OnCountOff,RightItems[j]);
  966.       i++;
  967.    }
  968.    this.isCountOffStarted = true;
  969.    this.numCounted = 0;
  970. };
  971. GS_CountOffRight.endPayOff = function()
  972. {
  973.    var tween1 = new Object();
  974.    tween1.mc = SelectedCharacters[1];
  975.    tween1.scale = 140;
  976.    tween1.frames = 9;
  977.    iTween.addTween(tween1);
  978.    var tween2 = new Object();
  979.    tween2.mc = SelectedCharacters[0];
  980.    tween2.scale = 140;
  981.    tween2.frames = 9;
  982.    iTween.addTween(tween2);
  983.    SelectedCharacters[0].gotoAndPlay("static");
  984.    SelectedCharacters[1].gotoAndPlay("static");
  985.    var i = 0;
  986.    while(i < LeftItems.length)
  987.    {
  988.       var tween = new Object();
  989.       tween.mc = LeftItems[i];
  990.       tween.alpha = 100;
  991.       tween.frames = 6;
  992.       tween.delay = 3;
  993.       iTween.addTween(tween);
  994.       i++;
  995.    }
  996.    var i = 0;
  997.    while(i < RightItems.length)
  998.    {
  999.       var tween = new Object();
  1000.       tween.mc = RightItems[i];
  1001.       tween.alpha = 100;
  1002.       tween.frames = 6;
  1003.       tween.delay = 3;
  1004.       iTween.addTween(tween);
  1005.       i++;
  1006.    }
  1007.    iDelayer.addDelayedEvent(29,OnSwitchState);
  1008. };
  1009. GS_CountOffRight.eventNotify = function(event, obj)
  1010. {
  1011.    var _loc1_ = null;
  1012.    var _loc0_ = null;
  1013.    if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnSoundStop) ? false : _loc0_ == _loc1_))
  1014.    {
  1015.       if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnSwitchState) ? false : _loc0_ == _loc1_))
  1016.       {
  1017.          if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnCountOff) ? false : _loc0_ == _loc1_))
  1018.          {
  1019.             if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnTransition1) ? false : _loc0_ == _loc1_))
  1020.             {
  1021.                if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnTransition2) ? false : _loc0_ == _loc1_))
  1022.                {
  1023.                   if(typeof (_loc0_ = event) != typeof (_loc1_ = OnTimeOut) ? false : _loc0_ == _loc1_)
  1024.                   {
  1025.                      mLog("timeout");
  1026.                   }
  1027.                }
  1028.                else
  1029.                {
  1030.                   mLog("OnTransition2");
  1031.                   SelectedCharacters[1].gotoAndPlay("active");
  1032.                }
  1033.             }
  1034.             else
  1035.             {
  1036.                this.transition();
  1037.             }
  1038.          }
  1039.          else
  1040.          {
  1041.             obj.gotoAndPlay("count");
  1042.             this.numCounted = this.numCounted + 1;
  1043.             var i = LeftItems.length - this.numCounted;
  1044.             var j = i + 1;
  1045.             if(j < RightItems.length)
  1046.             {
  1047.                RightItems[j].swapDepths(RightItems[i]);
  1048.             }
  1049.             var snd = eval("iNumber" + this.numCounted);
  1050.             snd.play();
  1051.             if(this.numCounted >= RightItems.length)
  1052.             {
  1053.                this.SentanceParts = new Array();
  1054.                if(this.numCounted == 1)
  1055.                {
  1056.                   var sndName = "i" + SelectedItem + "Sound";
  1057.                }
  1058.                else
  1059.                {
  1060.                   var sndName = "i" + SelectedItem + "sSound";
  1061.                }
  1062.                this.SentanceParts.push(eval(sndName));
  1063.             }
  1064.          }
  1065.       }
  1066.       else
  1067.       {
  1068.          switchState(GS_PlayAgain);
  1069.       }
  1070.    }
  1071.    else if(this.isCountOffOver)
  1072.    {
  1073.       this.endPayOff();
  1074.    }
  1075.    else if(this.isCountOffStarted == false)
  1076.    {
  1077.       this.beginCountOff();
  1078.    }
  1079.    else if(0 < this.SentanceParts.length)
  1080.    {
  1081.       var snd = this.SentanceParts.shift();
  1082.       snd.play();
  1083.       this.isCountOffOver = true;
  1084.    }
  1085.    else
  1086.    {
  1087.       mLog("OnSoundStop and I don\'t know what to do");
  1088.    }
  1089. };
  1090. GS_PlayAgain = new Object();
  1091. GS_PlayAgain.enter = function()
  1092. {
  1093.    mLog("entering GS_PlayAgain");
  1094.    this.isRollOverOk = false;
  1095.    this.startSpeaking();
  1096.    gotoAndPlay(233);
  1097.    this.animate();
  1098. };
  1099. GS_PlayAgain.exit = function()
  1100. {
  1101.    mLog("exiting GS_PlayAgain");
  1102.    iDelayer.removeEvent(OnPlaySound);
  1103. };
  1104. GS_PlayAgain.startSpeaking = function()
  1105. {
  1106.    this.SentanceParts = new Array();
  1107.    this.SentanceParts.push(iS10a);
  1108.    this.SentanceParts.push(iS10b);
  1109.    this.SentanceParts.push(iS10c);
  1110.    eventNotify(OnSoundStop);
  1111. };
  1112. GS_PlayAgain.instructAgain = function()
  1113. {
  1114.    this.SentanceParts.push(iS10b);
  1115.    this.SentanceParts.push(iS10c);
  1116.    eventNotify(OnSoundStop);
  1117. };
  1118. GS_PlayAgain.animate = function()
  1119. {
  1120.    var tween1 = new Object();
  1121.    tween1.x = 260.1;
  1122.    tween1.y = 165.8;
  1123.    tween1.scale = 140;
  1124.    tween1.frames = 8;
  1125.    tween1.mc = SelectedCharacters[0];
  1126.    iTween.addTween(tween1);
  1127.    var tween2 = new Object();
  1128.    tween2.y = 300;
  1129.    tween2.frames = 18;
  1130.    tween2.mc = SelectedCharacters[1];
  1131.    iTween.addTween(tween2);
  1132.    var i = 0;
  1133.    while(i < LeftItems.length)
  1134.    {
  1135.       var tweenItem = new Object();
  1136.       tweenItem.alpha = 0;
  1137.       tweenItem.frames = 8;
  1138.       tweenItem.delay = 4;
  1139.       tweenItem.mc = LeftItems[i];
  1140.       iTween.addTween(tweenItem);
  1141.       i++;
  1142.    }
  1143.    var i = 0;
  1144.    while(i < RightItems.length)
  1145.    {
  1146.       var tweenItem = new Object();
  1147.       tweenItem.alpha = 0;
  1148.       tweenItem.frames = 8;
  1149.       tweenItem.delay = 4;
  1150.       tweenItem.mc = RightItems[i];
  1151.       iTween.addTween(tweenItem);
  1152.       i++;
  1153.    }
  1154. };
  1155. GS_PlayAgain.eventNotify = function(event, obj)
  1156. {
  1157.    var _loc1_ = null;
  1158.    var _loc0_ = null;
  1159.    if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnCountOff) ? false : _loc0_ == _loc1_))
  1160.    {
  1161.       if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnTransition2) ? false : _loc0_ == _loc1_))
  1162.       {
  1163.          if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnSoundStop) ? false : _loc0_ == _loc1_))
  1164.          {
  1165.             if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnPlaySound) ? false : _loc0_ == _loc1_))
  1166.             {
  1167.                if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnAnimate) ? false : _loc0_ == _loc1_))
  1168.                {
  1169.                   if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnGreenPush) ? false : _loc0_ == _loc1_))
  1170.                   {
  1171.                      if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnRedPush) ? false : _loc0_ == _loc1_))
  1172.                      {
  1173.                         if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnGreenRoll) ? false : _loc0_ == _loc1_))
  1174.                         {
  1175.                            if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnRedRoll) ? false : _loc0_ == _loc1_))
  1176.                            {
  1177.                               if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnBackToStart) ? false : _loc0_ == _loc1_))
  1178.                               {
  1179.                                  if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnAudioTimeout) ? false : _loc0_ == _loc1_))
  1180.                                  {
  1181.                                     if(!(typeof (_loc0_ = event) != typeof (_loc1_ = OnTimeOut) ? false : _loc0_ == _loc1_))
  1182.                                     {
  1183.                                        if(typeof (_loc0_ = event) != typeof (_loc1_ = OnEnd) ? false : _loc0_ == _loc1_)
  1184.                                        {
  1185.                                           if(this.isPlayAgain)
  1186.                                           {
  1187.                                              gotoAndPlay(49);
  1188.                                           }
  1189.                                           else
  1190.                                           {
  1191.                                              getURL(gQuitUrl,"");
  1192.                                              stop();
  1193.                                           }
  1194.                                           SelectedCharacters[0].removeMovieClip();
  1195.                                           SelectedCharacters[1].removeMovieClip();
  1196.                                           while(0 < LeftItems.length)
  1197.                                           {
  1198.                                              var item = LeftItems.pop();
  1199.                                              item.removeMovieClip();
  1200.                                           }
  1201.                                           while(0 < RightItems.length)
  1202.                                           {
  1203.                                              var item = RightItems.pop();
  1204.                                              item.removeMovieClip();
  1205.                                           }
  1206.                                        }
  1207.                                     }
  1208.                                     else
  1209.                                     {
  1210.                                        mLog("timeout");
  1211.                                     }
  1212.                                  }
  1213.                                  else
  1214.                                  {
  1215.                                     this.isRollOverOk = true;
  1216.                                  }
  1217.                               }
  1218.                               else
  1219.                               {
  1220.                                  gotoAndPlay(262);
  1221.                               }
  1222.                            }
  1223.                            else if(this.isRollOverOk)
  1224.                            {
  1225.                               playSoundClip("sDone");
  1226.                               this.isRollOverOk = false;
  1227.                               iDelayer.addDelayedEvent(12,OnAudioTimeout);
  1228.                            }
  1229.                         }
  1230.                         else if(this.isRollOverOk)
  1231.                         {
  1232.                            playSoundClip("sPlayAgain");
  1233.                            this.isRollOverOk = false;
  1234.                            iDelayer.addDelayedEvent(12,OnAudioTimeout);
  1235.                         }
  1236.                      }
  1237.                      else
  1238.                      {
  1239.                         iDelayer.removeEvent(OnPlaySound);
  1240.                         playSoundClip("sLater");
  1241.                         var tween1 = new Object();
  1242.                         tween1.frames = 10;
  1243.                         tween1.y = 295;
  1244.                         tween1.mc = SelectedCharacters[0];
  1245.                         iTween.addTween(tween1);
  1246.                         this.isPlayAgain = false;
  1247.                         iDelayer.addDelayedEvent(45,OnBackToStart);
  1248.                         while(0 < this.SentanceParts.length)
  1249.                         {
  1250.                            this.SentanceParts.pop();
  1251.                         }
  1252.                         iDelayer.removeEvent(OnTransiton2);
  1253.                      }
  1254.                   }
  1255.                   else
  1256.                   {
  1257.                      stopAllSounds();
  1258.                      playSoundClip("sGreat");
  1259.                      var tween1 = new Object();
  1260.                      tween1.frames = 10;
  1261.                      tween1.y = 295;
  1262.                      tween1.mc = SelectedCharacters[0];
  1263.                      iTween.addTween(tween1);
  1264.                      this.isPlayAgain = true;
  1265.                      gotoAndPlay(262);
  1266.                      while(0 < this.SentanceParts.length)
  1267.                      {
  1268.                         this.SentanceParts.pop();
  1269.                      }
  1270.                      iDelayer.removeEvent(OnTransiton2);
  1271.                   }
  1272.                }
  1273.                else
  1274.                {
  1275.                   this.animate();
  1276.                }
  1277.             }
  1278.             else
  1279.             {
  1280.                this.instructAgain();
  1281.             }
  1282.          }
  1283.          else if(0 < this.SentanceParts.length)
  1284.          {
  1285.             var snd = this.SentanceParts.shift();
  1286.             mLog("playing " + snd._name);
  1287.             snd.play();
  1288.          }
  1289.          else
  1290.          {
  1291.             this.isRollOverOk = true;
  1292.          }
  1293.       }
  1294.       else
  1295.       {
  1296.          this.startSpeaking();
  1297.          gotoAndPlay(1);
  1298.       }
  1299.    }
  1300.    else
  1301.    {
  1302.       obj.removeMovieClip();
  1303.    }
  1304. };
  1305.