flash actionscript:
Hi and thanks in advance for any input you can give.
Here's what I would like to do:
First, go here and you can where I am at present:
[L=current preloader]
http://www.alexisneel.com/test/BWshortTest2.html[/L]
You will notice that everything's works according to plan. However, what I
would like to happen is this...
I would like to retain the "percentage loaded" amount showing up as it does
now, and continue to go from 0% to 100%. However, what I would like that
100% to represent is actually only about 1/3 of the actual total amount of
the file size. In other words, as it stands, it does take some time to load
such a big file. Granted the viewer can see that it is progressing (a good
thing), but I'd like to take advantage of the Flash feature that allows the
viewer to start viewing something before it is actually totally loaded. For
example, go to the main part of my [L=site]
http://www.alexisneel.com/en/[/L]
You
will see the "loading" happening (this is being done with "ifFrameloaded" and
"gotoAndPlay" code). Fine. But the movie starts way before
the whole file is loaded. You are just getting enough to start viewing the
page and the rest is still downloading. Now click on "galleries", then on one
of the images. Again, you will see "Loading" and in just a few seconds, you
will start to see the images fading in. In actuality, even though you are
starting to see the movie, 2/3's of it is still being loaded in background.
THIS is what I'd like to do, but again, keeping the percentage amount going
to 100% (which will equal roughly 35% of the total file size), even though
100% isn't really loaded. That way, the "loading amount" will go by quicker,
and the viewer won't (hopefully) get fed up and leave.
Does that all make sense and is it possible.
Here is my code for the ...BWshortTest2.html link
Thanks again.
Alexis
bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
percent_loaded = (bytes_loaded/bytes_total)*100;
_root.enlarger = percent_loaded;
_root.loadText = Math.round(percent_loaded)+"% Loaded";
if (bytes_loaded == bytes_total) {
_root.gotoAndPlay(6);
}