Skip to content
Ecce Signum

Ecce Signum

Immanentize the Empathy

  • Home
  • About Me
  • Published Works and Literary Matters
  • Laboratory

Day: February 17, 2004

Building a Better Timeline

2004-02-17 John Winkelman

I’m a programmer. And I like working in Flash. The timeline is an integral part of Flash, and I hate it. I don’t like touching anything in the development environment, ever.

So I wrote one in Actionscript. It was surprisingly simple.

 // this goes in an external actionscript file
 var frameCounter = 0;
 // position in the timeline
 var loopSize = 200;
 // length of the timeline
 this.onEnterFrame = function() {
 switch(frameCounter) {
 case 1: // something which happens on frame 1
 break;
 case 9: // something which happens on frame 9
 break;
 case 42: // something which happens on frame 42
 break;
 }
 frameCounter = (frameCounter+1) % loopSize;
 }

…and that is all there is to it. The only frames I have to worry about are the ones in which something actually happens. No filler necessary. No more digging through dozens of layers spread across hundreds of frames for a mis-typed variable.

And I did it myyyyyyyy wayyyyyyyyyyyyy!!!!!!

Posted in Programming comment on Building a Better Timeline

Personal website of John Winkelman

Archives

Categories

Posts By Month

February 2004
S M T W T F S
1234567
891011121314
15161718192021
22232425262728
29  
« Jan   Mar »

Twitter Feed

JohnWinkelmanJohn Winkelman@JohnWinkelman·
7 Mar

New blog post. Got some books. Felt some ennui. http://eccesignum.org/2021/03/07/march-already-and-still/
#aleksandrsolzhenitsyn #apexbookcompany #andotherstoriespublishing #parisreview #amreading #russianliterature

Reply on Twitter 1368562949296709639Retweet on Twitter 1368562949296709639Like on Twitter 1368562949296709639Twitter 1368562949296709639
JohnWinkelmanJohn Winkelman@JohnWinkelman·
7 Mar

It's been a long week.

Reply on Twitter 1368431629610459140Retweet on Twitter 1368431629610459140Like on Twitter 13684316296104591403Twitter 1368431629610459140
JohnWinkelmanJohn Winkelman@JohnWinkelman·
2 Mar

I just backed Chronicles of the Immortal Swordsmen #1 on @Kickstarter https://www.kickstarter.com/projects/1617982296/chronicles-of-the-immortal-swordsmen-1?ref=android_thanks_twitter_share

Reply on Twitter 1366742012481966080Retweet on Twitter 1366742012481966080Like on Twitter 13667420124819660801Twitter 1366742012481966080
Load More...

Links of Note

Reading, Writing
Tor.com
Locus Online
The Believer
File 770
IWSG

Watching, Listening
WYCE Electric Poetry
Writing Excuses Podcast
Our Opinions Are Correct

News, Politics, Economics
Naked Capitalism
Crooked Timber

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

© 2021 Ecce Signum

Proudly powered by WordPress | Theme: x-blog by wpthemespace.com