hi.
i made a small game. the player needs to press as past as he can on the mouse before time runsout.
well, i want to send the score of the player by post (php)
i have read alot of guids but i didn’t mannaged to do thise, so i came here.
please help me.
you can see my code here:
stop();
var counter_num:Number=0;
var allow_start=true;
var first_time=true;
function start_play(){
this.onEnterFrame = function() {
timeIt+=1
if(timeIt<121){
second_hand._rotation = timeIt*3;
counter_txt.text=counter_num;
}else{
delete this.onEnterFrame;
counter_txt.text = counter_num+"- your score";
setTimeout(function():Void{allow_start=true,first_ time=true}, 1000);
}}}
clickIt.onRelease = function() {
if((allow_start==true)&&(first_time==true)){
first_time=false
allow_start=false;
start_play();
timeIt=0;
counter_num=0;
}if((allow_start==false)&&(first_time==false)){
counter_num+=1;
}}
sorry for my bad english,
thank you.