No more code on the timeline

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!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Related posts

Comments

July 23. 2009 08:05

Nice one. There's also this FrameScriptManager class by Grant Skinner if you want to avoid events altogether and programatically set actions on a frame at runtime http://bit.ly/3HdUw

Ben

July 31. 2009 13:56

Great post! Keep up the good work!

Voguishchic

Comments are closed