15 February 2008

Happy Belated Valentine's Day!

We at Exopolis launched a "reboot" of our charming, wacky, retro Valentine's Day Mix Tape yesterday:

XOXO, Exo.

It features 26 songs selected by 26 of us. For my song, click here.

I did not actually have a hand in developing this thing, but I did have some "fun" reviving it. The original project was done two years ago by people who are no longer here, and the source files seem to have vanished. I had to decompile the SWF using Sothink SWF Decompiler. It did a pretty good job overall, but there were a couple of bugs that took me hours to track down.

First of all, functions seem to always be formatted this way:
function myFunction(arg1, arg2) {
// function body
...rather than this way:
myFunction = function(arg1, arg2) {
// function body
Now, normally that doesn't make a difference, and the former version is indeed preferable. But that changes if the declaration is actually supposed to be used to set a class field. A class field like, oh, say onEnterFrame. In that case, the former syntax simply declares a function and then does nothing with it, instead of actually setting the class's native handler. Fun.

Second of all (and this is not the decompiler's fault), Windows font names and Macintosh font names often differ. I spent hours trying to figure out why the "Send to a Friend" form wasn't working until I finally figured out that the dynamically-created text fields were referencing a font called "GFYKersti". In Windows, the exact same font's name is "GFY Kersti". Don'cha just love errors that boil down to a single character difference?

Anyway, now it works and we have the source properly archived in CVSDude. Back to developing new stuff in AS3 rather than trying to revive old stuff in AS2....

No comments:

Post a Comment