iam trying to break down one heavy flash swf into portions and loading each with a preloader.
As suggested by :
http://www.flashmove.com/forum/show...c+sound+loading
The soundloading has been an issue with flash, and so i tried to make a container flash file with prelaoders that load smaller swfs in sequence. Everything works fine, the movies get loaded in line, their internal navigation etc… works (all links are relative), But the sound doesnt work, it laods but doesnt start.
i am putting this code in the swf that i load:
ActionScript:
_root.my_sound = new Sound();
_root.my_sound.attachSound("song");
_root.my_sound.start(0, 999);
//
//*/
//*
var stopped:Boolean = false;
var mute:Boolean = false;
function startSound() {
_root.my_sound.start(my_sound.position/1000, 999);
//_root.content_mc3.image_mc << this is the container for this swf.
music_btn.gotoAndStop("play");
_root.stopped = false;
}
function restartSound() {
if (_root.mute) {
stopSound();
}else{
startSound();
}
}
function stopSound() {
_root.my_sound.stop();
music_btn.gotoAndStop("stop");
_root.stopped = true;
}
music_btn.onRelease = function() {
if (_root.stopped) {
startSound();
_root.mute = false;
} else {
stopSound();
_root.mute = true;
}
};
///*/
now i may be going wrong with the relative paths, but nothing seems to work and thus this thread.
Did a search but i think the problem is in the code setup/heirarchy.
Thanks guyz…!
Report this post to a moderator | IP: Logged