Coding Flash Calculator Koding flash kalkulator

 Berikut Coding Flash Calculator 



Action Script 2.0 & 1.0...

Monngo.... Testimoni Disini

stop();

var firstnum   ="";

var secondnum  ="";

var answer     =" ";

var operators  ="";

//*Tombol Kali*//

on (release){

operators ="*";

firstnum = outputDsply.text

outputDsply.text="";

}

//*Tombol bAGI*//

on (release){

operators ="/";

firstnum = outputDsply.text

outputDsply.text="";

}

//*Tombol Sama Dengan*//

on (release) {

secondnum = outputDsply.text;

if (operators == "+")

{

answer = int(firstnum) + int(secondnum);

outputDsply.text = answer;

}



if (operators == "-")

{

answer = int(firstnum) - int(secondnum);

outputDsply.text = answer;

}


if (operators == "/")

{

answer = int(firstnum) / int(secondnum);

outputDsply.text = answer;

}


if (operators == "*")

{

answer = int(firstnum) * int(secondnum);

outputDsply.text = answer;

}


}

//*Coding Minus(Kurang)*//

on (release){

operators ="-";

firstnum = outputDsply.text

outputDsply.text="";

}

//*    Tombol Clear [Tombol C]*//

on (release) {

outputDsply.text="0"

}

//cODING aNGka//

on (release){

if (outputDsply.text=="0")

{

outputDsply.text="4"

}

else

{

outputDsply.text= outputDsply.text + "4"

}

}



Lebih baru Lebih lama