This is
awesome:
http://www.adobe.com/devnet/flash/articles/timelinewatcher.html
Basically, instead of sticking this
on frames in the timeline:
dispatchEvent(new Event("animationHasFinished"));
You can just listen for frame
label events:
timelineWatcher = new TimelineWatcher(this);
timelineWatcher.addEventListener(TimelineEvent.LABEL_REACHED, handleTimelineEvent);
I'm so excited I don't even mind that this long line of code is breaking the formatting of this blog!