how to listen the loading progress of awd file?

Software: Away3D 4.x

yesbaba, Newbie
Posted: 30 August 2011 04:10 AM   Total Posts: 13

i didn’t find a interface in loader3D
so how to know the loading progress of loader3D

   

Richard Olsson, Administrator
Posted: 30 August 2011 06:40 AM   Total Posts: 1192   [ # 1 ]

We are still contemplating how to best support a progress tracking interface. The problem with AssetLoader (and Loader3D and AssetLibrary which both use AssetLoader) is that unlike the native Flash loader classes, AssetLoader can load any number of files at the same time. When you load an AWD file, there is no way for the framework to know whether it will just be a single AWD file, or 100 files, because the AWD file might depend on 99 external textures.

So, if we would simply add a “progress” property, that is based on the number of loaded bytes in relation to the number of total bytes of dependencies that have started loading at any given time, you will be seeing this progress jumping up and down. It will increase as bytes are loaded, but then it will decrease as the number of total bytes increase when a new dependency is found.

So bottom line is: There is unfortunately no reliable, general way of doing this that wouldn’t mean completely bloating the interface. We are still considering what would be the best option. Any opinions are welcome!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X