home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Aventura / Never_End.swf / scripts / game / SplashMovie.as < prev    next >
Encoding:
Text File  |  2008-09-23  |  2.5 KB  |  95 lines

  1. package game
  2. {
  3.    import flash.display.MovieClip;
  4.    import flash.events.Event;
  5.    import flash.events.MouseEvent;
  6.    import flash.utils.clearTimeout;
  7.    
  8.    [Embed(source="/_assets/assets.swf", symbol="game.SplashMovie")]
  9.    public class SplashMovie extends MovieClip
  10.    {
  11.        
  12.       
  13.       private var firstPlay:Boolean = false;
  14.       
  15.       public var warningWords:MovieClip;
  16.       
  17.       public var skipBtn:skip_btn;
  18.       
  19.       private var tm:uint = 0;
  20.       
  21.       public var skipButton:MovieClip;
  22.       
  23.       public var __LOGO:MovieClip;
  24.       
  25.       public var LOGO:MovieClip;
  26.       
  27.       public var warning:MovieClip;
  28.       
  29.       public var LOGO1:MovieClip;
  30.       
  31.       public function SplashMovie()
  32.       {
  33.          firstPlay = false;
  34.          tm = 0;
  35.          super();
  36.          addFrameScript(509,frame510,565,frame566,603,frame604);
  37.          this.x = 320;
  38.          this.y = 240;
  39.          warningWords = this.getChildByName("warning") as MovieClip;
  40.          skipButton = this.getChildByName("skipBtn") as MovieClip;
  41.          warningWords.visible = false;
  42.          this.addEventListener(Event.ENTER_FRAME,checkMovie,false,0,true);
  43.          skipButton.addEventListener(MouseEvent.CLICK,skipMovie,false,0,true);
  44.       }
  45.       
  46.       private function checkMovie(param1:Event) : void
  47.       {
  48.          if(this.currentFrame >= this.totalFrames)
  49.          {
  50.             if(firstPlay)
  51.             {
  52.                firstPlay = false;
  53.             }
  54.             this.removeEventListener(Event.ENTER_FRAME,checkMovie);
  55.             BroadCaster.getInstance().run("onSplashDone","");
  56.             stop();
  57.          }
  58.       }
  59.       
  60.       internal function frame604() : *
  61.       {
  62.          LOGO1.gotoAndStop(Language.branding_nr);
  63.       }
  64.       
  65.       internal function frame566() : *
  66.       {
  67.          LOGO.gotoAndStop(Language.branding_nr);
  68.       }
  69.       
  70.       private function removeWarning() : void
  71.       {
  72.          try
  73.          {
  74.             clearTimeout(tm);
  75.          }
  76.          catch(Err:Error)
  77.          {
  78.          }
  79.          warningWords.visible = false;
  80.       }
  81.       
  82.       internal function frame510() : *
  83.       {
  84.          __LOGO.gotoAndStop(Language.branding_nr);
  85.       }
  86.       
  87.       public function skipMovie(param1:MouseEvent = null) : void
  88.       {
  89.          this.removeEventListener(Event.ENTER_FRAME,checkMovie);
  90.          BroadCaster.getInstance().run("onSplashDone","");
  91.          stop();
  92.       }
  93.    }
  94. }
  95.