title: Flash Actionscript 3 & Oscillating Object Alpha Animation
body: <p>How would I go about animating via Actionscript in Flash something like the following?:</p>
  
  <p>I have several squares scattered on my stage with random Alpha values.  When the movie loads, I'd like each square to smoothly animate to whatever their current alpha value is to zero, then to 1, and repeat the cycle indefinitely. </p>
  
  <p>As a bonus, I'd like to be able to have each square stall for a period of time at alpha=1 before continuing to cycle.</p>
  
  <p>I've gathered from an online tutorial that I should set up my square (ImageTile) as an object:</p>
  
  <pre><code>package {
  
      import flash.display.*;
      import flash.events.*;
  
      public class ImageTile extends MovieClip {
  
          var tileAlpha = this.alpha;
  
          public function ImageTile() {
              // construct here
              this.addEventListener(Event.ENTER_FRAME, AnimateTile);
          }
  
          function AnimateTile(e:Event) {
              // animation to go here
          }
  
      }
  
  }
  </code></pre>
  
  <p>... but the math for what I want to do escapes me. Any help would be greatly appreciated!</p>