home *** CD-ROM | disk | FTP | other *** search
/ Ice Age Fan CD 1 / CD1_Scrat.iso / flash / data / game.swf / scripts / asCode / soundManager.as < prev    next >
Encoding:
Text File  |  2012-07-04  |  763 b   |  33 lines

  1. package asCode
  2. {
  3.    import flash.media.Sound;
  4.    import flash.media.SoundTransform;
  5.    import flash.utils.getDefinitionByName;
  6.    
  7.    public class soundManager
  8.    {
  9.       private static var mysoundobj:Sound;
  10.       
  11.       public static var trans:SoundTransform;
  12.       
  13.       public function soundManager()
  14.       {
  15.          super();
  16.          trans = new SoundTransform(1,0);
  17.       }
  18.       
  19.       public static function adjustVolume(param1:Number) : void
  20.       {
  21.          trans.volume = param1;
  22.       }
  23.       
  24.       public static function playSound(param1:String) : void
  25.       {
  26.          var _loc2_:Class = getDefinitionByName(param1) as Class;
  27.          mysoundobj = new _loc2_();
  28.          mysoundobj.play(0,0,trans);
  29.       }
  30.    }
  31. }
  32.  
  33.