# EventHandler problem

**URL:** <https://forum.kirupa.com/t/eventhandler-problem/266833>\
**Category:** flash\
**Created:** [July 24, 2008, 6:53pm UTC](https://forum.kirupa.com/t/eventhandler-problem/266833 "2008-07-24T18:53:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![spectator](https://avatars.discourse-cdn.com/v4/letter/s/47e85d/32.png) [@spectator](https://forum.kirupa.com/u/spectator)\
**Post date:** [July 24, 2008, 6:53pm UTC](https://forum.kirupa.com/t/eventhandler-problem/266833/1 "2008-07-24T18:53:21Z")

</div>

I have created a function. In it I am listening to a change in 2 textFields. I get the values of them. I show their product in third textField. All this is working fine. But I want to sum all the products I get. I can’t figure put how to do this. ☹ First I was thinking of array and tried to push the value, then I tried join, but nothing work :(. This is my code:

```auto
private function onChange(event:Event):void {
         _num1 = Number(num1.text);
         _num2 = Number(num2.text);
         _proizvedenie = _num1 * _num2;
         proizvedenie.text = String(_proizvedenie);
         
}

```

Please someone help. I want to sum all the \_proizvedenie vars I’ll get. 10x in advance. I’ll be very grateful if someone helps 🙂
