home *** CD-ROM | disk | FTP | other *** search
- package asCode
- {
- import com.adamsearle.events.TrackingEvent;
- import com.terry.Broadcaster;
- import flash.display.*;
- import flash.events.*;
-
- public class introHowToPlayScreenClass extends MovieClip
- {
- public var helpNavBtnLeft:helpNavBtnClip;
-
- public var introHelpPlayBtn:helpPlayBtnClip;
-
- public var helpNavBtnRight:helpNavBtnClip;
-
- private var currentHelpPage:int = 1;
-
- public function introHowToPlayScreenClass()
- {
- super();
- helpNavBtnLeft.addEventListener(MouseEvent.CLICK,mouseDownHandler);
- helpNavBtnRight.addEventListener(MouseEvent.CLICK,mouseDownHandler);
- helpNavBtnLeft.buttonMode = true;
- helpNavBtnRight.buttonMode = true;
- evalButtons();
- }
-
- private function mouseDownHandler(param1:MouseEvent) : void
- {
- switch(param1.target.name)
- {
- case "helpNavBtnRight":
- ++currentHelpPage;
- if(currentHelpPage > 2)
- {
- currentHelpPage = 3;
- }
- evalButtons();
- break;
- case "helpNavBtnLeft":
- --currentHelpPage;
- if(currentHelpPage < 1)
- {
- currentHelpPage = 1;
- }
- evalButtons();
- }
- }
-
- private function evalButtons() : void
- {
- this.gotoAndStop(currentHelpPage);
- var _loc1_:Object = new Object();
- _loc1_.name3 = "how_to_play_page";
- _loc1_.name4 = currentHelpPage;
- Broadcaster.dispatchEvent(new TrackingEvent(TrackingEvent.TRACK_EVENT,_loc1_));
- if(currentHelpPage < 2)
- {
- helpNavBtnLeft.alpha = 0.2;
- helpNavBtnLeft.buttonMode = false;
- }
- else
- {
- helpNavBtnLeft.alpha = 1;
- helpNavBtnLeft.buttonMode = true;
- }
- if(currentHelpPage > 2)
- {
- helpNavBtnRight.alpha = 0.2;
- helpNavBtnRight.buttonMode = false;
- }
- else
- {
- helpNavBtnRight.buttonMode = true;
- helpNavBtnRight.alpha = 1;
- }
- }
- }
- }
-
-