Guest User

Untitled

a guest
Aug 4th, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. _root.qnty.onChanged = function()
  2. {
  3.     estimatedP = 0;
  4.    
  5.     qty = Number(qnty.text);
  6.     if(qty < 600) {
  7.         estimatedP = qty*1;
  8.        
  9.     } else if (qty >= 600 && qty < 1200) {
  10.         estimatedP = qty*0.39;
  11.        
  12.     } else if (qty >= 1200 && qty < 2500) {
  13.         estimatedP = qty*0.29;
  14.     } else if (qty >= 2500 && qty < 5000) {
  15.         estimatedP = qty*0.27;
  16.     } else {
  17.         estimatedP = qty*0.23;
  18.     }
  19.     alert(estimatedP);
  20.     estprice.text = estimatedP;
  21.    
  22. }
Add Comment
Please, Sign In to add comment