View Full Version : preloading
Audrius
January 21st, 2003, 01:32 AM
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
lostinbeta
January 21st, 2003, 01:40 AM
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).
Audrius
January 21st, 2003, 01:46 AM
I have this script for my buttons:
on (release) {
_root.contents.loadMovie("about.swf");
}
and the sam with every button
lostinbeta
January 21st, 2003, 01:49 AM
Ok, then in your preloader code change everything that says _root to _parent.
Audrius
January 21st, 2003, 01:56 AM
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
lostinbeta
January 21st, 2003, 01:57 AM
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?
Audrius
January 21st, 2003, 01:59 AM
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 = getPercent*100;
_parent.loadtext = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
gotoAndPlay("website", 1);
}
lostinbeta
January 21st, 2003, 02:05 AM
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).
lostinbeta
January 21st, 2003, 02:56 AM
1) You gave your textbox the instance name of "loadtext", when it should be the <B>var</B> name of "loadtext" (there is a difference).
2) _root.loadBar._width = getPercent*100 should be _root.loadBar._width = getPercent*325; since the width of your loadBar is 325.
3) 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.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.