how to get names and types of every object of a swf file?
If I have a swf file, is it possible to retrieve object names and types (some kind of reflection) somehow?
Best regards开发者_高级运维
There is some good "little" discussion of reflection (or introspection) in ActionScript 3 here. It takes advantage of the special function describeType
found in the flash.utils
namespace. Which when passed an object reference, will return XML describing that object's structure. In particular, we are able to know for each propert of the object:
- the name of the property
- access rights (public, private, protected,etc)
- the datatype of the property.
but this solution might possibly only work is you have the source (.fla).
Another, much more detailed and authoritative discussion on the matter of introspection in ActionScript is here.
Hope this helps, or points you somewhere.
Well, for the case of only swf
, you might have to do some manual introspection by say loading the file into a flash ide or some other tool. Check the discussion here, it shows something like it.
精彩评论