Kalutz

05-18-2011, 08:50 AM

Hello! ;)

I've just begun with Adobe as3, and I would need some easy help by you guys.

I'm going to do an alcometer, where I write numbers in two input-text boxes. Then they're going to multiply with each others and then divide with 40 and the product should come up in a new text box. (Dynamic-text box)

At the moment I got something like this:

math_btn.addEventListener(MouseEvent.CLICK, calculate);

function calculate(event:MouseEvent):void

{

result_txt.text=String(Number(capacity_txt) * Number(percentage_txt) / 40)

}

math_btn = the button where I click to use the function calculate.

capacity_txt = one of the input text boxes.

percentage_txt = the other input text box.

result_txt = the dynamic text box, where the result should come up.

Please help me :)

I've just begun with Adobe as3, and I would need some easy help by you guys.

I'm going to do an alcometer, where I write numbers in two input-text boxes. Then they're going to multiply with each others and then divide with 40 and the product should come up in a new text box. (Dynamic-text box)

At the moment I got something like this:

math_btn.addEventListener(MouseEvent.CLICK, calculate);

function calculate(event:MouseEvent):void

{

result_txt.text=String(Number(capacity_txt) * Number(percentage_txt) / 40)

}

math_btn = the button where I click to use the function calculate.

capacity_txt = one of the input text boxes.

percentage_txt = the other input text box.

result_txt = the dynamic text box, where the result should come up.

Please help me :)