Hi all!
I have a problem with the code below.
It sends the vars to the submit.php but it doesnt load them. All files are in the same folder.
Get the .fla --> here
var oListener:Object = new Object();
this.onEnterFrame = function() {
ratio.text = score;
lvData.scored = score;
trace(lvData);
oListener.click = function(oEvent:Object):Void {
lvData.sendAndLoad("submit.php", lvRecieved, "POST");
};
lvRecieved.onLoad = function(bSuccess:Boolean):Void {
if (success) {
trace(this.received);
} else {
gotoAndStop(2);
trace("error");
}
};
};
slider.scrollFace.onPress = function() {
startDrag(this, false, 0, 0, 196, 0);
this.onEnterFrame = function() {
score = (this._x/2)/14;
score *= 100;
score = Math.floor(score);
score /= 100;
};
};
slider.scrollFace.onMouseUp = function() {
stopDrag();
};
submit.addEventListener("click", oListener);
stop();