MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference page 845

Actionscript language reference
Table of Contents

Advertisement

The opposite situation can also occur; that is, you might create a child SWF file that wants to
allow its parent to script it, but doesn't know what the domain of its parent will be. In this
situation, call
System.security.allowDomain(_parent._url)
situation, you don't have to wait for the parent SWF file to load; the parent will already be loaded
by the time the child loads.
Example
The SWF file located at www.macromedia.com/MovieA.swf contains the following lines:
System.security.allowDomain("www.shockwave.com");
loadMovie("http://www.shockwave.com/MovieB.swf", my_mc);
Because MovieA contains the
variables in MovieA. If MovieA didn't contain this command, the Flash security implementation
would prevent MovieB from accessing MovieA's objects and variables.
See also
MovieClip._url, MovieClipLoader.onLoadComplete, _parent,
System.security.allowInsecureDomain()
command, MovieB can access the objects and
allowDomain()
from the child SWF. In this
System.security.allowDomain()
845

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash mx

Table of Contents