Hi,
The "for" loop is meant to run as fast as the processor can take it,so you
will only see the progress bar move on a *very* slow pc.
You would normally fire the bar during each iteration of something that
takes some time, like loading images.
The process you are timing has to happen in separate steps, a long
computation can only trigger a progress bar if it is broken down into
smaller steps.
You can of course fake the process, and use a setTimeout, or
setInterval, as I did in the status example, and then fire the events that
the status is representing from the same setTimeout, slowing the process, so
you can see the progress at work.
I'm sure you know the example,
BTW the number 60 represents the number of steps in the loading process, so
in your example you would change it to 65.
called status or something: (I couldn't remember what a progressbar was
called, so I called it a status bar - duh)
http://www.resass.f2s.com/?menu=examples&node=14
Cheers,
Richard Bennett
[EMAIL PROTECTED]
www.richardinfo.com
(Everything running on, and ported to the 19/12/2000 snapshot of DynAPI2)
----- Original Message -----
From: "GORTSILAS ANDREAS" <[EMAIL PROTECTED]>
To: "Dynapi-Help Mailing List (E-mail)" <[EMAIL PROTECTED]>
Sent: Sunday, January 28, 2001 10:06 AM
Subject: [Dynapi-Help] status...
> I want to display a progress bar when I do some work...
>
> Do I have to use the SetIntervel in order to see the user the progress?
>
> Is there any other way?
>
> In the following example the user does not see anything (ither than the
> alerts)
>
> DynAPI.include('dynacore.api.*')
> DynAPI.include('dynaetc.ri.status')
> var Load;
> DynAPI.onLoad=function() {
> Load = new riStatus(200,100,250,19,'gray','darkblue',60,'of test
> completed')
> DynAPI.document.addChild(Load);
> }
>
> function RunIT() {
> alert('start');
> for (i = 0; i < 65; i++) Load.increaseTo(i);
> alert('end');
> }
> </script>
> <
>
>
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-help
> ____________________________________________________________
> Get your free domain name and domain-based e-mail from
> Namezero.com. New! Namezero Plus domains now available.
> Find out more at: http://www.namezero.com
>
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help