Hello All,
I am having trouble converting my total price in the cart text field to decimal. I have on the main timeline I have a several numeric steppers and add to cart button.
In my .as file I have the following code that takes the price * quantity and displays the total but not in the decimal $10.00 format. I have tried everything from Math.ceil, round, etc. It either will round up or just display the number with no decimal.
[COLOR=blue].AS File Code[/COLOR]
public function GetCartValue(decimals:Number) {
var dataforAlternate = _level.BodyOilsMc.my_nstep.value;
moneysign= "$";
//trace("AS File"+""+dataforAlternate+" Products");
WhiteAmberOil = 5.00;
WhiteAmberOilTotal = (WhiteAmberOil*dataforAlternate);
//trace(WhiteAmberOilTotal);
//CartCalc is the var for the text box that displays the total value once the add to cart button is selected
_level0.CartCalc =(moneysign + WhiteAmberOilTotal);
}
Any help is greatly appreciated!
Thank you!