OnEnterFrameBeacon rocks, Yo!

If I would have only know about this sooner - damn. You can do some really cool things with this and helps to break your MovieClip dependence. I found this article and it got me started. Based on what I learned I created this class based version.

import mx.transitions.OnEnterFrameBeacon;

class NonMovieClipEnterFrameHavingClass {
  public function NonMovieClipEnterFrameHavingClass() {
   OnEnterFrameBeacon.init();
   MovieClip.addListener(this);
  }

  public function onEnterFrame():Void {
   trace("OnEnterFrameBeacon, Yo!");
  }
}


Comments are closed.