Viewing the ‘Flex’ Category

CabMaskableSprite: CacheAsBitmap and Mask Workaround


In DisplayObject Quirks and Tips, I described a quirk where a sprite with both a mask and a filter would cease dispatching mouse events. As a refresher, here’s the example code: Continue reading »

Free Flex Classes in Utah


If you’re interesting in learning Flex and live in Utah, feel free to join us in American Fork for free classes. Visit our Utah Flex Class Google group to learn more.

DisplayObject Quirks and Tips


After having worked a great deal on the Rain SVG library, I’ve come to learn and re-learn some of the quirks and workarounds of DisplayObject, the fundamental UI class in ActionScript. For your benefit and mine, here they are. It’s only a short list of the many so if you’d like to add on, feel free to post a comment. Continue reading »

JavaUtils: Detecting and Installing Java from AIR


Adobe AIR is a great way to bring the sexiness of Flash to the desktop. However, sometimes you need more low-level power for things like connecting to peripherals. For this reason, AIR applications are sometimes paired with Java applications to accomplish such tasks. But first, the user’s system must have an adequate Java Runtime Environment (JRE) installed in order for the Java application to run in the first place. Continue reading »



Please upgrade your Flash Player This is the content that would be shown if the user does not have Flash Player 9.0.115 or higher installed.

What is it?

RedLiteGreenLite is a small, simple app that allows a group of people to communicate the status of something. The status can be either red or green and the subject can be whatever. That may sound a bit general, but that’s the point. It can be used for whatever purpose your crazy mind can come up with. I’ll get you started:

  1. At work, we have a single shower and a lot of shweaty guys after soccer. So we know when the shower’s available, someone can turn the status red when he enters the shower and turn it green when he exits. This way nobody has to keep stopping by the shower to see if it’s available. When it’s green, it’s available. When it’s red, it’s not.
  2. At a call center, representatives are split into groups. When one group is on break, no other group is allowed to go on break. Again, when the status is red, a group is on break and other groups must continue attending the phones. When the lite is green, the next group is free to take a break.

The process is pretty simple: join a group. Other people join the same group. When others in the group change the status, you’ll be notified. When you change the status, others in the group will be notified. The status of the group will be persisted across sessions. In other words, if everyone logs out and then logs back in a week later, the status will remain as it was the last time it was set. Continue reading »

ImageInspector: An Image Zoom & Pan Component


This type of component is becoming quite popular these days and for good reason: it makes it extremely easy to quickly zoom in and pan around an image. I imagine most all of us have seen an example of this but I’ve never found the code for one that suits my fancy. So here you go. Here are some possibly unique features I wanted and implemented along with the usual goodies: Continue reading »

Size Text to Container


The new Text Layout Framework for Flash Player is a huge improvement over the historic TextField. Even so, it’s still not easy to have text auto-size to fit its container(s). In the demo app below I’ve implemented one solution that makes the text as large as possible without being cropped. Go head, type something in the box. Right-click the app to get to the source.

Get Adobe Flash player

The basic methodology is very similar to the Guess the Number game where you whittle down the options until you get to the one you’re after. With a few smart guesses, this can be decently efficient (~20ms). If you can come up with a more efficient or elegant way to accomplish the same task, post a comment below!

Container Panner


In Flex, the ability to scroll a container is commonplace. The ability to pan a container is not. By panning a container, I mean clicking down and dragging the content area, effectively scrolling the container.

I present the container panner. It’s a single class. Instantiate it and set the container property. That’s it. If you want, you can toggle the panning functionality and set custom cursors. Right-click to view the source. Go make something crazy.

Get Adobe Flash player

Queue N Cache


As promised, below you can find the source code and slides from my Queue N Cache presentation from the 360|Flex conference. For those who were there, thanks for coming. I really enjoy learning with you all and being able to share when I can.

First, the demo application for queuing and caching. Keep in mind that images loaded into the application will be cached in the browser, so depending on what you’re wanting to test you may need to clear your browser cache between tests. Right-click the application to access the source.

Second, the presentation slides. Here they are as a “slidecast” but they’re a little different than the live ones. I think the live video will be made available shortly so if you’re looking for that check back later. Also, this slidecast was made through SlideShare and their audio-syncing tool is a little limiting so the audio might get unsynced for a moment. In any case, enjoy! Continue reading »

Sneak Peek: Queue N Cache


The 360|Flex conference is nigh upon us. Don’t miss out on an excellent opportunity to be one with your species and discuss all things Flex. If you haven’t yet picked up your ticket, you best get on it! The conference starts on the 7th of March and runs through the 10th in sunny San Jose, CA.

This year, yours truly will be presenting the topic Queue N Cache. With a name like that, I’m sure flexers worldwide will be scrambling for a seat. I know I know, you’re thinking, “Queuing and caching? That oughtta be a party.” No. It’s Queue *N* Cache and that’s one party that runs year-round. Oh sure, we’ll talk a little about the ho-hum of your grandma’s queues and caches, but this is where rubber meets the road with real-world projects and situations where queuing and caching can achieve greatness. Have you ever sat back and wondered:

  • How could I improve user experience by paying more attention to the user’s focus?
  • How could I have greater control over my service calls and asset loaders? Timeouts and retries? Call me crazy.
  • How could I decrease memory usage and processing load by sharing image data?
  • How could I increase responsiveness through improved data management?
  • How could I show progress of shared image data in multiple locations?

If you can’t make it (Tuesday @ 2:30) or just can’t get enough, I’ll post my slides and code after the preso and you can dig in to your heart’s content. See you there!