PDA

View Full Version : change amount of bytes loaded


alwinch@msn.com
04-09-2011, 03:11 AM
Hi, How would I change this code so it loads 30 percent befoe it stars playing rather then the full 100? Thanks!this.onEnterFrame = function() {
//get container size
bLoaded = container_mc.getBytesLoaded();
bTotal = container_mc.getBytesTotal();

//if container has not loaded
if (bLoaded != bTotal ) {
//show percentage loaded

loader._xscale = Math.round((bLoaded/bTotal)*100);
//if container is loaded


} else if (bLoaded>=bTotal && bLoaded>100 && bTotal>100) {
loader._xscale = 100;

//if loader is at 100
if (loader._xscale = 100) {
//hide loader

loader._xscale = 0;




}
}
}

tacos
04-10-2011, 04:08 AM
You could attempt to have the movie play when only 30% has in fact preloaded... But attempting depending on content, doesn't necessarily mean success!