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 howToPlayScreenClass extends MovieClip
- {
- public var okBtn:helpPlayBtnClip;
-
- public var helpNavBtnLeft:helpNavBtnClip;
-
- public var helpNavBtnRight:helpNavBtnClip;
-
- public var closeBtn:closeBtnClip;
-
- public var backBtn:HSD_back;
-
- private var currentHelpPage:int = 1;
-
- public function howToPlayScreenClass()
- {
- 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);
- Broadcaster.dispatchEvent(new TrackingEvent(TrackingEvent.TRACK_PAGE,"/menu/instructions/" + currentHelpPage));
- 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;
- }
- }
- }
- }
-
-