I need some help, i believe here would be a good place to ask:
I prepared 3 swf files - each with sound in it- tested in browser they work “fine”, preloader shows up, then music began to play.
problem when i link them into a movie - that movie has a preloader itself, since includes attached sound(perhaps would be better replace attached with another swf playing onLoad), and that movie has 3 music buttons - on click 1,2,3 should downlad track 1, 2, or 3 (each on different swf file).
Problem: after a click - preloader shows up - frozen, and uncomplete - and nothing plays.
main movie - each button (purple if sound button):
[size=1][size=2]on (release)[/size][/size][size=1][size=2] {[/size]
[/size][size=2][color=darkorchid]stopAllSounds();[/color]
_root.contents.[color=#000084]loadMovie/color;
}
main movie preloader (when main movie opens it works just fine):
bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.loadBar._width = getPercent100;
_root.loadText = Math.round(getPercent100)+"%";
if (bytes_loaded == bytes_total) {
_root.gotoAndStop(4);
}
In that movie i have another empty movie with another group of buttons to load external text files. They have no preloaders and work fine.
external movies:[/size]
[size=2]
I tried to replace _root with _parent in external swfs ,
where in main movie:
on (release) {
stopAllSounds();
container.loadMovie("[color=deepskyblue]sound_2_mov[/color].swf");
and preloader in external:
percentage = [color=#000084]Math[/color].[color=#000084]round/color + “[color=#0000ff] %[/color]”;[color=#000084]_parent[/color].loadBar.[color=#000084]_width[/color] = percentage*100;[color=#000084]_parent[/color].loadText = [color=#000084]Math[/color].[color=#000084]round/color+"[color=#0000ff]%[/color]";[color=#000084]if[/color] (bytes_loaded == bytes_total) { [color=#000084]_parent[/color].[color=#000084]gotoAndStop/color;}
preloader does not work and sound does not play.
(when i replace with “andPlay” it plays main movie).
How to fix it?
Thanks[/size]