Hi. I am having troubles loading an external audio track after a preloader has finished. In other words, when I preview my movie and SIMULATE download, the audio doesn’t play after the preloader has finished. Can anybody help?! Thankyou. Here is the actionscript which is on Frame1:
stop();
function showPercent(){
var total:Number = getBytesTotal();
var loaded:Number = getBytesLoaded();
var percent:Number = loaded / total * 100;
percent = Math.floor(percent);
thePreloaderBar._width = percent;
thePercentTextField.text = percent + "%";
trace("loading: " + percent);
if(percent == 100){
gotoAndStop(2);
clearInterval(myInterval);
}
}
myInterval = setInterval(showPercent, 500);
var mySound:Sound = new Sound();
mySound.onLoad = function(success){
if(success == true){
trace(“found the song”);
this.start();
}else{
trace(“problem loading song”);
}
};
mySound.loadSound(“Craig David - All The Way.mp3”, false);
myClipStop.onRelease = function(){
mySound.stop();
};
myClipDown.onRelease = function(){
mySound.setVolume(50);
};
myClipUp.onRelease = function(){
mySound.setVolume(100);
};