(Flash Player 8 only)
You can pass a wildcard ("*") to
including local hosts, access to the calling SWF file. Before using the wildcard, be sure that
you want to provide such broad access to the calling SWF file. See the discussion in the
main description of this method.
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 call, the Flash Player security
implementation would prevent MovieB from accessing MovieA's objects and variables.
See also
addCallback (ExternalInterface.addCallback method)
(MovieClipLoader.onLoadComplete event listener)
,
property)
_url (MovieClip._url property)
(security.allowInsecureDomain method)
allowInsecureDomain (security.allowInsecureDomain
method)
public static allowInsecureDomain(domain:String) : Void
Lets SWF files and HTML files in the identified domains access objects and variables in the
calling SWF file, which is hosted by means of the HTTPS protocol. Macromedia does not
recommend using this method; see "Security considerations," later in this entry.
This method works in the same way as
permits operations in which the accessing party is loaded with a non-HTTPS protocol, and
the party being accessed is loaded with HTTPS. In Flash Player 7 and later, non-HTTPS files
are not allowed to script HTTPS files. The
restriction when the HTTPS SWF file being accessed uses it.
Use
allowInsecureDomain()
files. Use it to enable scripting when the accessing non-HTTPS file and the HTTPS file being
accessed are served from the same domain, for example, if a SWF file at http://mysite.com
wants to script a SWF file at https://mysite.com. Do not use this method to enable scripting
between non-HTTPS files, between HTTPS files, or from HTTPS files to non-HTTPS files.
For those situations, use
"*"
System.security.allowDomain()
allowDomain()
System.security.allowDomain()
allowInsecureDomain()
only to enable scripting from non-HTTPS files to HTTPS
instead.
allowDomain()
call, MovieB can access the objects and
,
onLoadComplete
,
_parent (MovieClip._parent
,
allowInsecureDomain
security (System.security)
to allow all domains,
, but it also
method lifts this
1061
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?