[ActionScript 3.0] AS3.0 Loader If you need to specify a new application domain when loading a child SwF Applicationdomain

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.