Make It Better

27 February 2006

Bored tonight so I thought I’d impregnate some coders out there with some of my seed. My hopes are that this will cause you to give birth to better code. I am pro choice so if you choose to abort I understand whole heartedly. Before you do so please consider adoption, there are plenty of other good coders out there that may benefit.

Ok, enough metaphors. This is some actionscript I did over Christmas (download code, see example). It’s a flash framework for throwing together websites quickly. My main focus was in and out transitions and the implementation of GDispatcher. Keep in mind this was a first attempt at trying to shoehorn MVC into flash. You may notice a similar directory structure to Rails, thats just for my own sanity. I’m working on a more refined version with a clearer definition between Controllers and Views. I may post it for your scrutiny later on.

Feedback is the purpose of this exercise. If it proves beneficial to me I’ll post more code. So SPEAK UP, I want to hear with you think, good or evil.

UPDATE Looking back at this code, it’s not as cool as I once thought. I’ve since re-factored it a lot so keep that in mind when you begin to judge. This was my first attempt at using the Event Dispatch model so you might see some spaghetti. However, it should be helpful to see how things are organized.

Comments

Justin

I’ve never done a drop of actionscript, but man that code looks pretty slick.

When you call ‘gotoAndPlay’ is that a method embedded inside the flash file or what (forgive my ignorance)? Maybe I’m just missing it.

Nathan Borror http://www.playgroundblues.com/

Justin: gotoAndPlay is a method that belongs to Movie Clips so anytime you’re working with them you can call that and pass it an integer or string and it will jump to a frame number or frame label.

Keegan Jones http://keeganjones.com

Nice flash stuff! I’m glad you have a new website up. Hope your doing well!