security (System.security)
1061
■
(Flash Player 8 only)
"*"
You can pass a wildcard ("*") to
System.security.allowDomain()
to allow all domains,
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
allowDomain()
call, MovieB can access the objects and
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)
,
onLoadComplete
(MovieClipLoader.onLoadComplete event listener)
,
_parent (MovieClip._parent
property)
,
_url (MovieClip._url property)
,
allowInsecureDomain
(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
System.security.allowDomain()
, but it also
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
allowInsecureDomain()
method lifts this
restriction when the HTTPS SWF file being accessed uses it.
Use
allowInsecureDomain()
only to enable scripting from non-HTTPS files to HTTPS
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
allowDomain()
instead.
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...