STEP:1
MAKE BackGround LAYER WITH 1 FRAME AND PASTE IMAGE
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
STEP:2
MAKE Textbox LAYER WITH 1 FRAME AND DRAW TEXT BOX
TYPE IN TEXT BOX VARIABLE BOX display
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
STEP:3
MAKE Button LAYER WITH 1 FRAME AND
MAKE 1 BUTTON AND MAKE 19 COPIES OF THIS BUTTON
NOW PASTE INSIDE CODES ONE BY ONE IN BUTTONS
------------------------------------------------------------------------------------------------------
//UNDER BUTTON DOT SIGN CODE
//PRESS C BUTTON THEN PRESS DOT BUTTON AND TYPE VALUE
// BECAUSE WITHOUT C BUTTON U CAN NOT TYPE DOT VALUE
on(press){
if(decimal == 0){
digit = ".";
call("AddDigit");
decimal = 1;
}
}
//UNDER BUTTON 0 CODE
on(press){
digit = 0;
call("AddDigit");
}
//UNDER BUTTON 1 CODE
on(press){
digit = 1;
call("AddDigit");
}
//UNDER BUTTON 2 CODE
on(press){
digit = 2;
call("AddDigit");
}
//UNDER BUTTON 3 CODE
on(press){
digit = 3;
call("AddDigit");
}
//UNDER BUTTON 4 CODE
on(press){
digit = 4;
call("AddDigit");
}
on(press){
digit = 4;
call("AddDigit");
}
//UNDER BUTTON 5 CODE
on(press){
digit = 5;
call("AddDigit");
}
on(press){
digit = 5;
call("AddDigit");
}
//UNDER BUTTON 6 CODE
on(press){
digit = 6;
call("AddDigit");
}
//UNDER BUTTON 7 CODEon(press){
digit = 6;
call("AddDigit");
}
on(press){
digit = 7;
call("AddDigit");
}
//UNDER BUTTON 8 CODE
on(press){
digit = 8;
call("AddDigit");
}
//UNDER BUTTON 9 CODE
on(press){
digit = 9;
call("AddDigit");
}
//UNDER BUTTON PLUS CODE
on (press){
call("DoOperator");
operator = "+";
operand1 = display;
}
//UNDER BUTTON MINUS CODE
on (press){
call("DoOperator");
operator = "-";
operand1 = display;
}
//UNDER BUTTON MULTIPLY CODE
on (release){
call("DoOperator");
operator = "*";
operand1 = display;
}
//UNDER BUTTON DIVIDE CODE
on (press){
call("DoOperator");
operator = "/";
operand1 = display;
}
//UNDER BUTTON CE CODE
on(press){
operand1 = 0;
display = 0;
operator = "";
clear = 0;
decimal = "false";
}
//UNDER BUTTON C CODE
on(press){display = 0;
decimal = 0;
}
//UNDER BUTTON MRC CODE
on(press){
display = memory;
memory = 0;
clear = 1;
}
//UNDER BUTTON M+ CODE
on(press){
memory = memory + display;
}
//UNDER BUTTON EQUAL CODE
on (press){
call("DoOperator");
}
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
STEP:4
MAKE Label LAYER WITH THREE FRAMES AND
LABELIZE FRAME NO:2 AND FRAME NO:3
FRAME NO:2 = AddDigit
FRAME NO:3 = DoOperator
HERE AddDigit LABEL NAME
HERE DoOperator LABEL NAME
------------------------------------------------------------------------------------------------------
STEP:5
MAKE Action LAYER WITH THREE FRAMES AND
PASTE CODE INSIDE FRAME CODES ONE BY ONE
------------------------------------------------------------------------------------------------------
//Action LAYER FRAME 1 CODE
memory = 0;
sp = 0;
display = 0;
stop ();
//Action LAYER FRAME 2 CODE
if(clear == 1){
clear = 0;
decimal = 0;
display = 0;
}
if (display == 0 && digit != "."){
display = digit;
}
else{
display = display add digit;
}
//Action LAYER FRAME 3 CODE
if (operator eq "+"){
display = operand1 * 1 + display * 1;
}
if (operator eq "-"){
display = operand1 - display;
}
if (operator eq "*"){
display = operand1 * display;
}
if (operator eq "/"){
display = operand1 / display;
}
operator = "=";
clear = 1;
decimal = 0;
EmoticonEmoticon