Deepanjan Das wrote:

Hi Kerry,
> The problem is in these lines:
> var AssetLibrary:Class;
>
> AssetLibrary=pEvent.target.applicationDomain.getDefinition("AssetLibrary")
> as Class;
> You are calling a stattic function; so this is correct
> AssetLibrary.initAssets();
> But why are you defining the same class variable ahead, thats wrong.
> Static methods mean you can directly call those APIs without creating an
> instance.
>
> So just call AssetLibrary.initAssets() provided you have a AssetLibrary.as
> imported.
>

That makes sense, except I may not have the .as file. I need to be able to
download an asset swf written by another developer. That's why I'm getting
the class from the downloaded swf.

I tried adding an import statement, pointing to the location of the swf, and
got an error that it couldn't be found.

Maybe I need to have the other developer make it an RSL, because I need to
share it among different swf's. I don't understand why I can't call the
function, though. There are a number of public static vars in the downloaded
swf, and I can see them in the debugger. I can't see the public static
function, though, and the assets are not being initialized.

Cordially,

Kerry Thompson
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to