hi,

i want to create a movie that shows the percentage of files downloaded (i use it so people do not need to wait before all images used on my website downloads.) For this purpose i use the following sript i javascript:

var Imgi = new Array();
var Bledy = 0;
var preloadTimer;
var preloadOK = ''
var preloadBlad = ''

function preload(url) {
if (document.images) {
var i = Imgi.length;
Imgi[i] = new Image();
Imgi[i].onerror = preloadOnError;
Imgi[i].src = url;
}
}

function preloadOnError() {
Bledy++;
}

function preloadStart(ok, blad) {
preloadOK = ok;
preloadBlad = blad;
preloadCheck();
}

function preloadCheck() {
var i=0;
var l=Imgi.length;
var b = Bledy;

while (i<l && Imgi[i].complete || b-->0) i++;
if(i<=60) document.ff.tt.value=i + " / 60"; else document.ff.tt.value=i + " / " + i;
if (i>=l)
if (Bledy==0)
eval(preloadOK)
else
eval(preloadBlad)
else
preloadTimer = setTimeout('preloadCheck()',100);
}

function check() {

if (Imgi[0].complete)
{
preloadTimer = setTimeout('check()',100);
} else
{

preload('home.gif');
preload('home_on.gif');
preload('imprezy.gif');
preload('imprezy_on.gif');
preload('kalendarz.gif');
preload('kalendarz_on.gif');
preload('forum.gif');
preload('forum_on.gif');
preload('galeria.gif');
preload('galeria_on.gif');
preload('linki.gif');
preload('linki_on.gif');
preload('jaktrafic.gif');
preload('jaktrafic_on.gif');
preload('graf/subskrypcja.jpg');
preload('graf/partnerzy.jpg');
preload('graf/nowosci.jpg');
preload('graf/kontakt.gif');
preload('graf/data_bg.jpg');
preload('graf/logo_short.gif');
preload('graf/repertuar_up.gif');
preload('graf/faq_up.gif');
preload('graf/repertuar_down.gif');
preload('graf/faq_down.gif');
preload('graf/repertuar_right.bmp');
preload('graf/faq_right.bmp');
preload('graf/repertuar_left.bmp');
preload('graf/faq_left.bmp');
preload('graf/sbl.bmp');
preload('graf/sbp.bmp');
preload('graf/logo.swf');

preload('graf/kal_zol_up.gif');
preload('graf/kal_zol_left.bmp');
preload('graf/kal_zol_down.gif');
preload('graf/kal_pom_up.gif');
preload('graf/kal_pom_left.bmp');
preload('graf/kal_pom_down.gif');
preload('graf/galeria_zol.gif');
preload('graf/galeria_pom.gif');

preload('graf/nr/nr0p.gif');
preload('graf/nr/nr1p.gif');
preload('graf/nr/nr2p.gif');
preload('graf/nr/nr3p.gif');
preload('graf/nr/nr4p.gif');
preload('graf/nr/nr5p.gif');
preload('graf/nr/nr6p.gif');
preload('graf/nr/nr7p.gif');
preload('graf/nr/nr8p.gif');
preload('graf/nr/nr9p.gif');
preload('graf/nr/nr0z.gif');
preload('graf/nr/nr1z.gif');
preload('graf/nr/nr2z.gif');
preload('graf/nr/nr3z.gif');
preload('graf/nr/nr4z.gif');
preload('graf/nr/nr5z.gif');
preload('graf/nr/nr6z.gif');
preload('graf/nr/nr7z.gif');
preload('graf/nr/nr8z.gif');
preload('graf/nr/nr9z.gif');

preloadStart('window.location = "index.php?action=home"' , 'window.location = "index.php?action=home"');

}

}


function dai()
{
preload('loading.swf');
check();
}


where dai() begins everythibg;
Important is so everyone can see how many files are already downloaded (numer or percentage - no difference). How to connect it with 3DFA. Is it possible.

3DFA says that :
'images' is not a property of Null:'Undefined variable' on line 8 if (document.images)


maybe some other ideas how to do it?

thanks in advance