Main

August 05, 2007

Popup Dialogs as Modules

Recently, it was pointed out that there were bugs in the PopUpDialogAsModule example. The dialog would not center and was not draggable. The reason was that the thing being popped up was a Module that parented a TitleWindow and not the TitleWindow tiself. After thinking about that for a bit, I decided to create a subclass of TitleWindow that can be a Module's top level MXML tag. The source is available at this link:
Download source

Of course, the usual caveats apply. I could have certainly missed something again.

In theory, any component can be made into a module's top-level tag by adding the [frame] metadata. Hope this helps. I've been seeing this issue a lot recently. Also, sorry for the errors in the older example.

March 23, 2007

Garbage Collection and Memory Leaks

I've seen lots of hair-pulling and confusion over memory management and garbage collection in Flex and Flash. Memory diagnostic tools are on the way, but until then, determining if you have a memory leak is a difficult thing to do. The attached presentation attempts to provide a simplified model of how the Flash Player manages memory. Hopefully, once you get a better understanding, it will save you time and hassle trying to detect memory leaks in your applications.

Download Presentation

I also put together a sample app that has a straightforward memory leak that hopefully will serve as an example of how I diagose memory leaks in Flex 2x. The tools in the next release will make this much easier, but the technique used here has served me well.

Download Sample

March 08, 2007

Embedded Fonts in Modules

A question was asked on Flexcoders about how to use embedded fonts in modules and late-load the embedded font. This example, inspired by Jonas.Eliasson, shows how it can be done.

Note that this example expects you to have an assets folder with arial.ttf and arialbd.ttf which I did not put in the zip because most of you have it somewhere, and I think it may be illegal to ship a .ttf across state lines.

Download file

March 07, 2007

Modules

I put together this presentation for the 360 Flex conference in San Jose. Thank you to those who attended and filled up the room so I could impress my manager with my supposed popularity.

The presentation contains a basic introduction to modules and how to use them, and an attempt to explain ApplicationDomains which are an important factor in how modules and RSLs (Runtime Shared Libraries) work.

The presentation is here: Download file

And some sample code is here: Download file

The sample code has build.script files that require a unix shell and show how some of the MXMLC parameters are used. (The usual caveats, disclaimers, and other legal stuff apply).

Enjoy!