adv. preloader scripting problems

  • mrvix
  • Newbie
  • Newbie
  • mrvix
  • Posts: 7
  • Loc: Hong Kong

Post 3+ Months Ago

I am in need of an advanced preloader that show's percentage loaded. The catch is i need it to show 100% loaded when only 50% of an embeded movie has loaded so it will begin to play and the user doesnt have to wait for a full 100% load to see the start of the content. This is what i have....with no clue what to change
(i have played around with the values but that doesnt change that fact that it only wants to load the entire movie before executing gotoandplay) :

loadPercent = (Math.floor (_root.getBytesLoaded() / _root.getBytesTotal() * 100) + "%");
loadBytes = (Math.round((_root.getBytesLoaded() / 1024) * 1000) / 1000 + " Kb of " + Math.round((_root.getBytesTotal() / 1024) * 1000) / 1000 + " Kb total Loaded.");

if (_root.getBytesLoaded() == _root.getBytesTotal()){

loadPercent = "100%";
loadBytes = (Math.round((_root.getBytesLoaded() / 1024) * 1000) / 1000 + " Kb of " + Math.round((_root.getBytesTotal() / 1024) * 1000) / 1000 + " Kb total Loaded.");

gotoAndPlay(20);
}


help?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

oooh, that would be some kind of streaming.
for that you should hace
if (_root.getBytesLoaded() >= _root.getBytesTotal()/2)
{
... bla bla
}

also, loadPercent = (Math.floor (_root.getBytesLoaded() *2 / _root.getBytesTotal() * 100) + "%");

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 8 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.