AS3 - file on disk, size in bytes?
I have an image pre-loader that loads an uncertain number of external image files. I wish to show a progress bar based on the current bytes loaded vs the total bytes that need to be loaded for all images.
The problem I'm having is that the .bytesTotal (http://livedocs.adobe.com/labs/as3preview/langref/flash/display/LoaderInfo.html#bytesTotal) property of the Loader (http://livedocs.adobe.com/labs/as3preview/langref/flash/display/Loader.html) (well, technically the LoaderInfo (http://livedocs.adobe.com/labs/as3preview/langref/flash/display/LoaderInfo.html)) class always returns 0 until the first ProgressEvent is dispatched, which doesn't happen until after you begin loading the file. So I can't figure out a good way to find out what the grand total number of bytes that need to be loaded is unless I start all of my images loading simultaneously or somehow begin loading and then stop them from loading--either of which seems a poor solution to me.
I tried using the File (http://livedocs.adobe.com/labs/as3preview/langref/flash/filesystem/File.html) class to reference the .size (http://livedocs.adobe.com/labs/as3preview/langref/flash/net/FileReference.html#size) property, but this apparently only works in Flex, not in F9PA since the compiler didn't recognize the File class.
Any suggestions? Thanks.
~JC
#If you have any other info about this subject , Please add it free.# |

