In this simple app I have two MC buttons each when clicked adds a value to a "total" variable which is displayed in real time. This all works fine however as you can see the button can be de-selected so I want to be able to subtract the value that was added when selected.
This is part of a much larger form and I want the user to be able to change their mind and see the results.
Dude that is perfect. I was having a heck of a time with the if then else statement. This works great. Now Ill try to impliment in the much larger file and see how it goes.
One small issue. I cleaned up the code on the buttons but having an issue with stotal value.
If you compile and run this FLA, select the first then the second then the third choices then deselect in reverse till all are deselected you will see it returns an invalid number , should be zero (0), it also displays 4 decimal places, I have tried to add a function to limit to 2 decimal places but I can't seem to get it to work and even though I need that function not sure if it will fix the bad end value.