For f%'s sake

Out of context: Reply #2

  • Started
  • Last post
  • 10 Responses
  • ********
    0

    btw, below s.it is something like that on the sample.swf, but it only damn shows 21.498634890 kinda percentage !?!

    onClipEvent (enterFrame) {
    // check to see if this movie has been loaded yet
    if (_parent.doneLoading == 0) {
    // total file size
    total = _parent._parent.getBytesTotal();
    // number of bytes loaded so far
    isloaded = _parent._parent.getBytesLoaded...
    // raw percentage calculated
    p = 100*(isLoaded/total);
    // print bytes to display text
    _parent.bytes = int(isloaded/1000) add " KB of " add int(total/1000) add " KB";
    // print percent to display text
    _parent.percent = int(p) add "%";
    // scale the bar visual display
    _parent.bar._xscale = p;
    // tell the movie this movie clip is embedded in to advance to frame 2 and play
    if (Number(p)>Number(95)) {
    // tell the movie the preloader is embedded in to advance to frame 2 and play
    _parent._parent.gotoAndPlay(Numb...
    // turn the preloader off
    _parent.gotoAndStop("off");
    // prohibit the preloader from loading again... look at the first line of this script
    _parent.doneLoading = 1;
    } else {
    // if it's not loaded... the movie that the preloader is embedded in will chill on frame one until the movie is loaded
    _parent._parent.gotoAndPlay(Numb...
    }
    }
    }

View thread