HTTP to HTTPS protocol access between SWF files
707
HTTP to HTTPS protocol access
between SWF files
You must use an
allowDomain
handler or method to permit a SWF file in one domain to be
accessed by a SWF file in another domain. However, if the SWF file being accessed is hosted
at a site that uses a secure protocol (HTTPS), the
allowDomain
handler or method doesn’t
permit access from a SWF file hosted at a site that uses an insecure protocol. To permit such
access, you must use the
LocalConnection.allowInsecure Domain()
or
System.security.allowInsecureDomain()
statements. See
“Allowing HTTP to HTTPS
protocol access between SWF files” on page 707
for more information.
Allowing HTTP to HTTPS protocol access between
SWF files
In addition to the exact-domain matching rules, you must explicitly permit files hosted at sites
using a secure protocol (HTTPS) to be accessed by files hosted at sites using an insecure
protocol. Depending on whether the called file is published for Flash Player 6, 7, or 8, you
must implement either one of the
allowDomain
statements (see
“Cross-domain and
subdomain access between SWF files” on page 696
), or use the
LocalConnection.allowInsecure Domain
or
System.security.allowInsecureDomain()
statements.
For example, if the SWF file at https://www.someSite.com/data.swf must allow access by
a SWF file at http://www.someSite.com, the following code added to data.swf allows
this access:
// Within data.swf
System.security.allowInsecureDomain("www.someSite.com");
my_lc.allowInsecureDomain = function(sendingDomain:String):Boolean {
return (sendingDomain == "www.someSite.com");
};
WARN
ING
Implementing an
allowInsecureDomain()
statement compromises the security offered by
the HTTPS protocol. You should make these changes only if you can’t reorganize your
site so that all SWF files are served from the HTTPS protocol.
Содержание FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
Страница 1: ...Learning ActionScript 2 0 in Flash...
Страница 8: ...8 Contents...
Страница 18: ...18 Introduction...
Страница 30: ...30 What s New in Flash 8 ActionScript...
Страница 66: ...66 Writing and Editing ActionScript 2 0...
Страница 328: ...328 Interfaces...
Страница 350: ...350 Handling Events...
Страница 590: ...590 Creating Interaction with ActionScript...
Страница 710: ...710 Understanding Security...
Страница 730: ...730 Debugging Applications...
Страница 780: ...780 Deprecated Flash 4 operators...
Страница 830: ...830 Index...