title: as3 code for a blinking light?
body: <p>I am trying to make a game where people have to identify a lighthouse, and then drag a  symbol over to it. I have the drag and drop code fine, but I am wondering what is the best way to animate my lighthouse. I have a seperate movie clip called lightFlash that I am trying to time, and it will just sit beside the lighthouse. I am trying to use a timer to make it flash. What I want is it to wait 3 seconds, flash for a second, then wait 3 seconds etc. this is what I have so far, not a lot, so any help would be appreciated! </p>
  
  <pre><code>lightFlash.alpha=0;
  var myTimer:Timer = new Timer(3000);
  myTimer.addEventListener(TimerEvent.TIMER, timerListener);
  function timerListener(e:TimerEvent):void {
  lightFlash.alpha=1;
  //wait for one second
  }
  myTimer.start();
  </code></pre>
  
  <p>i can already see i would have a problem that i would be losing a second of the timer each time if i did it this way, there is probably a much better way I should be doing this, any help would be greatly appreciated thanks!</p>