03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

allowInsecureDomain (security.allowInsecureDomain<br />

method)<br />

public static allowInsecureDomain(domain:String) : Void<br />

Lets SWF files <strong>and</strong> HTML files in the identified domains access objects <strong>and</strong> variables in the<br />

calling SWF file, which is hosted using the HTTPS protocol. It also lets the SWF files in the<br />

identified domains access any other SWF files in the same domain as the calling SWF file.<br />

By default, SWF files hosted using the HTTPS protocol can be accessed only by other SWF<br />

files hosted using the HTTPS protocol. This implementation maintains the integrity<br />

provided by the HTTPS protocol.<br />

Macromedia does not recommend using this method to override the default behavior because<br />

it compromises HTTPS security. However, you might need to do so, for example, if you must<br />

permit access to HTTPS files published for Flash Player 7 or later from HTTP files published<br />

for Flash Player 6.<br />

A SWF file published for Flash Player 6 can use System.security.allowDomain() to permit<br />

HTTP to HTTPS access. However, because security is implemented differently in Flash<br />

Player 7, you must use System.Security.allowInsecureDomain() to permit such access in SWF<br />

files published for Flash Player 7 or later.<br />

Note: It is sometimes necessary to call System.security.allowInsecureDomain() with an<br />

argument that exactly matches the domain of the SWF file in which this call appears. This is<br />

different from System.security.allowDomain(), which is never necessary to call with a SWF<br />

file's own domain as an argument. The reason this is sometimes necessary with<br />

System.security.allowInsecureDomain() is that, by default, a SWF file at http://foo.com is not<br />

allowed to script a SWF file at https://foo.com, even though the domains are identical.<br />

Parameters<br />

domain:String - An exact domain name, such as www.myDomainName.com or<br />

store.myDomainName.com.<br />

Example<br />

In the following example, you host a math test on a secure domain so that only registered<br />

students can access it. You have also developed a number of SWF files that illustrate certain<br />

concepts, which you host on an insecure domain. You want students to access the test from<br />

the SWF file that contains information about a concept.<br />

// This SWF file is at https://myEducationSite.somewhere.com/mathTest.swf<br />

// Concept files are at http://myEducationSite.somewhere.com<br />

System.security.allowInsecureDomain("myEducationSite.somewhere.com");<br />

540 ActionScript classes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!