BIT-101 [2003-2017]

Jungle Code


Every once in a while you inherit some project to fix up something that “some guy who did some Flash work for us a few years back” did. Sometimes you luck out and it’s not that bad. My coworker, Sam was not so lucky today. He got one of those ones with code on movie clips nested x levels deep. We call it “Jungle Code”, because it’s like hacking your way through vines and underbrush, watching out for snakes and alligators.

Beautiful, beautiful stuff like this gem:

_root.submenu.subbtn.vgnmenu.vgnbtn.tab1.onEnterFrame =  root.submenu.subbtn.vgnmenu.vgnbtn.tab1.onoff;

This line was in a function along with about a dozen other almost identical statements. This function was called from a button. There are thirty other buttons which call thirty other similar functions.

Or this one:

this.onPress = function() {
   _root.actnumb = "00010101";
   tellTarget (_root.navloader) {
      play();
   }
}

So we have a movie clip defining a callback for itself which uses tellTarget to tell a movie clip on _root to play! That is pure ART! actnumb, indeed!

[Edit: although this post is 3 1/2 years old, the owner of https://www.junglecode.net/ recently requested a link here. Not that the site has anything to do with this post, but, he’s an Adobe employee, so what the heck. :)]

« Previous Post
Next Post »