Documenting functions and named parameters

Sometime ago someone asked me how I’d pass custom paramaters to event listeners. I don’t remember the exact use case neither who asked me but basically he was asking for something like:
mc.addEventListener(MouseEvent.CLICK, myListener, "myCustomParam", 2);
functoin myListener(event: MouseEvent, custom :String, custom2 : int) : void;
While the exact syntax above would not be possible, closures are in [...]

AS3 Package level functions and Java static imports

It’s a hidden treasure for lot of people but AS3 provides a mechanism to declare functions like setTimeout or setInterval called package level functions. These functions are defined inside packages like flash.utils.setInterval or flash.utils.setTimeout but can be used as if they were static functions.
This is a feature widely used in FlexUnit but that can be [...]

Slides for “Having Fun with Layouts in Flex 4″

Here are the slides, recording and all the material Enrique Duvos and I presented during our Max presentation around Flex4 layouts.
You can find the recording here.
I’ve uploaded all the samples here, you should be able to access the source code in all the samples by right clicking in the sample applications:

Accordion3D layout.
Swapping layouts with [...]

Flex4 Accordion3D layout

This is one of the layouts I created for the “Having fun with Flex layouts” MAX presentation.

You can run the sample application here.
You can find the code here.
I specially like the lightening effects achived with a simple ColorTransform transformation and the really nice cover with transparency effects positioned on top of the pictures (I [...]

Slides for “FlexPMD, Your Canary in a Coal Mine”

Here are the slides and the recording of the presentation Xavier and I presented at MAX this year on FlexPMD and code quality. I hope you enjoyed the presentation!
Watch the recording.
Max flash based code quality is there a canary in your coal mine-
View more presentations from Xavier Agnetti.

MAX 2010: FlexPMD, Your Canary in a Coal Mine

This year I’m presenting at MAX next to Xavier Agnetti on FlexPMD.
Xavier has done an amazing job preparing this presentation in a very funny and engaging way! I’m pretty sure you´ll enjoy it.
During this session we’ll present you the benefits of reinforcing development and team best-practices from a tooling perspective and how FlexPMD can help [...]

MAX 2010: Having Fun with Layouts in Flex 4

Join Enrique and myself in this deep dive on Flex4 layouts. I personally find the layout mechanism one of the most exciting and powerful features in Flex4 so I’m willing to present and discuss with you on this topic!
During this session we’ll present the basis of the new layout mechanism while trying to go into [...]

Streamlining your Flex project environment

In case you missed it, a couple of days ago an article I wrote a while ago went live in Adobe Devnet
The article summarizes a set of best practices to configure your projects on Flash Builder and Eclipse in general for maximum efficiency and reduced maintenance effort.
As a software engineer joining a new project, I [...]

HowTo create your developer ToolBox with Mixins

In this post I’ll explain how you can develop a flex library that automatically initializes itself avoiding developers the hassle of remembering how, when and where the libraries need to be initialized and hooked into the application. This can be particularly helpful for debugging libraries like fxSpy, DeMonsterDebugger, KaptInspect, mrdoob, etc. and extremely useful to [...]

Global Exception or Error Handling in Flex

In this post I explain how you can catch unhandled exceptions or errors globally in a declarative mxml-based way using the [Mixin] flex-specific metadata tag.
Starting on FP 10.1 and AIR 2.0 you can capture unhandled exceptions or errors globally. Although you can use these new APIs you should always take care of the exceptions where [...]