title: How to convert simple Actionscript 1 to Actionscript 3
body: <p>I sometimes have to edit an old .fla file. The problem is that I updated to a newer version of Flash and now I can't export .swf's with actionscript1 anymore. The code is very simple, it just shows you how much you would save if you were paying $17.99/month vs whatever your current bill is. So if the starting value for the slider is 19 (the value on load), the monthly savings (onthly_savings.text) would be $1.01 &amp; savings over 6 months (six_months.text) would be $6.06. If the slider has been moved, then those two values are calculated based on the slider ratio:</p>
  
  <pre><code>this.onEnterFrame=function(){
      curr_bill.text=mySlider.ratio+19;
      ratio.text = (mySlider.ratio+17.99); 
      if (curr_bill.text=='19'){
          six_months.text='$6.06';
          monthly_savings.text='$1.01';
      }else{
          monthly_savings.text = '$'+(curr_bill.text-17.99);
          six_months.text = '$'+((6*curr_bill.text)-107.94);
      }
  }
  </code></pre>
  
  <p>Also there is this script which is on the slider itself:</p>
  
  <pre><code>this.ratio=0 ;
  dragger.onPress=function(){
      this.startDrag(true,0,0,line._width,0);
      this.onEnterFrame=function(){
          ratio=Math.round(this._x) ;
      }
  }
  dragger.onRelease=dragger.onreleaseOutside=stopDrag; 
  </code></pre>
  
  <p>How would I rewrite this to make it work in actionscript 3?</p>