Hi =)
Ive used local connection before, it always comes up as a bit fishy, but the best reulst i got was following the emaple in the help file, but it only works when the files are online, and i need the receiving/listening SWF to be online…and the sending should be able to work both from localhost and a domain,
(following are from the help file):
ActionScript 2.0 Language Reference
[[COLOR=#0000ff]ActionScript classes[/COLOR] > [URL=“file:///C:/Documents%20and%20Settings/All%20Users/Application%20Data/Macromedia/Flash%208/en/Configuration/HelpPanel/Help/ActionScriptLangRef/00002338.html”][COLOR=#800080]Local[/COLOR][URL=“file:///C:/Documents%20and%20Settings/All%20Users/Application%20Data/Macromedia/Flash%208/en/Configuration/HelpPanel/Help/ActionScriptLangRef/00002338.html”][COLOR=#800080]Connection[/COLOR]](file:///C:/Documents%20and%20Settings/All%20Users/Application%20Data/Macromedia/Flash%208/en/Configuration/HelpPanel/Help/ActionScriptLangRef/00001893.html) > allowDomain (LocalConnection.allowDomain handler)
Example
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().
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 true;
};
my_lc.allowInsecureDomain = function(sendingDomain:String) {
return (sendingDomain == this.domain());
}
my_lc.sayHello = function(name:String) {
welcome_txt.text = "Hello, "+name;
};
my_lc.connect("_mylc");
The following example sends a string to the previous SWF file and displays a status message about whether the local connection was able to connect to the file. A TextInput component called name_ti, a TextArea instance called status_ta and a Button instance called send_button are used to display content
var sending_lc:LocalConnection;
var sendListener:Object = new Object();
sendListener.click = function(evt:Object) {
sending_lc = new LocalConnection();
sending_lc.onStatus = function(infoObject:Object) {
switch (infoObject.level) {
case 'status' :
status_ta.text = "LocalConnection connected successfully.";
break;
case 'error' :
status_ta.text = "LocalConnection encountered an error.";
break;
}
};
sending_lc.send("_mylc", "sayHello", name_ti.text);
};
send_button.addEventListener("click", sendListener);
it SHOULD be possible according to the help file…wich says
LocalConnection objects can communicate only among SWF files that are running on the same client computer, but they can be running in different applications–for [COLOR=red]example, a SWF file running in a browser and a SWF file running in a projector.[/COLOR]
if, they by that mean, browser eq online
Can anyone give me a pointer what to do?