-------------------------------------------------------------------------------------------------------
KalkulatorFlash8
https://www.youtube.com/watch?v=H7IvquSlPOA
http://cssplantillas.es.tl/Calculadoras-Flash.htm
https://www.scribd.com/doc/80692391/Calculadora-Con-Flash-y-Action-Script
http://www.amblesideprimary.com/ambleweb/mentalmaths/Calculator.swf
https://88fbbe62324103b6816f807f8bf4f2b767f4f12c.googledrive.com/host/0BzTF4maHDSaGZHlYdVEwanloQzA/calculadora01.swf
https://88fbbe62324103b6816f807f8bf4f2b767f4f12c.googledrive.com/host/0BzTF4maHDSaGZHlYdVEwanloQzA/calculadora05.swf
https://googledrive.com/host/0BzTF4maHDSaGZHlYdVEwanloQzA/calculadora04.swf
-------------------------------------------------------------------------------------------------------
CODES:
-------------------------------------------------------------------------------------------------------
//SET VARIABLE IN TEXT BOX Display
Display = "";
proses = "kosong";
Display = "" +Display+0;
}
tombol1.onRelease=function(){
Display = "" +Display+1;
}
tombol2.onRelease=function(){
Display = "" +Display+2;
}
tombol3.onRelease=function(){
Display = "" +Display+3;
}
tombol4.onRelease=function(){
Display = "" +Display+4;
}
tombol5.onRelease=function(){
Display = "" +Display+5;
}
tombol6.onRelease=function(){
Display = "" +Display+6;
}
tombol7.onRelease=function(){
Display = "" +Display+7;
}
tombol8.onRelease=function(){
Display = "" +Display+8;
}
tombol9.onRelease=function(){
Display = "" +Display+9;
}
tombolClear.onRelease=function(){
Display = 0;
}
tombolPlus.onRelease=function(){
angkal = Display * 1;
proses = "tambah";
Display = "";
}
tombolMinus.onRelease=function(){
angkal = Display * 1;
proses = "kurang";
Display = "";
}
tombolKali.onRelease=function(){
angkal = Display * 1;
proses = "kali";
Display = "";
}
tombolBagi.onRelease=function(){
angkal = Display * 1;
proses = "bagi";
Display = "";
}
tombolHasil.onRelease=function(){
angka2 = Display * 1;
if(proses=="tambah"){
Display = angkal * 1 + angka2 * 1;
}
if(proses=="kurang"){
Display = angkal - angka2 ;
}
if(proses=="kali"){
Display = angkal * angka2 ;
}
if(proses=="bagi"){
Display = angkal / angka2 ;
}
proses = "kosong";
}
-------------------------------------------------------------------------------------------------------
OR USE THIS CODE:
//PART 1
var Total:String = "";
Btn0.onRelease=function(){
Total = "" +Total+0;
Txt1.text = Total
}
Btn1.onRelease=function(){
Total = "" +Total+1;
Txt1.text = Total
}
Btn2.onRelease=function(){
Total = "" +Total+2;
Txt1.text = Total
}
Btn3.onRelease=function(){
Total = "" +Total+3;
Txt1.text = Total
}
Btn4.onRelease=function(){
Total = "" +Total+4;
Txt1.text = Total
}
Btn5.onRelease=function(){
Total = "" +Total+5;
Txt1.text = Total
}
Btn6.onRelease=function(){
Total = "" +Total+6;
Txt1.text = Total
}
Btn7.onRelease=function(){
Total = "" +Total+7;
Txt1.text = Total
}
Btn8.onRelease=function(){
Total = "" +Total+8;
Txt1.text = Total
}
Btn9.onRelease=function(){
Total = "" +Total+9;
Txt1.text = Total
}
BtnClear.onRelease=function(){
Total = "0";
Txt1.text = Total
}
//PART 2
Calculator = "AS2";
BtnPlus.onRelease=function(){
Num1 = Total * 1;
Calculator = "PlusStage";
Total = "";
Txt1.text = Total
}
BtnMinus.onRelease=function(){
Num1 = Total * 1;
Calculator = "MinusStage";
Total = "";
Txt1.text = Total
}
BtnMultiply.onRelease=function(){
Num1 = Total * 1;
Calculator = "MultiplyStage";
Total = "";
Txt1.text = Total
}
BtnDivide.onRelease=function(){
Num1 = Total * 1;
Calculator = "DivideStage";
Total = "";
Txt1.text = Total
}
--------------------------------------------------------------------------------------------------------------------
I USED THIS CODE BUTT IT SHOW ERROR
Nan
--------------------------------------------------------------------------------------------------------------------
//http://myslide.es/documents/calculadora-con-flash-y-action-script.html
//http://myslide.es/embed/calculadora-con-flash-y-action-script.html
//PART 1
var One: Number = 1;
var Two: Number = 2;
var Three: Number = 3;
var Four: Number = 4;
var Five: Number = 5;
var Six: Number = 6;
var Seven: Number = 7;
var Eight: Number = 8;
var Nine: Number = 9;
var zero: Number = 0
//PART 2
var Valor1:Number;
var Valor2:Number;
var Total:Number;
var Operacion:Number;
//PART 3
Btn1.addEventListener(MouseEvent.CLICK,escribe1)
function escribe1(event:MouseEvent){
result.appendText(One.toString());
}
Btn2.addEventListener(MouseEvent.CLICK,escribe2)
function escribe2(event:MouseEvent){
result.appendText(Two.toString());
}
Btn3.addEventListener(MouseEvent.CLICK,escribe3)
function escribe3(event:MouseEvent){
result.appendText(Three.toString());
}
Btn4.addEventListener(MouseEvent.CLICK,escribe4)
function escribe4(event:MouseEvent){
result.appendText(Four.toString());
}
Btn5.addEventListener(MouseEvent.CLICK,escribe5)
function escribe5(event:MouseEvent){
result.appendText(Five.toString());
}
Btn6.addEventListener(MouseEvent.CLICK,escribe6)
function escribe6(event:MouseEvent){
result.appendText(Six.toString());
}
Btn7.addEventListener(MouseEvent.CLICK,escribe7)
function escribe7(event:MouseEvent){
result.appendText(Seven.toString());
}
Btn8.addEventListener(MouseEvent.CLICK,escribe8)
function escribe8(event:MouseEvent){
result.appendText(Eight.toString());
}
Btn9.addEventListener(MouseEvent.CLICK,escribe9)
function escribe9(event:MouseEvent){
result.appendText(Nine.toString());
}
Btn0.addEventListener(MouseEvent.CLICK,escribe0)
function escribe0(event:MouseEvent){
Valor1 = parseInt(result.text);
result.text = ""
Operacion = 0;
}
btnmas.addEventListener(MouseEvent.CLICK, primersumando);
function primersumando(event:MouseEvent){
Valor1 = parseInt(result.text);
result.text = ""
Operacion = 0;
}
btnmenos.addEventListener(MouseEvent.CLICK, minuendo);
function minuendo(event:MouseEvent){
Valor1 = parseInt(result.text);
result.text = ""
Operacion = 1;
}
btnequis.addEventListener(MouseEvent.CLICK, primerfactor);
function primerfactor(event:MouseEvent){
Valor1 = Number(result.text);
result.text = ""
Operacion = 2;
}
btndivision.addEventListener(MouseEvent.CLICK, dividendo);
function dividendo(event:MouseEvent){
Valor1 = Number(result.text);
result.text = ""
Operacion = 3;
}
btnigual.addEventListener(MouseEvent.CLICK, calcular);
function calcular(event:MouseEvent){
if (Operacion == 0){
Total = Valor1 + Valor2;
}
else if (Operacion == 1){
Total = Valor1 - Valor2;
}
else if (Operacion == 2){
Total = Valor1 * Valor2;
}
else if (Operacion == 3){
Total = Valor1 / Valor2;
}
result.text=""
result.appendText(Total.toString());
}
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
//AS2 CALCULATOR
//PASTE Total IN TEXT BOX VARIABLE BOX
Total = "";
Calculator = "AS2";
Btn0.onRelease=function(){
Total = "" +Total+0;
}
Btn1.onRelease=function(){
Total = "" +Total+1;
}
Btn2.onRelease=function(){
Total = "" +Total+2;
}
Btn3.onRelease=function(){
Total = "" +Total+3;
}
Btn4.onRelease=function(){
Total = "" +Total+4;
}
Btn5.onRelease=function(){
Total = "" +Total+5;
}
Btn6.onRelease=function(){
Total = "" +Total+6;
}
Btn7.onRelease=function(){
Total = "" +Total+7;
}
Btn8.onRelease=function(){
Total = "" +Total+8;
}
Btn9.onRelease=function(){
Total = "" +Total+9;
}
BtnClear.onRelease=function(){
Total = 0;
}
BtnPlus.onRelease=function(){
Num1 = Total * 1;
Calculator = "PlusStage";
Total = "";
}
BtnMinus.onRelease=function(){
Num1 = Total * 1;
Calculator = "MinusStage";
Total = "";
}
BtnMultiply.onRelease=function(){
Num1 = Total * 1;
Calculator = "MultiplyStage";
Total = "";
}
BtnDivide.onRelease=function(){
Num1 = Total * 1;
Calculator = "DivideStage";
Total = "";
}
BtnEqual.onRelease=function(){
Num2 = Total * 1;
if(Calculator=="PlusStage"){
Total = Num1 * 1 + Num2 * 1;
}
if(Calculator=="MinusStage"){
Total = Num1 - Num2 ;
}
if(Calculator=="MultiplyStage"){
Total = Num1 * Num2 ;
}
if(Calculator=="DivideStage"){
Total = Num1 / Num2 ;
}
Calculator = "AS2";
}
-----------------------------------------------------------------------------------------------------------------
FLASH 8 CALCULATOR
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
PASTE TEXT BOX IN 3 FRAME PASTE VARIABLE IN ITS VARIABLE BOX
int1; int2; total
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
PASTE BUTTON IN 3 FRAME AND PASTE INSIDE BUTTON CODE
-----------------------------------------------------------------------------------------------------------------
//INSIDE BUTTON FRAME1 CODE
on(press){
a = int1;
gotoAndPlay(2);
}
//INSIDE BUTTON FRAME2 CODE
on(press){
c = int2;
gotoAndPlay(3);
}
//INSIDE BUTTON FRAME3 CODE
on (press){
gotoAndPlay(1);
}
-----------------------------------------------------------------------------------------------------------------
LAYER 2 FRAME CODES
-----------------------------------------------------------------------------------------------------------------
//LAYER 2 FRAME 1 CODE
var a = 0;
var b = 0;
var c = 0;
int1 = 0;
int2 = 0;
stop();
//LAYER 2 FRAME 2 CODE
stop();
//LAYER 2 FRAME 3 CODE
stop();
onEnterFrame = function(){
total = Number(a) + Number(c);
}
-----------------------------------------------------------------------------------------------------------------
OR USE THIS CODE:
//PART 1
var Total:String = "";
Btn0.onRelease=function(){
Total = "" +Total+0;
Txt1.text = Total
}
Btn1.onRelease=function(){
Total = "" +Total+1;
Txt1.text = Total
}
Btn2.onRelease=function(){
Total = "" +Total+2;
Txt1.text = Total
}
Btn3.onRelease=function(){
Total = "" +Total+3;
Txt1.text = Total
}
Btn4.onRelease=function(){
Total = "" +Total+4;
Txt1.text = Total
}
Btn5.onRelease=function(){
Total = "" +Total+5;
Txt1.text = Total
}
Btn6.onRelease=function(){
Total = "" +Total+6;
Txt1.text = Total
}
Btn7.onRelease=function(){
Total = "" +Total+7;
Txt1.text = Total
}
Btn8.onRelease=function(){
Total = "" +Total+8;
Txt1.text = Total
}
Btn9.onRelease=function(){
Total = "" +Total+9;
Txt1.text = Total
}
BtnClear.onRelease=function(){
Total = "0";
Txt1.text = Total
}
//PART 2
Calculator = "AS2";
BtnPlus.onRelease=function(){
Num1 = Total * 1;
Calculator = "PlusStage";
Total = "";
Txt1.text = Total
}
BtnMinus.onRelease=function(){
Num1 = Total * 1;
Calculator = "MinusStage";
Total = "";
Txt1.text = Total
}
BtnMultiply.onRelease=function(){
Num1 = Total * 1;
Calculator = "MultiplyStage";
Total = "";
Txt1.text = Total
}
BtnDivide.onRelease=function(){
Num1 = Total * 1;
Calculator = "DivideStage";
Total = "";
Txt1.text = Total
}
--------------------------------------------------------------------------------------------------------------------
I USED THIS CODE BUTT IT SHOW ERROR
Nan
--------------------------------------------------------------------------------------------------------------------
//http://myslide.es/documents/calculadora-con-flash-y-action-script.html
//http://myslide.es/embed/calculadora-con-flash-y-action-script.html
//PART 1
var One: Number = 1;
var Two: Number = 2;
var Three: Number = 3;
var Four: Number = 4;
var Five: Number = 5;
var Six: Number = 6;
var Seven: Number = 7;
var Eight: Number = 8;
var Nine: Number = 9;
var zero: Number = 0
//PART 2
var Valor1:Number;
var Valor2:Number;
var Total:Number;
var Operacion:Number;
//PART 3
Btn1.addEventListener(MouseEvent.CLICK,escribe1)
function escribe1(event:MouseEvent){
result.appendText(One.toString());
}
Btn2.addEventListener(MouseEvent.CLICK,escribe2)
function escribe2(event:MouseEvent){
result.appendText(Two.toString());
}
Btn3.addEventListener(MouseEvent.CLICK,escribe3)
function escribe3(event:MouseEvent){
result.appendText(Three.toString());
}
Btn4.addEventListener(MouseEvent.CLICK,escribe4)
function escribe4(event:MouseEvent){
result.appendText(Four.toString());
}
Btn5.addEventListener(MouseEvent.CLICK,escribe5)
function escribe5(event:MouseEvent){
result.appendText(Five.toString());
}
Btn6.addEventListener(MouseEvent.CLICK,escribe6)
function escribe6(event:MouseEvent){
result.appendText(Six.toString());
}
Btn7.addEventListener(MouseEvent.CLICK,escribe7)
function escribe7(event:MouseEvent){
result.appendText(Seven.toString());
}
Btn8.addEventListener(MouseEvent.CLICK,escribe8)
function escribe8(event:MouseEvent){
result.appendText(Eight.toString());
}
Btn9.addEventListener(MouseEvent.CLICK,escribe9)
function escribe9(event:MouseEvent){
result.appendText(Nine.toString());
}
Btn0.addEventListener(MouseEvent.CLICK,escribe0)
function escribe0(event:MouseEvent){
Valor1 = parseInt(result.text);
result.text = ""
Operacion = 0;
}
btnmas.addEventListener(MouseEvent.CLICK, primersumando);
function primersumando(event:MouseEvent){
Valor1 = parseInt(result.text);
result.text = ""
Operacion = 0;
}
btnmenos.addEventListener(MouseEvent.CLICK, minuendo);
function minuendo(event:MouseEvent){
Valor1 = parseInt(result.text);
result.text = ""
Operacion = 1;
}
btnequis.addEventListener(MouseEvent.CLICK, primerfactor);
function primerfactor(event:MouseEvent){
Valor1 = Number(result.text);
result.text = ""
Operacion = 2;
}
btndivision.addEventListener(MouseEvent.CLICK, dividendo);
function dividendo(event:MouseEvent){
Valor1 = Number(result.text);
result.text = ""
Operacion = 3;
}
btnigual.addEventListener(MouseEvent.CLICK, calcular);
function calcular(event:MouseEvent){
if (Operacion == 0){
Total = Valor1 + Valor2;
}
else if (Operacion == 1){
Total = Valor1 - Valor2;
}
else if (Operacion == 2){
Total = Valor1 * Valor2;
}
else if (Operacion == 3){
Total = Valor1 / Valor2;
}
result.text=""
result.appendText(Total.toString());
}
-------------------------------------------------------------------------------------------------------
//AS2 CALCULATOR
//PASTE Total IN TEXT BOX VARIABLE BOX
Total = "";
Calculator = "AS2";
Btn0.onRelease=function(){
Total = "" +Total+0;
}
Btn1.onRelease=function(){
Total = "" +Total+1;
}
Btn2.onRelease=function(){
Total = "" +Total+2;
}
Btn3.onRelease=function(){
Total = "" +Total+3;
}
Btn4.onRelease=function(){
Total = "" +Total+4;
}
Btn5.onRelease=function(){
Total = "" +Total+5;
}
Btn6.onRelease=function(){
Total = "" +Total+6;
}
Btn7.onRelease=function(){
Total = "" +Total+7;
}
Btn8.onRelease=function(){
Total = "" +Total+8;
}
Btn9.onRelease=function(){
Total = "" +Total+9;
}
BtnClear.onRelease=function(){
Total = 0;
}
BtnPlus.onRelease=function(){
Num1 = Total * 1;
Calculator = "PlusStage";
Total = "";
}
BtnMinus.onRelease=function(){
Num1 = Total * 1;
Calculator = "MinusStage";
Total = "";
}
BtnMultiply.onRelease=function(){
Num1 = Total * 1;
Calculator = "MultiplyStage";
Total = "";
}
BtnDivide.onRelease=function(){
Num1 = Total * 1;
Calculator = "DivideStage";
Total = "";
}
BtnEqual.onRelease=function(){
Num2 = Total * 1;
if(Calculator=="PlusStage"){
Total = Num1 * 1 + Num2 * 1;
}
if(Calculator=="MinusStage"){
Total = Num1 - Num2 ;
}
if(Calculator=="MultiplyStage"){
Total = Num1 * Num2 ;
}
if(Calculator=="DivideStage"){
Total = Num1 / Num2 ;
}
Calculator = "AS2";
}
-----------------------------------------------------------------------------------------------------------------
FLASH 8 CALCULATOR
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
PASTE TEXT BOX IN 3 FRAME PASTE VARIABLE IN ITS VARIABLE BOX
int1; int2; total
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
PASTE BUTTON IN 3 FRAME AND PASTE INSIDE BUTTON CODE
-----------------------------------------------------------------------------------------------------------------
//INSIDE BUTTON FRAME1 CODE
on(press){
a = int1;
gotoAndPlay(2);
}
//INSIDE BUTTON FRAME2 CODE
on(press){
c = int2;
gotoAndPlay(3);
}
//INSIDE BUTTON FRAME3 CODE
on (press){
gotoAndPlay(1);
}
-----------------------------------------------------------------------------------------------------------------
LAYER 2 FRAME CODES
-----------------------------------------------------------------------------------------------------------------
//LAYER 2 FRAME 1 CODE
var a = 0;
var b = 0;
var c = 0;
int1 = 0;
int2 = 0;
stop();
//LAYER 2 FRAME 2 CODE
stop();
//LAYER 2 FRAME 3 CODE
stop();
onEnterFrame = function(){
total = Number(a) + Number(c);
}
-----------------------------------------------------------------------------------------------------------------
EmoticonEmoticon