Wolf3D = 16

So here I sit, typing this update on my MacBook, an amazing Apple product, writing about a game I worked on 16 years ago which just happened to be a mere 3 years after I stopped writing for my first Apple love, the Apple II platform. It's been a long time between heavy use of Apple products but now is the time for me to fully switch back into Apple mode. I'm already addicted to my iPhone, Apple TV and MacBook. Next up: iMac and Mac Pro and I'm off and away - goodbye Microsoft.

I just figured I'd announce my switch on Wolfy's birthday. The relevance? Wolfenstein 3D was a game lovingly crafted by 4 guys, 3 of which were longtime Apple II fanatics and coders; a game that was based on one of our all-time favorite Apple II games, Castle Wolfenstein. So you see, it all comes back around to Apple one way or another.

(To see something Wolfy made with Legos, check this out)

Update: I just saw that SxePhil on YouTube said happy birthday to Wolf3D!

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.