home *** CD-ROM | disk | FTP | other *** search
/ Ice Age Fan CD 1 / CD1_Scrat.iso / flash / data / game.swf / scripts / com / google / analytics / debug / Info.as < prev    next >
Encoding:
Text File  |  2012-07-04  |  1.0 KB  |  46 lines

  1. package com.google.analytics.debug
  2. {
  3.    import flash.events.TextEvent;
  4.    import flash.events.TimerEvent;
  5.    import flash.utils.Timer;
  6.    
  7.    public class Info extends Label
  8.    {
  9.       private var _timer:Timer;
  10.       
  11.       public function Info(param1:String = "", param2:uint = 3000)
  12.       {
  13.          super(param1,"uiInfo",Style.infoColor,Align.top,true);
  14.          if(param2 > 0)
  15.          {
  16.             _timer = new Timer(param2,1);
  17.             _timer.start();
  18.             _timer.addEventListener(TimerEvent.TIMER_COMPLETE,onComplete,false,0,true);
  19.          }
  20.       }
  21.       
  22.       public function close() : void
  23.       {
  24.          if(parent != null)
  25.          {
  26.             parent.removeChild(this);
  27.          }
  28.       }
  29.       
  30.       override public function onLink(param1:TextEvent) : void
  31.       {
  32.          switch(param1.text)
  33.          {
  34.             case "hide":
  35.                close();
  36.          }
  37.       }
  38.       
  39.       public function onComplete(param1:TimerEvent) : void
  40.       {
  41.          close();
  42.       }
  43.    }
  44. }
  45.  
  46.