While on the topic of good coding practices I forgot to post a link to this great artical on recognizing a good programer. I have used this as a reference when interviewing new Flash Developers where I work.

Are Singletons Bad?

March 23rd, 2008

So for the better half of my Friday I did research on how to best implement a service controller1 for the new AS 3 Heavy Video Player I am building. Normally I would just slap together a few singleton utility classes and be on my way but, after having a conversations with Myles2 about a blog post he read that said using singletons were bad, I started thinking about if I was going down the wrong path.

Read the rest of this entry »

  1. To handle services like saving favorites, logging in, alert windows, and other core functions []
  2. we use to work together at MLB.com but now he is over at RGA []

AS 3 Singleton Template

March 18th, 2008

Awhile ago I read this article about best practices for creating singletons in AS 3 on gskinner’s blog. I thought I would share the template that I use for creating my utility classes.

Read the rest of this entry »

MCVC Controller - Part 3

December 26th, 2007

The controller is the glue that holds your application together. It facilitates communication between views and Models as well as Models to other Models. This controller also over comes one of AS 2.0 fatal flaws; the event system.

Read the rest of this entry »

MCVC Model - Part 2

December 26th, 2007

So you learned how to handle a model’s name, as well as passing in a config object and bind the model to the controller here. Now we will move on to the real fun like loading xml data into the model and understanding its’ timers as well as the event system.

Read the rest of this entry »

MCVC Model - Part 1

December 26th, 2007

The core part of my MCVC system is the BaseModel class. In this system it represents a core data class with no visual representation. All data classes are extended from this class and are responsible for loading xml data, parsing that data, managing the data/state of the supporting classes (such as Views and Components) and handling the receive/sending of events through the controller binding. Here is how it works. ** Warning but this post is long and is a continuation from this post on MCVC. **

Read the rest of this entry »

AS 3 Custom Event

December 23rd, 2007

For years I avoided the event system in AS 2. It was horrible and it couldn’t keep it’s scope. Now that I am working in AS 3 I am trying my hardest to like the new event system and event class. Unfortunately it is missing one thing I always needed it to do, pass off data or an object along with the event. Here is how I get around it.

Read the rest of this entry »

InteractiveItem Base Class

December 22nd, 2007

While building the NapkinNotebook site I needed a flexible View Class that all of the animated objects on the stage could be extended from. This is the class I decided to go with.

Read the rest of this entry »

Scribble Class

December 22nd, 2007

I am sure by now you know about the NapkinNotebook website I did for Euro RSCG but what I haven’t had a chance to show you yet is some of the code behind how it works.

Read the rest of this entry »

External Runtime Library Update

December 22nd, 2007

I just built a utility that will allow you to dynamically load in a swf with library assets and pull them out to use them anywhere in your application. This is the evolution of this code example from Adobe. Here is what you need to know to get it up and running quickly:

Read the rest of this entry »