writeDebug('_unload(): caught exception during netConnection/netStream close');
}
}
var ns:Object = new Object();
ns.sID = s.sID;
ns.loops = s.loops;
ns.usePeakData = s.usePeakData;
ns.useWaveformData = s.useWaveformData;
ns.useEQData = s.useEQData;
ns.useNetstream = s.useNetstream;
ns.bufferTime = s.bufferTime;
ns.serverUrl = s.serverUrl;
ns.duration = s.duration;
ns.autoPlay = s.autoPlay;
ns.autoLoad = s.autoLoad;
ns.checkPolicyFile = s.checkPolicyFile;
_destroySound(s.sID);
_createSound(ns.sID, sURL, ns.usePeakData, ns.useWaveformData, ns.useEQData, ns.useNetstream, ns.bufferTime, ns.loops, ns.serverUrl, ns.duration, ns.autoPlay, false, ns.autoLoad, ns.checkPolicyFile);
soundObjects[sID].connected = true;
writeDebug(s.sID + '.unload(): ok');
}
public function _createSound(sID:String, sURL:String, usePeakData: Boolean, useWaveformData: Boolean, useEQData: Boolean, useNetstream: Boolean, bufferTime:Number, loops:Number, serverUrl:String, duration:Number, autoPlay:Boolean, useEvents:Boolean, autoLoad:Boolean, checkPolicyFile:Boolean) : void {
var s: SoundManager2_SMSound_AS3 = new SoundManager2_SMSound_AS3(this, sID, sURL, usePeakData, useWaveformData, useEQData, useNetstream, bufferTime, serverUrl, duration, autoPlay, useEvents, autoLoad, checkPolicyFile);
if (!soundObjects[sID]) {
sounds.push(sID);
}
soundObjects[sID] = s;
this.currentObject = s;
s.sID = sID;
s.sURL = sURL;
s.paused = false;
s.loaded = false;
s.checkPolicyFile = checkPolicyFile;
s.lastValues = {
bytes: 0,
duration: 0,
position: 0,
loops: loops||1,
leftPeak: 0,
rightPeak: 0,
bufferLength: 0
};
}
public function _destroySound(sID:String) : void {