home *** CD-ROM | disk | FTP | other *** search
- package Gamefile
- {
- import flash.display.MovieClip;
- import flash.display.SimpleButton;
- import flash.events.Event;
- import flash.events.MouseEvent;
- import flash.filters.DropShadowFilter;
- import flash.filters.GlowFilter;
-
- public class GameStart
- {
-
-
- private var _hotArea_:SimpleButton;
-
- private var textFilter:GlowFilter;
-
- private var _startBtn_:MovieClip;
-
- private var PARENT:MovieClip;
-
- private var _m_:SimpleButton;
-
- private var _howToPlayBtnText_:MovieClip;
-
- private var shadowFilter:DropShadowFilter;
-
- private var _moreGameBtnText_:MovieClip;
-
- private var _logoMC_:MovieClip;
-
- private var _animalsMC_:MovieClip;
-
- private var _startBtnText_:MovieClip;
-
- private var _nameMC_:MovieClip;
-
- private var _howToPlayBtn_:MovieClip;
-
- private var _moreGameBtn_:MovieClip;
-
- public var _gameStart_:MovieClip;
-
- private var _textMC_:MovieClip;
-
- private var mouseControl:MouseControl;
-
- public function GameStart(param1:MovieClip)
- {
- super();
- initGameStart(param1);
- }
-
- private function moreGameBtnOver(param1:MouseEvent) : *
- {
- btnMouseOver();
- _moreGameBtn_.gotoAndStop(2);
- _moreGameBtnText_.filters = [];
- }
-
- private function startBtnOver(param1:MouseEvent) : *
- {
- btnMouseOver();
- _startBtn_.gotoAndStop(2);
- _startBtnText_.filters = [];
- }
-
- private function howToPlayBtnOver(param1:MouseEvent) : *
- {
- btnMouseOver();
- _howToPlayBtn_.gotoAndStop(2);
- _howToPlayBtnText_.filters = [];
- }
-
- private function initProperty() : *
- {
- textFilter = new GlowFilter(2607607,1,10,10,5,1,false,false);
- shadowFilter = new DropShadowFilter(5,45,51,0.2,7,7,1,1,false,false,false);
- _logoMC_.gotoAndStop(Language.frame_logo);
- _startBtn_.gotoAndStop(1);
- _startBtn_.mouseChildren = false;
- _startBtnText_.gotoAndStop(Language.frame_language);
- _startBtnText_.filters = [textFilter,shadowFilter];
- _howToPlayBtn_.gotoAndStop(1);
- _howToPlayBtn_.mouseChildren = false;
- _howToPlayBtnText_.gotoAndStop(Language.frame_language);
- _howToPlayBtnText_.filters = [textFilter,shadowFilter];
- _moreGameBtn_.gotoAndStop(1);
- _moreGameBtn_.mouseChildren = false;
- _moreGameBtnText_.gotoAndStop(Language.frame_language);
- _moreGameBtnText_.filters = [textFilter,shadowFilter];
- }
-
- private function moreGameBtnOut(param1:MouseEvent) : *
- {
- _moreGameBtn_.gotoAndStop(1);
- _moreGameBtnText_.filters = [textFilter,shadowFilter];
- }
-
- private function btnMouseOver() : *
- {
- SoundsManager.playSound("_MenuMouseOver_");
- }
-
- private function playOver(param1:Event) : *
- {
- if(_textMC_.currentFrame == _textMC_.totalFrames)
- {
- _gameStart_.removeEventListener(Event.ENTER_FRAME,playOver);
- }
- }
-
- private function clickLink(param1:MouseEvent) : *
- {
- Language.onCLick5();
- }
-
- private function showName(param1:MouseEvent) : *
- {
- }
-
- private function delGameStart() : *
- {
- _startBtn_.removeEventListener(MouseEvent.CLICK,showMain);
- PARENT.removeChild(_gameStart_);
- }
-
- private function initElement() : *
- {
- _gameStart_ = new _GameStart_();
- PARENT.addChild(_gameStart_);
- _textMC_ = _gameStart_.getChildByName("TextMC") as MovieClip;
- _startBtn_ = _gameStart_.getChildByName("StartBtn") as MovieClip;
- _startBtnText_ = _startBtn_.getChildByName("TextMC") as MovieClip;
- _howToPlayBtn_ = _gameStart_.getChildByName("HowToPlayBtn") as MovieClip;
- _howToPlayBtnText_ = _howToPlayBtn_.getChildByName("TextMC") as MovieClip;
- _moreGameBtn_ = _gameStart_.getChildByName("MoreGameBtn") as MovieClip;
- _moreGameBtnText_ = _moreGameBtn_.getChildByName("TextMC") as MovieClip;
- _logoMC_ = _gameStart_.getChildByName("LogoMC") as MovieClip;
- _hotArea_ = _logoMC_.getChildByName("hitarea_url1") as SimpleButton;
- _animalsMC_ = _gameStart_.getChildByName("AnimalsMC") as MovieClip;
- }
-
- private function delEvent() : *
- {
- }
-
- private function showMain(param1:MouseEvent) : *
- {
- SoundsManager.playSound("_MenuMouseDown_");
- PARENT.dispatchEvent(new Event("showMain",true));
- _startBtn_.gotoAndStop(3);
- delGameStart();
- }
-
- private function startBtnOut(param1:MouseEvent) : *
- {
- _startBtn_.gotoAndStop(1);
- _startBtnText_.filters = [textFilter,shadowFilter];
- }
-
- private function showHelp(param1:MouseEvent) : *
- {
- SoundsManager.playSound("_MenuMouseDown_");
- PARENT.dispatchEvent(new Event("showMainHelp",true));
- _howToPlayBtn_.gotoAndStop(3);
- delGameStart();
- }
-
- private function initGameStart(param1:MovieClip) : *
- {
- PARENT = param1;
- initElement();
- initEvent();
- initProperty();
- }
-
- private function moreGame(param1:MouseEvent) : *
- {
- _moreGameBtn_.gotoAndStop(3);
- SoundsManager.playSound("_MenuMouseDown_");
- Language.onCLick4();
- }
-
- private function initEvent() : *
- {
- _gameStart_.addEventListener(Event.ENTER_FRAME,playOver);
- _startBtn_.addEventListener(MouseEvent.CLICK,showMain);
- _howToPlayBtn_.addEventListener(MouseEvent.CLICK,showHelp);
- _moreGameBtn_.addEventListener(MouseEvent.CLICK,moreGame);
- _startBtn_.addEventListener(MouseEvent.MOUSE_OVER,startBtnOver);
- _startBtn_.addEventListener(MouseEvent.MOUSE_OUT,startBtnOut);
- _howToPlayBtn_.addEventListener(MouseEvent.MOUSE_OVER,howToPlayBtnOver);
- _howToPlayBtn_.addEventListener(MouseEvent.MOUSE_OUT,howToPlayBtnOut);
- _moreGameBtn_.addEventListener(MouseEvent.MOUSE_OVER,moreGameBtnOver);
- _moreGameBtn_.addEventListener(MouseEvent.MOUSE_OUT,moreGameBtnOut);
- _hotArea_.addEventListener(MouseEvent.CLICK,clickLink);
- }
-
- private function howToPlayBtnOut(param1:MouseEvent) : *
- {
- _howToPlayBtn_.gotoAndStop(1);
- _howToPlayBtnText_.filters = [textFilter,shadowFilter];
- }
- }
- }
-