Web server logs - Example The following example shows how a LocalConnection
Monday, February 25th, 2008Example The following example shows how a LocalConnection object in a receiving SWF file can permit SWF files from any domain to invoke its methods. Compare this to the example in LocalConnection.connect(), in which only SWF files from the same domain can invoke the Trace method in the receiving SWF file. For a discussion of the use of the underscore (_) in the connection name, see LocalConnection.send(). var aLocalConnection = new LocalConnection(); aLocalConnection.Trace = function(aString) { aTextField = aTextField + aString + newline; } aLocalConnection.allowDomain = function() { // Any domain can invoke methods on this LocalConnection object return true; } aLocalConnection.connect(”_trace”); In the following example, the receiving SWF file accepts commands only from SWF files located in thisDomain.com or thatDomain.com. var aLocalConnection = new LocalConnection(); aLocalConnection.Trace = function(aString) { aTextField = aTextField + aString + newline; } aLocalConnection.allowDomain = function(sendingDomain) { return(sendingDomain==”thisDomain.com” || sendingDomain==”thatDomain.com”); } aLocalConnection.connect(”_trace”); See also LocalConnection.connect(), LocalConnection.domain(), LocalConnection.send() LocalConnection.allowInsecureDomain Availability Flash Player 7. Usage receiving_lc.allowInsecureDomain = function([sendingDomain]) { // Your statements here return true or false } Parameters sendingDomain An optional parameter specifying the domain of the SWF file containing the sending LocalConnection object. Returns Nothing. LocalConnection.allowInsecureDomain 437
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.