⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 soundengine.as

📁 flashget43的源代码 一个比较常用的下载程序
💻 AS
字号:
_global.SoundEngine = function( initObj, initSndOpt, parent ) {	this.sounds_obj = new Object();	this.initObj    = initObj;	this.parent     = parent;	this.initSndOpt = initSndOpt;		this.Volume = this.initSndOpt['volume'];	this.Pan    = this.initSndOpt['pan'];};_global.SoundEngine.prototype = new Object(); _global.SoundEngine.prototype.setVolume = function(vol){ 	this.Volume = vol;}_global.SoundEngine.prototype.setPan = function(pan){ 	this.Pan = pan;}_global.SoundEngine.prototype.attachSound = function( sound_id , play_anyway){ 		//trace('attachSound ' + sound_id + ' (' + this.initObj[sound_id] + ') = ' + this.parent.settings.user.sound['mute' + sound_id]);	//trace('volume ' + this.Volume);	//trace('DBG ' + this.parent.settings);	//dbg(this.parent.settings);		if (	     play_anyway != true && 	     ( 	       toBool(this.parent.settings.user.sound.muteAll)            ||	       toBool(this.parent.settings.user.sound["mute" + sound_id]) ||	       this.initObj[sound_id] == undefined	     )	   ) 	     return;			if(this.sounds_obj[sound_id] == undefined)	{		this.sounds_obj[sound_id] = new Sound();				this.sounds_obj[sound_id].setPan(this.Pan);		this.sounds_obj[sound_id].setVolume(this.Volume);		this.sounds_obj[sound_id].loadSound(this.initObj[sound_id], true);		return;	}		this.sounds_obj[sound_id].setPan(this.Pan);	this.sounds_obj[sound_id].setVolume(this.Volume);	this.sounds_obj[sound_id].start();	}_global.SoundEngine.prototype.start = function(){ }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -