Tuesday, July 3, 2012

[Action Script] How do you prevent External SWF from instantiating specific classes? July,2012

Hi I am developing an application that requires third party SWFs to be loaded into my application. Here is a list of some of the classes that I'd like to prevent instantiation of:

- flash.media.Sound
- flash.display.NativeWindow (Air)
- flash.display.Loader
- flash.display.ServerSocket

I'd like to extend these classes with my own so that I can filter content in these classes. The extensions will be available to 3rd party developers in my program's SDK. Is it possible to prevent these classes from being loaded inside of the external SWF?

ALSO: I will be loading the external SWFs as binary using the URLLoader (not the Loader) then loading the bytes using the Loader object's 'loadBytes' method. I will be passing in a LoaderContext object with 'allowScriptImport' set to true, a null SecurityDomain, and a null ApplicationDomain.

Please help. Thank you.
How do you prevent External SWF from instantiating specific classes?

Related Post



0 comments: