Grant Skinner

The "g" in gskinner. Also the "skinner".

@gskinner

My Latest Project: Complete!

I recently completed a project called “Stories of Your Life”. It was a grueling, marathon project, but I learned a lot and am very proud of the results. As such, I wanted to do a little show and tell on the project, and show some screenshots of the finished product.

Handing off the final CD sure gave me a new respect for software developers. Rolling out web applications is such a forgiving process – you do testing up front, but if something goes wrong after roll-out, it is usually a fairly simple matter to correct it. Sending a CD for mass-duplication, and knowing that any problems are going to be nearly impossible to rectify is a stressful business. 🙂

Stories of Your Life is an application based around the national best-selling book Once Upon a Lifetime by Pat A. Williams. I worked directly with this lovely, vibrant woman in interpretting and enhancing her printed work for the digital medium. Briefly, it is a Windows application that guides you through recording the stories of your life with over 2000 questions in 15 categories and 78 subcategories. In addition to formatted text, you can associate photos, audio and video with your answers.

I believe it is quite unique as a retail product built with Flash, and with its amazing blend of “multimedia presentation” and “desktop application”.

The application was built using FlashMX, and ScreenWeaver. I was very happy with ScreenWeaver, with the exception of a major bug that causes a BSOD fatal exception when writing large files (as yet unfixed, but I worked around it by using a series of smaller appended writes instead). Read on for a short tour of the software.

Continue reading →

Completely Free Hosting

A friend of mine pointed me to 1and1.com, where they are giving away 3 years of free hosting to generate word of mouth promotion (like this) until Jan 21. I’ve read through some of their FAQs, and it seems legit: 500MB space, 5GB transfer, PHP, MySQL, etc – and their overflow bandwidth is cheap at 99cents/GB. They’ll even register domains for you for only $5.99/yr.

The only catch I’ve found is that you don’t receive phone support, but I don’t consider that much of a catch (who calls their host anyway?).

I haven’t signed on with them (my current host keeps me pretty happy – and supports FlashComm), but even so, I’m tempted to dream up a new domain to register with 1and1.

FF Film Festival Nominations Open

I haven’t seen anyone else blog this (though I’ve been negligent in my blog reading duties, so I probably just missed it), so I thought I should – nominations for the FlashForward 2004 San Francisco Flash Film Festival are now open. If you have any cool projects that you’ve developed recently, and would like to get your hands on a wicked-cool orange rubber arrow (I have two, brag, brag) be sure to visit the nominations page.

Class locations in AS2.0 run-time

I hadn’t really thought about where AS2.0 classes reside at run-time until I encountered a need to dynamically create instances of the classes I had made for one of my current projects. In AS1, it was really simple to dynamically create instances from a class name, because you specified where the class definition resided, for example:

// on _root
function MyClass() { };
// anywhere else:
className = "MyClass";
myInstance = new _root[className]();

However, in AS2.0, you never specify where the class definition sits – it’s really pretty obvious though, if you think about it for a moment. AS2.0 classes can be accessed by name from anywhere in the swf – they are accessible globally. This , of course, is because they reside inside of _global. For instance, if you defined a custom class called “MyClass” in AS2, you could access it at _global.MyClass, and could create instances of it dynamically with:

className = "MyClass";
myInstance = new _global[className]();

Simple, eh? So what about classes inside of packages? Well, the dot notation indicates an object hierarchy, and it turns out that’s all there is to it. The class definition for a class called “MyClass” inside the “com.gskinner.utilities” package can be found at _global.com.gskinner.utilities.MyClass. If you knew the package was always the same, you could create instances dynamically with:

myInstance = new _global.com.gskinner.utilities[className]();

If you want to create instances from full dynamic class names with varying packages, you can use this function I whipped up:

function getInstanceOf(p_fullName:String):Object {
var classPath:Array = p_fullName.split(".");
var package:Object = _global;
var l = classPath.length-1;
for (var i:Number=0;i<l;i++) {
package = package[classPath[i]];
}
var c:Function = package[classPath[classPath.length-1]];
var instance:Object = new c();
return instance;
}
// test it:
myInstance = getInstanceOf("com.gskinner.utilities.MyClass");

Unfortunately, I haven’t got it working with .apply yet, so you can’t pass arguments to the constructor (if anyone gets this to work, send it to me, and I’ll post it).

All of this raises an important consideration: Be careful of name conflicts with packages when adding items to the _global object (classes should be fairly safe due to their capitalization)! If you have a class “com.gskinner.utilites.MyClass”, and you then you define a _global.com variable, you will overwrite the entire “com” class package (Eek!). For example:

import com.gskinner.utilities.MyClass;
_global.com = 127;
myInstance = new com.gskinner.utilities.MyClass();
// myInstance is undefined!

Upcoming presos: FitC, FFSF, NAIT, UofA

I received confirmation today that I will be speaking at Flash In The Can 2004 (Toronto) in early April. I will be speaking on coding production-friendly ActionScript 2.0. Rather than rehash syntax, I will focus on how to actually apply AS2.0 to real projects in the most effective manner possible. I really feel it will be a phenomenal session, given the ramp-up I will have in the preceding speaking engagements, and the practical knowledge I am gaining from a number of projects that I have been working on.

In January and February, I will be instructing “FlashMX 2004 Enterprise-level Development” at the Northern Alberta Institute of Technology. This is a 36 hour course, spread over 4 weeks, covering advanced Flash development.

At the end of January, I will doing a guest lecture to fourth year Arts students at the University of Alberta (topic to be finalized), which I’m pretty psyched about.

In early March, I will be doing an Ask The Experts session at FlashForward San Francisco, dealing with basically the same topic as my FitC session. I will begin with a short session discussing my development techniques, best practices, and look at some real world examples; then provide attendees with an opportunity to ask questions about implementing AS2.0 in their projects. This should help provide a great foundation of really relevant material for my FitC session.

Hope to see some of you at these events. Be sure to say “hi” if you see me!

FLAws: Forms

Need I say any more? j/k 😉

Quick disclaimer: There’s a good chance I’m wrong about some of how this all works, so please feel free to correct me, I do not want to spread incorrect information or FUD.

Forms in Flash are a little like the apple in the garden of Eden – tempting and nice to look at, but all hell breaks loose when you try to eat ’em. It doesn’t help that the whole time this little snake called Macromedia is whispering in your ear, telling you to take a big bite.

Adding Forms to Flash was a great idea – it provides a nice, structured development environment for state based applications, it makes implementing MVC clean and simple, and it makes the technology far more accessible to programmers familiar with environments like Visual Basic.

Unfortunately, the implementation is – hmm, how to put this politely – substantially sub-par.

Continue reading →

Gadget inspector.

Christmas is around the corner, and its time to start looking up some killer swag. Last year I got a crap load of household stuff (I bought a loft 2 years ago, and everyone thinks I still need tea kettles and towels, blech), so my loving girlfriend decided that this year I should get some fun stuff. Here’s some of the toys she found waiting in cyber space (and don’t worry, there’s no hidden referral links) (or adult content, for that matter) :)…

Continue reading →