Any help would be great.
if (jerseyType.text == "1")
price = 10;
if (jerseyType.text == "2")
price = 12;
if (playerNames.text == "Y" || playerNames.text == "y")
price += 1.50;
numberOfJerseys = int(numberOfPlayers.text) + int(numberOfCoaches.text);
totalCost = numberOfJerseys * price;
total.text = String(totalCost);
TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::MouseEvent@3310f559 to fl.motion.MotionEvent.
Your events are not in agreement... the function is getting a MouseEvent but you say it's a MotionEvent
Thank You that helped with the error.
Now when I use "y" it caculates the total 1, if I enter "n" it calculates correctly.
Any suggestions. I'm using Flash CS5
I don't see anything wrong with the code that would lead to that error, though if you are declaring numberOfJerseys as a Number, then you may as well cast the number of players and coaches as numbers as well. If the code you are now using differs from what you showed, then I cannot tell what you might have changed to make it work as you say it does.