|
-
Passing Multiple parameters with Local Connection HELP
Hi Guys
Just wondering if you can help me out....I am trying to pass multiple parameters with Local Connection...I can pass one piece of text between two swf's but cant get any further...If you show me how I could pass multiple parameters i.e name, surname, address etc from one swf to another I would be most appreciative...Good Times. Thanks, Tom
-
Registered User
hi,
Using LocalConnection.send() you can pass as many parameters as you wish.
You can have something like this:
PHP Code:
sending_lc.send("lc_name", "methodToExecute", param1, param2, param3, ..., paramN);
-
Thanks for that I changed my code to the below but it send the first parameter twice, have a look and see where I am going wrong...Much Appreciated.....Tom
Sender:
sending = new LocalConnection();
myButton.onPress = function() {
sending.send("myConnection", "methodToExecute", myMessage.text, myMessage2.text);
};
sending.onStatus = function(infoObject:Object) {
statusMessage.text = infoObject.level;
};
Receiver:
receiving = new LocalConnection();
receiving.methodToExecute = function(receivedMessage){
myMessage.text = receivedMessage;
myMessage2.text = receivedMessage;
}
receiving.connect("myConnection");
-
FK'n_dog
for multiple params -
PHP Code:
Receiver:
receiving = new LocalConnection();
receiving.methodToExecute = function(param1, param2){
myMessage.text = param1;
myMessage2.text = param2;
}
receiving.connect("myConnection");
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|