I have a problem with preloading external swf’s into my main movie actually I have a a seperate preloader setup for each external SWF and when i click a button to load an external movie its not showing a preloader it anoying to wait while movie loading without seeing a prelaoder. I think I discribed my problem clearly
please help with this problem
Try changing all your _roots to _parent (or if you are using loadMovieNum to load in your movie it would be _level# , where # is the # of the level you are loading to).
I have this script for my buttons:
on (release) {
_root.contents.loadMovie(“about.swf”);
}
and the sam with every button
Ok, then in your preloader code change everything that says _root to _parent.
ok when I replaced _root with _parent it seems tha tit even worse but maybe it supposed to be this way so when i test the movie ( show streaming) it doesn’t show me a prealoader at all it loads without showing preloader and then plays the main movie
Well it could very well be that you don’t have enough content for it to preload so it just skips over it.
What is your preloader code?
my preloader is in a saperate scene and the code looks :
bytes_loaded = math.round(_parent.getbytesloaded());
bytes_total = math.round(_parent.getbytestotal());
getPercent = bytes_loaded/bytes_total;
_parent.loadbar._width = getPercent100;
_parent.loadtext = Math.round(getPercent100)+"%";
if (bytes_loaded == bytes_total) {
gotoAndPlay(“website”, 1);
}
It looks correct to me. It still isn’t working?
If the only issue is that it goes right to the movie, my only guess would be that you don’t have enough content to preloader (which is a good thing… it means it loads super quick).
-
You gave your textbox the instance name of “loadtext”, when it should be the <B>var</B> name of “loadtext” (there is a difference).
-
_root.loadBar._width = getPercent100 should be _root.loadBar._width = getPercent325; since the width of your loadBar is 325.
-
All you have is a box and text in your portfolio… there is no need to preload, it loads up quick. But I think your preloader code is still fine.
Everything works great over here.