Discount Assignment: If/Else Statement
Its an assignment that I've spent hours on:
http://imageshack.us/a/img834/7124/273e.png
http://imageshack.us/a/img706/4691/fhfd.png
That's how far I've gotten so far, next up is my code:
__________________________________________________________________________________________________________________________
var body_txt:TextField = new TextField();
body_txt.x = 225;
body_txt.y = 300;
body_txt.autoSize = TextFieldAutoSize.LEFT;
var myFormat:TextFormat= new TextFormat();
var yourPurchase:String;
var yourDiscount:String;
var yourPrice:String;
var discount:Number;
var total:Number;
yourPurchase = max_txt.text;
discount: 10.00 / 10%
yourDiscount = discount_txt.text;
yourPrice = price_txt.text;
total = yourPurchase - discount
if(yourDiscount)
{
trace();
}
else
{
trace();
}
__________________________________________________________________________________________________________________________
As you can see, I have no clue on how to get the discount written in code, I don't know how.
Please explain as best as you can about how to solve this dilemma (in Laymen's Terms if possible). Thank you!
