PDA

View Full Version : Bulk Loading of Assets



BruceBannor
June 16th, 2009, 03:34 PM
This isn't a question of how, so much as it is why? I've already got a bulk loader / data pool that sequentially loads assets in by pre-loading.

I've always done this with little thought as to why. I've found myself in a conversation trying to explain why I always took this approach. What's the advantage over simultaneously loading all the assets with multiple loaders.

1. I assume you could freeze your flash app if you had enough going at once
2. And also, it's easier to track bytesLoaded/bytesTotal
3. If anything else such as the preloader animation is playing it would lag.

But does anyone have any more info regarding this or any actual documentation besides what I think? Or are my assumptions even correct? :sure:

Thanks!!

JonnyR
June 16th, 2009, 04:56 PM
BruceBannor,

The HTTP spec (and as a result, most web browsers in which the Flash Player is running) will limit the number of open connections to a single domain's CNAME to two. Subsiquent requests will be "queued" until the open connection is closed.

To be honest with you, the best approach for loading multiple assets would be to switch to the BulkLoader Classes (which are avaliable under the MIT License), which can be found here: http://code.google.com/p/bulk-loader/

Jonny.

BruceBannor
June 17th, 2009, 09:25 AM
Thanks, I'm already using BulkLoader. This just came up in a conversation and I realized I knew to do it but not why and that bothered me.