I'm curious if you solved the problem Kerry. Also, if the describeType
helped you at all, and what your solution was. I'm doing a lot of swf
loading nowadays and I will undoubtedly run into this same issue you are
having/had.

thanks
Ktu

On Wed, Nov 10, 2010 at 9:00 PM, Ktu <ktu_fl...@cataclysmicrewind.com>wrote:

>
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/utils/package.html#describeType%28%29
>
> "If the value parameter is an instance of a type, the returned XML object
> includes all the instance properties of that type, but does not include any
> static properties"
>
> "The instance properties are nested inside a tag named <factory> to
> distinguish them from the static properties." - So Static properties live
> outside it ;)
>
> Just learning this myself. Maybe that was the issue. My suggestion of
> .content property is an instance of the class. Try using your var
> AssetLibrary:Class; as the parameter for describeType().
>
> If it still doesn't show up, you should seriously question whether the
> method was compiled. First though, try workarounds to call the method such
> as Keith's or Juan's suggestion or casting the content as a dynamic object
> and calling the method.
>
> var AssetLibrary:Object LoaderInfo(pEvent.target).content;
>
>     try {
>         AssetLibrary.initAssets(); //<--the error is here
>     } catch (e:ArgumentError) {
>         trace (e);
>     }
>
> just more thoughts. hope it helps...
>
>
> On Wed, Nov 10, 2010 at 3:17 PM, Kerry Thompson 
> <al...@cyberiantiger.biz>wrote:
>
>> Ktu wrote:
>>
>> try using describeType() to find out whats in the class and if the method
>> > has been compiled
>> >
>> > pEvent.target is a ContentLoaderInfo object right? You are using a
>> Loader
>> > object to load the swf right?
>> >
>>
>> Yes, pEvent.target is a ContentLoaderInfo object. I'm downloading the swf
>> with this:
>>
>>        private function loadSwf():void
>>        {
>>            var urlRequest:URLRequest = new URLRequest(url);
>>            loader = new Loader();
>>            loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
>> handleLoadComplete);
>>            loader.load(urlRequest);
>>        }
>>
>> and, in the handleLoadComplete handler, I'm getting the class with this:
>>
>> pEvent.target.applicationDomain.getDefinition("AssetLibrary") as Class;
>>
>> describeType() gives me some XML, but I don't see any of my public vars or
>> functions in it.
>>
>> Now I'm really confused, because I can see all my public vars in the
>> debugger, but not the public function. In the XML produced by
>> describeType(), I don't see much of anything I'm expecting. The only
>> methods
>> it lists are the inherited public events.
>>
>> Cordially,
>>
>> Kerry Thompson
>> _______________________________________________
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>
>
>
> --
> Ktu;
>
> The information contained in this message may be privileged and/or
> confidential. If you are NOT the intended recipient, please notify the
> sender immediately and destroy this message.
>



-- 
Ktu;

The information contained in this message may be privileged and/or
confidential. If you are NOT the intended recipient, please notify the
sender immediately and destroy this message.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to