52
return (aDomain == "mydomain.com");
53
}
54
lc.aResult = function(aParam) {
55
trace("The sum is " + aParam);
56
}
// determine our domain and see if we need to truncate it
57
var channelDomain:String = lc.domain();
58
if (getVersion() >= 7 && this.getSWFVersion() >= 7)
59
{
// split domain name into elements
60
var domainArray:Array = channelDomain.split(".");
// if more than two elements are found,
// chop off first element to create superdomain
61
if (domainArray.length > 2)
62
{
63
domainArray.shift();
64
channelDomain = domainArray.join(".");
65
}
66
}
67
lc.connect("result");
68
lc.send("mydomain.com:sum", "aSum", channelDomain + ':' + "result",
"aResult", 123, 456);
See also
LocalConnection.allowDomain
414
Chapter 2: ActionScript Language Reference
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?