In practice, if you need to specify a new application domain Applicationdomain when loader loading a child SWF, you need to choose the case.
1, when there is a stream in the loaded sub-SWF, such as video or sound, it is best to specify a new application domain Applicationdomain, if not specified, call _ldr.unloadandstop (), when the stream in the child SWF cannot be unloaded from memory, To understand why, learn more about application domain Applicationdomain, as follows:
var New Loader (); var New New applicationdomain (); Ldr.load (new urlrequest ("Child swf Address"), context);
2. You cannot specify a new application domain when a stream is not present in the loaded child SWF, but you need to communicate with the other SWF using custom events, and once you specify that the child SWF has its own program domain, you cannot communicate with the other SWF (including the parent SWF) through custom events.
var New Loader (); var New = applicationdomain.currentdomain;ldr.load (new urlrequest ("Child swf Address"), context); // Ldr.load (New URLRequest ("sub-SWF Address"));
[ActionScript 3.0] AS3.0 Loader If you need to specify a new application domain when loading a child SwF Applicationdomain