@Ross:

It is unfortunately absolutely impossible to create a general-purpose
way to define a name before loading a resource. Most file formats can
contain more than one asset (at the very latest, a resource usually
consists of at least a single mesh, one material and one bitmap.)
Which of these assets would get the name? As you can imagine, there is
no way for us to dictate such a thing, so you need to take care of
that yourself, because you are the only one who knows what you're
loading.

The easiest way, like Choons is suggesting, is to listen for
ASSET_COMPLETE and pick a name that you like in that event.


Cheers
/R

On May 16, 7:11 pm, Ross Smith <[email protected]> wrote:
> Hello,
>
> I've been surfing through the AssetLibrary, AssetLoader, AssetLoaderToken,
> etc files and looking for where the name of a loaded asset is set.  I'm
> trying to help myself before I take a question to the list, and this one has
> me stumped.  I can't find a way to associate a name to an asset at the time
> that I pass a URLRequest into AssetLibrary.load().  Ideally I'd like to name
> the asset so I can inspect its load state.
>
> At the moment I'm writing my own asset management class to interface with
> AssetLibrary to obtain this functionality via an associative array of
> AssetLoaderTokens.  I'd rather do it the library's way than my own, if the
> library does or will support this :)
>
> Thanks again for all the work done on Broomstick!
>
> --
> Ross Smith
> [email protected]

Reply via email to