Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

XML-RPC Flash Implementation

nonnux white
NN Dez!gns
Join date: 8 Oct 2004
Posts: 90
07-29-2005 23:04
hello folks!

i am testing a actionscript xmlrpc implementation.

i got this code:
CODE

//Call this when button is pressed
callMethod = function(){
//make new RPC Connection Object
var RPCConn = new XMLRPC.Connection();
RPCConn.Server="http://xmlrpc.secondlife.com/cgi-bin/xmlrpc.cgi";

//Handle method response
RPCConn.OnLoad = function(methodResponse){
_root.myResult.text = "OK"; // methodResponse;
}

//Clear old parameters, usually shouldn't be any
RPCConn.ClearParameters();

MyArray = new Array();
MyArray.push({name: "Channel", type: "string", value: "baa77aaa-b190-9e11-b2c8-c01f4d58e915"});
MyArray.push({name: "StringValue", type: "string", value: "How are you?"});
MyArray.push({name: "IntValue", type: "int", value: 0});
// string Channel, string StringValue, int IntValue
//no parameters needed
RPCConn.AddParameter(MyArray ,XMLRPC.types.STRUCT);

//Call Method
// RPCConn.Call("llRemoteData");
RPCConn.setMethod("llRemoteData");
//If callng a simple method name, you could say:
RPCConn.Render();

//Display message for user
myResult.text = "Please wait...";
}


this is supposed to be talking with my box using this LSL script example

nothing happens, no error, no nothing, whats wrong?
_____________________
Xantor Welesa
Registered User
Join date: 16 Jun 2005
Posts: 18
08-02-2005 00:31
MyArray.push({name: "Channel", type: "string", value: "baa77aaa-b190-9e11-b2c8-c01f4d58e915"});

You -are- changing this value to the channel assigned to your object right?

*X*
nonnux white
NN Dez!gns
Join date: 8 Oct 2004
Posts: 90
08-02-2005 01:23
yes, of course. i stoped searching the bug. i just built my own function. is very primitive, but is comunicating correctly with SL. still testing it, soon i got more news!
_____________________