Forum Moderators: open

Message Too Old, No Replies

preloader

make load to 100% before starting movie

         

jeremymack

12:01 am on Oct 19, 2005 (gmt 0)

10+ Year Member



my code:

onClipEvent (enterFrame) {
mctotal = _root.getBytesTotal();
mcloaded = _root.getBytesLoaded();
mcpercent = Math.round((mcloaded/mctotal)*100);
display = mcpercent+"%";
progress_mc._xscale = mcpercent;
if (mcloaded == mcpercent) {
_root.play();
}
}

problem is that my movie only loads to 6% before the movie begins to play...so users cannot navigate the site since the rest of the content hasnt loaded yet!

Lynque

2:03 am on Oct 19, 2005 (gmt 0)

10+ Year Member



Hi jeremymack

It looks like the problrem lies in the if statement, if any % is loaded - it goes to _root.play(); in this line "if (mcloaded == mcpercent)"

You have to set a hard 100%

if (mcpercent == 100) {
_root.play();
}
}

try that...

should work.

jeremymack

2:29 am on Oct 19, 2005 (gmt 0)

10+ Year Member



it still starts once 6% is loaded

i have the preloader on the main timeline controlling the movieclips which sit on both the main timeline and nested inside of other clips...

thanks for the suggestion tho

Lynque

2:41 am on Oct 19, 2005 (gmt 0)

10+ Year Member



Just out of curiosity, are you testing in an actual browser or in flash (F12)?

If you are testing in a browser, clear the cache.

Might work.

jeremymack

7:33 am on Oct 19, 2005 (gmt 0)

10+ Year Member



testing in both

tested swf, tested streaming at 56k, and then uploaded and tested it in browser

still playing when loader is at 6%