Category Archives: Code

You might find some code here

Clean Code

I recently purchased @unclebobmartin‘s awesome book: Clean Code. What a book! I’m going to echo a sentiment that often ripples through the Twittersphere: If you are a programmer and you haven’t read Clean Code you are doing your fellow programmers (and yourself) a great disservice. Seriously.

Posted in Banter, Code, Inspiration | 4 Comments

Another Architectural Framework, But Why?

The State Of The Game There are some great Flash and Flex application frameworks out there right now. Mate, Swiz and PureMVC (update: and Parsley!) stand out. The authors of these frameworks realized that the Flash Platform is different enough to the JVM to warrant a fresh approach to application design.

Posted in Banter, Code, Robotlegs | Tagged , , , , , , , , | 39 Comments

RobotLegs AS3: A DI Driven MVCS Framework for Flash & Flex – Inspired by PureMVC

Want a framework like PureMVC but without Singletons, Service Locators, or casting? Perhaps one with Dependency Injection and Automatic Mediator Registration? Well, you might enjoy RobotLegs AS3: yet another lightweight micro-architecture for Rich Internet Applications.

Posted in Code, Resources, Robotlegs | Tagged , , , , , , , , , | 37 Comments

Execute An AS3 Function After Exactly One Frame – DelayedFunctionQueue

I asked this question on Stack Overflow: What’s the best way to execute a function after exactly one frame? Based on the feedback I wrote a little class to make it super easy to do. You add function references to a queue, and those functions get called (in the order they were added) on the next Flash Player Frame. Herewith, the DelayedFunctionQueue.as

Posted in Code | Tagged , , , , | 1 Comment

Setting a Flex ItemRenderer with AS3 Code

itemRenderer = new ClassFactory( ItemRendererClass );

Posted in Code | Tagged , , | 2 Comments

Image Resizing and Cropping Utility – AS3 Demo

Just a little follow up to yesterday’s post. Kyle was kind enough to put together a little demo for the Display Utility and send it my way. I tweeked it to reduce the filesize a bit. Herewith, the demo, source and all: displayutildemo.zip Disclaimer: My Mac has probably thrown some .DS_Store files into the zip file. If you are a Windows user.. “suck it!” No, I’m just kidding. The best solution is to switch to OS X as soon as … Continue reading

Posted in Code | Tagged , , , , , | Leave a comment

Image Resizing and Cropping Utility – AS3

UPDATE: Aha, here we go, this looks much better: Fit Display Object Into Rectange UPDATE: Or check out CASA lib: http://casalib.org/ A day or two ago my man Kyle asked me if I knew of any good ActionScript image resizing utilities. I said “nay”, did a quick (and unsuccessful) search, and promptly forgot about it. This morning, however, I had to write some PHP to scale and crop images to fit inside fixed rectangles (for desktop downloads) and I remembered … Continue reading

Posted in Code | Tagged , , , , | 19 Comments