Archive for the 'ActionScript' Category

The hours that 10.5.2 took

For two days I’ve had lots of problems with the Flex application I’m working on. Mysterious behaviour that doesn’t register any errors anywhere. I couldn’t understand what was going on until today when I accidentally right-clicked on the application. Seconds later my hand collided with my forehead and a long sigh could be heard.

It turns out that the 10.5.2 update for Mac OS X silently installed a new version of Flash Player, overwriting the debug version I had installed. Combined with the Font Explorer X problems and weird glitches and two complete system hangs that also came with the update I can tell you that I’ve lost too many hours of work because of that fucking update.

This week’s non-issue: Google indexes SWF files

It’s probably the number one topic on Flash blogs today: O’Reilly launches InsideRIA and has an article about how Google indexes SWF files. As usual when it comes to SEO and Flash, almost no one understands what it means, but almost everyone talks about it as the New Big Thing. Guess what? It’s not. Read the rest of this entry →

Flex Compiler API

This is really great: Flex Doc Team: Java-based Compiler API. It’s the Flex compiler exposed as a Java API, which means that finally someone (perhaps I) can write a set of proper Ant tasks for Flex.

Read the rest of this entry →

The inflexibility of Flex styling

Flex’ CSS implementation isn’t very advanced and it gives me all kinds of trouble when I try to re-style my applications. For the most part Flex does a really good job of allowing customization, but it’s only good for the first 80%.

Read the rest of this entry →

I’m watching you, Jeff Houser

Google Analytics tracks Jeff Houser

Gravité

Stumbled upon a link in a mail from 2001: Gravité, a control panel for old Mac OS which made it look as if you were really dragging icons. Oh, the happy times.

Gravité

Someone should revive this for drag & drop in Flex.

Deep linking in Flex: using SWFAddress and BrowserManager

In Flex 3 there is support for deep linking in the BrowserManager class. Unfortunately it requires that you use the Flex HTML templates which, frankly, are really ugly. I prefer to use SWFObject to embed my Flash and Flex applications. To solve this I have created a simple package that makes it possible to use the BrowserManager class with SWFAddress. You can find it and a description on what it does here: Flex BrowserManager + SWFAddress integration.

Architectural Atrocities, part 8: is there no equality?

The collections in Flex are good as data providers for list and tree components, doing the dirty work of making sure that the components know of changes made to the underlying data, but frankly they suck at most other things. Most importantly they suck at being collections. In this post I’m going to show you why and how to alleviate the problem somewhat.

Read the rest of this entry →

MXMLC WTF (7): Snooping with verbose stacktraces

The -verbose-stacktraces flag to mxmlc is really useful, but it also has a fun, but disturbing, side effect: you can discover how the person who packaged a swc organized their project. If an error is thrown in a context where the call stack includes methods defined by classes inside a swc the getStackTrace method on Error reveals the location of the .as file as it was when it was compiled.

Read the rest of this entry →

A generic way to remove an event listener

This might be obvious to everyone, but I thought I’d share a snipplet containing a generic way of removing an event listener:

event.currentTarget.removeEventListener(event.type, arguments.callee)

Place it in your handler function, I prefer to put mine on the first line.

It’s useful in situations where you want to stop listening after the first event has fired, for example. You can use it when the listener is an anonymous inner function, if you don’t know the type of the event, if the dispatcher is unknown or any combination of these.

Most of the time using weak references is probably more appropriate, but in some situations the snipplet above is handy.

Read the rest of this entry →