Connecting the Dots / An Agency Blog

Engine Digital is an Interaction Marketing Agency
located in Vancouver, Canada. This is our blog.

These Robot Legs Were Made For Walking

05/26/2010 @ 2:45 pm
By: Yaz Jallad

robotlegs

The past few months at Engine have found us using frameworks to build all our Flash projects; for obvious reasons. Frameworks allow for a scenario in which we’re building libraries of reusable code. Multiple developers are able to work on the same project in their own “views,” until we need to bring all the code together into the end product. It’s a much more efficient and consistent development experience. There are a lot of romantic scenarios for frameworks to put hearts in the eyes of developers, but as most of us know, they’re not all built the same. PureMVC was great for a time, but it didn’t take long for me to discover its limitations. A great, confident beginning was quickly reduced to writing a hundred lines of the same code to simply wire up into the framework. Which is why, when it comes to frameworks, we’re happy to get some fresh legs in here. Robotlegs, specifically.

Robotlegs is all the buzz these days, along with Robert Penner’s AS3Signals. Together they are the perfect duo to tackle any project, especially if you’re using FDT, like us. It has been such a hit with us at Engine, that we decided to deploy both Robotlegs and AS3 Signals in the core framework of all our present and future projects. Below you can see a quick demo that we’ve put together. We hope that this pure AS 3 demo will be the shining light for developers out there tired of seeing Flex examples, over and over again.

You can download the source from here. It’s our packaged FDT project, including the build.xml. You’ll have to update all the paths to get it to work. This is the first time we’ve shared our top secret coding methods on the Engine blog. A few of us have had to duel to near death, wearing the full suit of armor that we keep in the studio, defending the secrets that we are now publicly revealing. Please make it worth our while by providing some insight into what you think of our example, or how you go about things.

You need Adobe flash 10 player or higher to view this site.

Get Adobe Flash player

Similar Posts:

Get in on the conversation /

Comments: 9
Robert Penner says: May 27, 2010 @ 1:32 pm

Looking good so far…
A small thing–I decompiled signals-extension-SignalsCommandMap.swc and it contains ISignal and all of the Robotlegs code. It would be better to link against Signals and Robotlegs as external libraries so they don’t show up in the extension SWC.

Robert Penner says: May 27, 2010 @ 1:35 pm

Also, the FDT project doesn’t link to the SWCS in libs. I know you have the Ant build but that doesn’t work either because of this:

Robert Penner says: May 27, 2010 @ 1:37 pm

I’ll try that again. This the line in build.xml I was referring to:

property name=”Flex_3_SDK_0″ location=”/Applications/eclipseFDT/plugins/com.powerflasher.fdt.shippedflex_3.2.0.3958_0001/flex/”

Robert Penner says: May 27, 2010 @ 1:41 pm

Here’s the whole error:

Buildfile: C:\…\EngineRobotlegsDemo\EngineRobotlegsDemo\build.xml
compileMain:

BUILD FAILED
C:\…\EngineRobotlegsDemo\EngineRobotlegsDemo\build.xml:34: Execute failed: java.io.IOException: Cannot run program “C:\Applications\eclipseFDT\plugins\com.powerflasher.fdt.shippedflex_3.2.0.3958_0001\flex\bin\mxmlc”: CreateProcess error=3, The system cannot find the path specified

I’d suggest using the FLEX_HOME environment variable instead, like Robotlegs and Signals do.

http://github.com/robotlegs/robotlegs-framework/blob/master/build.xml

http://github.com/robertpenner/as3-signals/blob/master/build.xml

Robert Penner says: May 27, 2010 @ 1:49 pm

Also, the Robotlegs SWC already has SwiftSuspenders compiled into it, so you don’t need to include that one separately.

yjallad says: May 31, 2010 @ 2:56 pm

Hey Robert,

I have made all the changes you suggested regarding linked swc libraries I have also updated the build XML to reflect the methods used in the examples you suggested.

Source download has been updated as well.

thanks for all your feedback.

Robert Penner says: May 31, 2010 @ 3:25 pm

Thanks, yjallad. Importing the updated FDT project was smoother. However, the project doesn’t have the swcs in libs linked in. I had to right-click them, Source Folder -> Add to Classpath. Then the project built and ran fine. I noticed that the .as3_classpath file in your project doesn’t have the SWCs, but after I Add to Classpath, they are listed in the file.

But the Flex SDK variable works perfectly now. I think the ideal is only use the variable in the project file, and if the path needs to be customized, the user edits the variable value for their own FDT install.

yjallad says: May 31, 2010 @ 3:34 pm

@Robert,

Seems weird to me that the libs are still not showing up in the .as3_classpath, they are on the class path in my project, not sure if this has to do anything with starting the project in FDT 3.5 and continuing the build in FDT4 M2?
Whatever the case, I think you’re right, the environment variables are the way to go. Having to update the build path in one place will make migration to other SKD’s easier.

Geoff Freedman says: August 17, 2010 @ 2:53 pm

Thank you for posting this helpful working example!

After importing the swcs in FDT as you suggest I encountered one small error:

In this class:
com.engine.flickrdemo.view.ui

it complained that on line 48, the variable ‘key’ wasn’t typed. I got it to work by modifying it as follows:

for each (var key:* in data){

Just typed ‘key’ to * for expediency.

Thanks again!

1 Trackbacks/Pingbacks

Post your comment /

  1. (required)
  2. (valid email required)
  3. (required)
  4. Captcha
 

cforms contact form by delicious:days

By submitting a comment here you grant Engine Digital Inc. / Blog a perpetual license to reproduce your words and name/web site in attribution. Inappropriate comments will be removed at admin's discretion.

Subscribe for updates /

No spam just occasional updates.

About the authors /

Dave Smith
Dave Smith
Sr. Art Director

James Richardson
James Richardson
Director of Operations

Kele Nakamura
Kele Nakamura
Technical Director / Partner

Stephen Beck
Stephen Beck
Creative Director / Partner

www.mrstephenbeck.com
David Look
David Look
Social Media Engineer / Copywriter

Dave Smith
Dave Smith
Sr. Art Director

More...

Flickr

SXSW '10
SXSW '10
SXSW '10
The Boss - Jaques
The iPad Has Arrived
SXSW '10
More...