# Button to do addition

**URL:** <https://forum.kirupa.com/t/button-to-do-addition/44917>\
**Category:** Uncategorized\
**Created:** [March 9, 2004, 8:11am UTC](https://forum.kirupa.com/t/button-to-do-addition/44917 "2004-03-09T08:11:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stockdill](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@stockdill](https://forum.kirupa.com/u/stockdill)\
**Post date:** [March 9, 2004, 8:11am UTC](https://forum.kirupa.com/t/button-to-do-addition/44917/1 "2004-03-09T08:11:09Z")

</div>

I hope someone can help. I am making a weakest link screen to use with pupils when doing a quiz. So far i have an 11 frame movie clip which shows the amount of prize money. I have a correct button which moves the movie clip to show £100, £200 etc. I have a wrong button which when pressed takes the moviclip back to frame 1,which shows £0.

What i want to do is work on the ‘bank’ clip. When i press this i want it to add whatever sum they have reached and display it in a dynamic text box. e.g. if they have reached the frame in the money movieclip which has £400 highlighted, then 400 will appear in the text box.  
I also want it to do addition, so that when the button is pressed the money movie clip might be in the frame which has £200 highlighted and then the total score box will show £600.

I think i want something along the lines

when the button is pressed,

if movie clip is in frame 1 then show 0 in text ( total score)  
if movie lcip is in frame 3 then add 300 to total score  
if moviclip is in frame 5 then add 500 to total score

But i have no idea about adding - i am rubbish at maths and avoid this section of flash.  
Could anyone point me in the right direction. stockdill
