I got his error:
Symbol=ftc_game, layer=end game, frame=1, Line 1 '{' expected
Line 1 is:
function post_results(userid,session,score):void
Not sure why it says this error because there are alsready { symbol on next line, i have moved it to first line end also but still got same error.
I have wrote new code:
PHP Code:
function data_sent () {
trace("Data Sent");
}
function post_results(userid,session,score) {
var postData:URLVariables = new URLVariables();
postData.uid = '00031653156431'; //userid;
postData.ses = 'gtrgrwe6gt46e54hy6e5hy'; //session;
postData.scr = '5487';
// Post data to database
var loader:URLLoader = new URLLoader();
var req:URLRequest = new URLRequest("/site/post.php");
req.method = URLRequestMethod.POST;
req.data = postData;
try
{
loader.addEventListener(Event.COMPLETE,this.data_sent());
loader.load(req);
}
catch (error:Error)
{
trace("Unable to load requested document.");
}
}
This code uses Event.COMPLETE function but still not works
Help me please how to solve this.
Turkel.