Showing posts with label legacy code. Show all posts
Showing posts with label legacy code. Show all posts

30 May 2008

Exopolis Online Ads

Just launched a new Flex minisite: Exopolis Online Ads.

(If you poke around long enough you might find a few little bugs, but it's mostly done.)

This is (obviously) a promotional piece for our banner ad capabilities. Doing the project in Flex made a lot of things easier: transitions, placement, deep-linking, back/forward button capabilities.

It's a bit risky loading banners directly into Flash, but fortunately Flex's AVM1Movie component largely keeps the banner functionality in its own "sandbox" (with a few exceptions that need tending to). Flash banner ads have some of the hackiest programming you'll ever care to see, but fortunately AVM1Movie prevents 99% of it from affecting the rest of the site.

I did get one nice, reuseable thing out of it, too: the MouseScrollCanvas component that controls those scrolling lists of links.

Which reminds me ... I really have to consolidate all the reuseable code I've written someday and release it....

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....