The Amazing Iron Man

Yesterday we bought a time slot at the nearby San Mateo AMC for the entire company to watch Ironman at 4pm. Everyone showed up which is usually a good sign. I loved all the previews (The Love Guru, You Don't Mess WIth The Zohan, The Hulk) and then the movie began.

It was 2 hours of amazing action, dialogue, acting and technological goodness. Robert Downey Jr. has completely vindicated himself with this movie IMO. And Jeff Bridges was, as always, bigger than life and extremely smooth even as an evil corporate Dude. The cars were awesome, the computers futuristic, the tech unbearably cool and the acting superb.

And even better, at the end of it, it's just the beginning for Ironman - the sequel will see Samuel L. Jackson as Nick Fury recruiting Ironman into S.H.I.E.L.D. As far as I'm concerned this is the highest quality comic brand that's seen the big screen. When I was a kid I was a Spiderman and Ironman devotee so this movie made me really happy.

Go see it!

ActionScript 3 Class Definition and Importing Sickness

Sorry, but this post is about some programming garbage.
Okay, so i decided to write a little ActionScript 3 code since it's all object-oriented and somehow "real" compared to the previous joke versions. I was trying to create a small class that did some simple stuff and get it working in the Flash environment. After reading several examples straight from Adobe and some forums I wrote what looked like a simple, pristine piece of code that should have worked.

The error I got when I tried running the code was this:

1180: Call to a possibly 
undefined method xxxx

This basically means that Flash couldn't find the class that I created. But I didn't get any errors from the "import" statement that references the .AS file that has the class in it (inside a package{}).

If I changed the filename I'm trying to import I get an error. Ok, so it knows the file is there but it cannot find the class inside the file for some reason.

I searched all over the net for an hour trying to find the answer to this problem. NOWHERE DID I FIND THE SOLUTION THAT I AM ABOUT TO GIVE YOU. The solution to the problem is something that, evidently, Flash programmers JUST KNOW from experience but the solution isn't written anywhere that I could find on the internet and my Flash coders don't know how they know the technicality I'm about to explain.

So it comes down to this: the way you write the name of your class MUST be the EXACT way you name the .AS file it's in.

For example: if I create a class named BugJar like so:

package
{
    public class BugJar
    {
        //...code...
    }
}

then I **MUST** save it in a file named BugJar.as!!!!

Inside my framecode I would have:

import BugJar;

...and it would work.

This is just completely disgusting to me as a programmer. Linking the name of a class to the filename of the file it's in is just wrong.

What's worse is that Flash doesn't even give you the proper error for this:

filename: bugjar.as

package
{
    public class BugJar
    {
        //...code...
    }
}

framecode:

import bugjar;
var jar:BugJar = new BugJar();

The above example WILL NOT WORK and Flash doesn't give you an error message that helps you understand or fix this problem that shouldn't exist in the first place.

Mew

A recent favorite group that I discovered (through my wife) is Mew, a very complex pop Danish band. Check out their website and you'll immediately notice by the insane navbar at the top, and the audio, that this group is really different.

Their 3rd album, Frengers (2003), was their first big hit album (check out the songs: 156, Am I Wry and Snow Brigade on YouTube) and their latest, "Mew. and the Glass-Handed Kites" is amazing. Check out the video of their single from this album, Special.