Archive for September 16th, 2007

16
Sep

AssetLoader.as

This is my first code release in about 5 or 6 years. Warning: It comes without warranty and the only person to debug and use it has been me. Also note that it has grown over the last 2 years and is written in AS2. For all I know it’s totally useless or already built in with AS3.I wrote this class out of frustration. It seemed like every time I started a new project I had to write freakin’ preloader logic. I HATE PRELOADING STUFF. I hate reinventing the wheel even more. There seems to be a ton of preloaders out there but projects seem to have this component loading that and this clip handling an event for loading that etc. So it has seemed to be an endless cycle of writing XML onLoad events and MovieClipLoader error handlers over and over. This class was an attempt to stop doing all that over and over.The basic jist of the class is that you can declare an instance of it, added a list of things you want to preload to it and assign a callback for when they are all done. It will take the core move (self), XML, CSS and images/SWFs and handle all the need events internally for you. As I write this I’ve never used it with sound or video which I usually do within a video player or sound player class. If you want, you can also set up listeners for the broadcasting of events within the class. Start, complete and updates with a percentage are all broadcast from within.If you take the time to download the file PLEASE take a second to post a comment or email me your thoughts of the class. Let me know if it’s junk, deprecated or the best thing you’ve grabbed in a few weeks.Download AssetLoader-1.0.zip

16
Sep

Releasing Code & Giving Back

For those of you who don’t know me, I’m a self taught Flash veteran of 10 years now. I have a BFA in traditional Commercial Art and when I graduated from VCU in 1997, interactive wasn’t a discipline, I had no interest in writing code and Flash was wearing diapers. Over the years I’ve been introduced to Flash and have been fortunate enough to grow with it. From a blank canvas, Flash CS3 seems daunting to me but when I started it was all about tweening and simple commands like play(). It was easier to learn programming over time as features were added.It was also easier to learn Flash when the people around me were just learning it as well. Back in the late 90s people like Josh Davis were trying to figure out this whole Flash thing as well. They were posting regularly on early Flash message boards and releasing .fla files with their discoveries. In my opinion, this is why Flash was so quickly adopted by designers and programmers. Because the community was open and honest and everyone was just learning. There were no books or tutorials so forums and sharing source files were the only way to grow.This was my learning process and board members were my teachers. I’ve never had the opportunity to work at a studio that used Flash and had a well established methodology in place. In addition to that, I had never worked a studio with people that knew more about Flash than me until I worked at EA Sports. While I was there, Flash was being used for the first time in their games so while I worked with programmers who knew how to calculate football trajectories in C++ blindfolded, it was up to me to help train them and translate that into Flash with its limitations. So basically I’ve always set the ground work for how something would be put together… always. And I’m still doing it to my surprise.I’ve written dozens of tutorials over the last 10 years, a book and uploaded lots of source when time allowed. Over the summer I’ve decided to try and release some source files again. The reasons are 2 fold. 1) I want to continue that sharing of knowledge that got me to where I am today and 2) Since going freelance and once again setting my own groundwork, I want some feedback to see how my process compares to others.So let the sharing being. I’ll be posting my first batch of code shortly here.