I have added my connection on the main timeline. I can also run the
'serviceObject.insertStat("7028799","1","00:00") ;' line which works from the
main timeline.
I need to be able to run the 'serviceObject.insertStat("7028799","1","00:00")
;' from with a screen or movie clip that has been loaded into another level.
How do i reference the object properly?
_root._level0.serviceObject.insertStat("7028799","1","00:00") ;?
Do i need to include anything such as the top 3 lines?
Code:
#include "NetServices.as"
#include "NetDebug.as"
#include "DataGlue.as"
// Connect to the gateway and create a service object ** only run this code
once **
if (connected == null) {
connected = true;
NetServices.setDefaultGatewayUrl("http://localhost/flashservices/gateway/");
gatewayConnection = NetServices.createGatewayConnection();
serviceObject = gatewayConnection.getService("pureonline_.remoting.remoting",
this);
//trace ("connection made");
}
serviceObject.insertStat("7028799","1","00:00");
function insertStat_Result (result) {
var statUpdateID = result;
}
In my first screen on it's main timeline I have the code
The code doesn't seem to run. This is where I feel i am missing something.
I need to use the service i already established. hoping to not have to
re-write the connection details in all my loaded movieclips.
Code:
serviceObject.insertStat("7028799","1","00:00");
function insertStat_Result (result) {
trace("time added NEW:"+result);
_root._level0.curMember.text = result;
}
Thanks for any help.