home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Aventura / Frizzle_fraz.swf / scripts / Code / LIB / SOUND / _mv52.as next >
Encoding:
Text File  |  2008-09-26  |  1.5 KB  |  62 lines

  1. package Code.LIB.SOUND
  2. {
  3.    import flash.events.Event;
  4.    import flash.media.Sound;
  5.    import flash.media.SoundChannel;
  6.    import flash.media.SoundTransform;
  7.    
  8.    public class _mv52
  9.    {
  10.        
  11.       
  12.       private var iSTransform:SoundTransform;
  13.       
  14.       private var iPList:SoundChannel;
  15.       
  16.       private var iPlaying:Boolean = false;
  17.       
  18.       private var iList:Array;
  19.       
  20.       public function _mv52(param1:SoundTransform)
  21.       {
  22.          iList = new Array();
  23.          iPlaying = false;
  24.          super();
  25.          this.iSTransform = param1;
  26.       }
  27.       
  28.       public function add(param1:Sound) : void
  29.       {
  30.          var _loc2_:Sound = null;
  31.          if(iList.length > 7)
  32.          {
  33.             return;
  34.          }
  35.          iList.push(param1);
  36.          if(iPlaying)
  37.          {
  38.             return;
  39.          }
  40.          iPlaying = true;
  41.          _loc2_ = iList.pop();
  42.          iPList = _loc2_.play(0,0,iSTransform);
  43.          iPList.addEventListener(Event.SOUND_COMPLETE,_np390);
  44.       }
  45.       
  46.       private function _np390(param1:Event) : void
  47.       {
  48.          var _loc2_:Sound = null;
  49.          if(iList.length == 0)
  50.          {
  51.             iPlaying = false;
  52.             return;
  53.          }
  54.          _loc2_ = iList.pop();
  55.          iPList.removeEventListener(Event.SOUND_COMPLETE,_np390);
  56.          iPList = _loc2_.play(0,0,iSTransform);
  57.          iPlaying = true;
  58.          iPList.addEventListener(Event.SOUND_COMPLETE,_np390);
  59.       }
  60.    }
  61. }
  62.