home *** CD-ROM | disk | FTP | other *** search
- function DoNextLevel()
- {
- Key.removeListener(postLevelSpaceListener);
- _root.GotoNextLevel();
- }
- stop();
- _root.PlayOneOf(Array({f:"finishlevel.mp3",p:90},{f:"finishlevel1.mp3",p:5},{f:"finishlevel2.mp3",p:5}));
- _root.Localizer.Localize("_root.PostLevelMC.ui.NextLevelButton.ButtonText","nextLevel");
- _root.Localizer.Localize("_root.PostLevelMC.ui.NextLevelButton.ButtonTextShadow","nextLevel");
- _root.Localizer.Localize("_root.PostLevelMC.ui.FinishedLevelText","finishedLevel");
- _root.Localizer.Localize("_root.PostLevelMC.ui.HintText","hint");
- if(_global.isBonusLevel)
- {
- _root.Localizer.Localize("_root.PostLevelMC.ui.FlowersFoundText","bonusHeartsCollected");
- var bonusHeartsText = _root.PostLevelMC.ui.FlowersFoundText.text + " " + _global.NumBonusHearts;
- _root.PostLevelMC.ui.FlowersFoundText.text = bonusHeartsText;
- _root.PostLevelMC.ui.FlowersFoundTextShadow.text = bonusHeartsText;
- _root.Localizer.Localize("_root.PostLevelMC.ui.TotalPointsText","totalPoints");
- var finalPointsText = _root.PostLevelMC.ui.TotalPointsText.text + " " + _global.TotalBonusPoints;
- _root.PostLevelMC.ui.TotalPointsText.text = finalPointsText;
- _root.PostLevelMC.ui.TotalPointsTextShadow.text = finalPointsText;
- }
- else
- {
- _root.Localizer.Localize("_root.PostLevelMC.ui.FlowersFoundText","flowersFound");
- var finalFlowerText = _root.PostLevelMC.ui.FlowersFoundText.text + " " + _global.PercentOfFlowersCollected + "%";
- _root.PostLevelMC.ui.FlowersFoundText.text = finalFlowerText;
- _root.PostLevelMC.ui.FlowersFoundTextShadow.text = finalFlowerText;
- }
- _root.PostLevelMC.ui.NextLevelButton.onGrannyButtonPress = function()
- {
- Key.removeListener(spaceListener);
- if(_global.FinishedLastLevel == true)
- {
- _root.EndGame();
- }
- else
- {
- _root.DoNextLevel();
- }
- };
- var postLevelSpaceListener = new Object();
- postLevelSpaceListener.onKeyDown = function()
- {
- if(Key.isDown(32))
- {
- Key.removeListener(postLevelSpaceListener);
- if(_global.FinishedLastLevel == true)
- {
- _root.EndGame();
- }
- else
- {
- _root.DoNextLevel();
- }
- }
- };
- Key.addListener(postLevelSpaceListener);
-