Allowinsecuredomain (Localconnection.allowinsecuredomain Handler) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

allowInsecureDomain
(LocalConnection.allowInsecureDomain handler)
allowInsecureDomain = function([sendingDomain:String]) {}
Invoked whenever receiving_lc, which is in a SWF file hosted at a domain using a secure
protocol (HTTPS), receives a request to invoke a method from a sending LocalConnection
object that is in a SWF file hosted at a nonsecure protocol. Flash expects the code you
implement in this handler to return a Boolean value of
return true, the request from the sending object is ignored, and the method is not invoked.
By default, SWF files hosted using the HTTPS protocol can be accessed only by other SWF
files hosted using the HTTPS protocol. This implementation maintains the integrity
provided by the HTTPS protocol.
Using this method to override the default behavior is not recommended, as it compromises
HTTPS security. However, you might need to do so, for example, if you need to permit access
to HTTPS files published for Flash Player 7 or later from HTTP files published for Flash
Player 6.
A SWF file published for Flash Player 6 can use the
handler to permit HTTP to HTTPS access. However, because security is implemented
differently in Flash Player 7, you must use the
method to permit such access in SWF files published for Flash Player 7 or later.
Availability: ActionScript 1.0; Flash Player 7
Parameters
sendingDomain:String
contains the sending LocalConnection object.
Example
The following example allows connections from the current domain or from
www.macromedia.com, or allows insecure connections only from the current domain.
this.createTextField("welcome_txt", this.getNextHighestDepth(), 10, 10,
100, 20);
var my_lc:LocalConnection = new LocalConnection();
my_lc.allowDomain = function(sendingDomain:String) {
domain_txt.text = sendingDomain;
return (sendingDomain == this.domain() || sendingDomain ==
"www.macromedia.com");
};
my_lc.allowInsecureDomain = function(sendingDomain:String) {
return (sendingDomain == this.domain());
}
[optional] - A string that specifies the domain of the SWF file that
or
true
false
LocalConnection.allowDomain
LocalConnection.allowInsecureDomain()
. If the handler doesn't
event
LocalConnection
717

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

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

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF