Updated EventManager Includes Mixin Support

by Josh Tynjala

Many people prefer the quick way that EventDispatcher can set up an object to handle events. With one line of code in an object’s constructor you can have an EventDispatcher instance ready to go, plus all the add and remove interface functions will be added to the target object. I’ll admit, it’s pretty elegant.

EventDispatcher.initialize(target);

I’ve updated my EventManager class with the same functionality. Obviously, the implementation is different, but the interface is the same, so all you have to do is call the static function initialize and you’re ready to go. Everything else should work the same way as the previous version. If you use the mixin, an EventManager instance is automatically set in the _eventManager variable of the target object, but initialize also returns the same object if you’d like to assign it elsewhere.

Download a ZIP of the source files for version 1.1!

Flash AIM Demo

by Josh Tynjala

Update: Be sure the check out my second Flash AIM demo with additional features.

Just tossing some code on my blog isn’t the best way to get people excited about it. People want something tangible, something that they can actually play with. As a result, I worked feverishly over the last couple days to get a decent interface for my AIM classes. As I mentioned last time, this is all written in Actionscript 3 for the preview release of Flash Player 8.5. It will not work in Flash 8 or below. If you don’t want to get the player, here’s a screenshot of the new interface in action:

Flash Actionscript 3 AIM Demo Release 1

For those of you ready to take the plunge, you can get it from the downloads section. Due to Flash’s security policies, this swf must be run from your local computer. I’m also warning you that there could be some bugs in there. I tried to find as many as possible, but I don’t doubt that some slipped by me.

Followup: More about Inspectable

by Josh Tynjala

After getting some other work done today, I continued my search for the cause of the major instabilities I’m having with Flash. Last time, I tried to simplify things by creating a blank symbol and setting the class in the Component Definition dialog. Today, I took that a step further. I created the same class, but the class only contains public variables that are Inspectable. Every variable matches an Inspectable getter/setter combo from the original class. You can’t get much simpler than that.

Read the rest of this entry »

Pages: Prev 1 2