PDA

Click to See Complete Forum and Search --> : How can create a preloader that shows the %?



Ukranianfreak
04-22-2004, 09:50 AM
I'm trying to learn how to create a preloader that shows you how much % it has loaded so far. Thank you all for your time!
www.tricitiesrussianchurch.org (http://www.tricitiesrussianchurch.org)

pellepiano
04-22-2004, 10:06 AM
Welcome here!
You will find many options in the Tutorial section of this site.



http://www.flashkit.com/tutorials/Interactivity/Bar_Prel-Eddie_Ca-48/index.php
http://www.flashkit.com/tutorials/Interactivity/Preloade-Eddie_Ca-33/index.php
http://www.flashkit.com/tutorials/Actionscripting/Expert/Advanced-Cathode-612/index.php

.....and more.

Ukranianfreak
04-22-2004, 10:19 AM
Thanks!!!

cobhc
04-24-2004, 11:09 AM
if you cant find it. Its this
onClipEvent(load) {
// get complete file size
totalFileSize = _root.getBytesTotal();

// hide progress bar
this._xscale = 0;
}

onClipEvent(enterFrame) {

// see how much has been loaded so far
bytesLoaded = _root.getBytesLoaded();

// convert to a value from 0 to 1
amountLoaded = bytesLoaded/totalFileSize;

// convert to a value from 0 to 100
percentLoaded = int(100*amountLoaded);

// set the scale of the progress bar
this._xscale = percentLoaded;

// set the text area in the main timeline
_root.loadingMessage = percentLoaded + "%";

// see if that is everything
if (amountLoaded >= 1.0) {
_root.gotoAndStop("complete");
}
}