0 Replies Latest reply on Mar 4, 2007 12:07 PM by laphlegm

    preloader script

    laphlegm Level 1
      I am new to scripting, so this is probably a pretty easy fix. I have the following code for my preloader:

      onClipEvent (load) {
      total = _parent.getBytesTotal();

      onClipEvent (enterFrame) {
      loaded = _parent.getBytesLoaded();
      percent = int(loaded/total*100);
      perc1 = ""+percent+"%";
      if (loaded == total) {

      As of now, the clip loads fine in another swf, but I want the clip to start playing before is has fully been loaded so that it cuts down on the time the viewer has to wait, say at 75% loaded, or 65% for example. How would I change the above code?

      Also, how would I change it to reflect in the percentage as well, for example, if it starts playing when it is really 65% loaded, how would the code change to show that it is fully loaded, in the percentage and the full loading bar, even though it really isn't...

      Does that make sense? Thanks for the help.