PDA

View Full Version : Error #1063


thedudewithhair
02-29-2008, 10:09 AM
I am just starting with as3, and was building a calculator when the error popped up. I have no idea what it means. Can someone please help me?
The error message said:
"ArgumentError: Error #1063: Argument count mismatch on calc_fla::MainTimeline/oneClick(). Expected 0, got 1"

function oneClick(){
if(input1or2 = false){
if (dec == true){
input1 += Math.pow(0.1, decPlaceValue) * 1;
decPlaceValue ++;
}else{
input1 = input1 * 10 + 1;
}
input_txt.text=String(input1);
}else{
if (dec == true){
input2 += Math.pow(0.1, decPlaceValue) * 1;
decPlaceValue ++;
}else{
input2 = input2 * 10 + 1;
}
input_txt.text=String(input2);

}
}
input1or2 determines if it is the second input or first,
dec determines if it is decimal

can someone please help me!

panel
02-29-2008, 10:26 AM
It meands that you have to pass Event (MouseEvent in this case) as event handler function param

function oneClick(evt:MouseEvent):void
...

xwielder
02-29-2008, 11:08 AM
And, (not related to your question)

if(input1or2 = false)

should be

if(input1or2 == false)

panel
02-29-2008, 12:39 PM
And, (not related to your question)

if(input1or2 = false)

should be

if(input1or2 == false)


or

if(!input1or2)

thedudewithhair
02-29-2008, 02:46 PM
Thanks!