AS3, Flex 4.
I have an asset swf I'm downloading. It has a public static function I want
to call to initialize some stuff. FlashBuilder 4 is giving me an error,
though, and an odd one--"Incorrect number of arguments. Expecting one."
The function I'm trying to call is declared with no arguments:
public static function initAssets(): void
and I'm calling it when the load is complete:
private function handleLoadComplete(pEvent:Event):void
{
var AssetLibrary:Class;
AssetLibrary=
pEvent.target.applicationDomain.getDefinition("AssetLibrary") as Class;
try
{
AssetLibrary.initAssets(); //<--the error is here
}
catch (e:ArgumentError)
{
trace (e);
}
}
They are separate projects in Flex. What am I missing? Do they both need to
be in the same package? At the moment I don't have a package named. Or do
they need to be part of the same working set, perhaps?
Cordially,
Kerry Thompson
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders