A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Passing Multiple parameters with Local Connection HELP

  1. #1
    Junior Member
    Join Date
    Aug 2005
    Posts
    29

    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

  2. #2
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    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"param1param2param3, ..., paramN); 

  3. #3
    Junior Member
    Join Date
    Aug 2005
    Posts
    29
    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");

  4. #4
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    for multiple params -
    PHP Code:
    Receiver:

    receiving = new LocalConnection();
    receiving.methodToExecute = function(param1param2){
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center