Posts Tagged ‘Flex’


03.10.2010 / Greener Pastures

You may have already figured out that Flex development is my primary skill these days. I would say I develop, talk, dream, or think about Flex a large majority of each living day. Today, I’ve decided to branch out into other skills.

Effective immediately, I’m extending an invitation to all Quiznos franchisees to contact me for employment as a Quiznos Cup Dancer. But here are my demands:

  • I must wear the Quiznos cup (illustrated here).
  • I must wear it for a single hour, after which I may and will terminate my employment.
  • I must pay you, Quiznos, the hourly wage you would normally pay a Quiznos Cup Dancer.
  • I must promise to commit my full efforts to provide the best Quiznos Cup Dance you have ever personally witnessed.

Contact me. I’m waiting. Little Caesars franchisees need not apply.


03.09.2010 / 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 sample 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!


02.10.2010 / 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!


08.23.2009 / Skinnable Knob Component

Recently I went searching for Flex knob components on the web and found they either weren’t equipped for my needs or closed source. So, I cooked up my own knob (or dial) component that hopefully someone out there can use. Go do something cool with it. Continue reading »


08.14.2009 / Loading a Remote Module into a Local App

At work, we deal a lot with loading modules residing on remote servers into our applications running locally.  By locally I mean from a local path on our hard drives (the default Flex Builder run/debug settings), not on a local web server instance (localhost).  Depending on what type of module we are loading, we would normally use one of Flex’s built-in functions to load modules:

// Loading a language resource module:
resourceManager.loadResourceModule('http://aaronhardy.com/en_US_ResourceModule.swf');
 
// Loading a style module (e.g., a compiled font swf):
StyleManager.loadStyleDeclarations("http://aaronhardy.com/fonts/Astroid.swf");
 
// Loading miscellaneous modules:
var moduleInfo:IModuleInfo = ModuleManager.getModule('http://aaronhardy.com/MyModule.swf');
moduleInfo.load();

But these methods of importing modules result in errors like the following:

Unable to load resource module from http://aaronhardy.com/en_US_ResourceModule.swf
Error: Unable to load style(SWF is not a loadable module): http://aaronhardy.com/fonts/Astroid.swf.

Continue reading »


04.14.2009 / Loading a Remote Style SWF

This post has been replaced by Loading a Remote Module into a Local App. Enjoy!


12.17.2008 / Advanced Callout Component

Most flex developers have become acquainted with the built-in tooltop the flex framework provides. It’s very convenient when all you need is a plain text hint to display briefly while the cursor is over a particular element.

But what’s a flex developer to do when more is called for? The flex tooltip sometimes just won’t cut it. To appease my appetite, I cooked myself up a callout component. Please, feast with me.
Continue reading »


12.15.2008 / Blocking TabBar Click/Change Events

One scenario that often presents itself when developing a Flex application is blocking users from navigating away from the current view.  You might want to do this if the user’s form data is incomplete or if data has changed and you want to ensure they want to discard or save their changes.

When the TabBar comes into play, blocking tab changes isn’t always straightforward.  The TabBar doesn’t dispatch any type of TabChanging event that can be canceled.  Nothing else is really offered in the way of blocking the action either.  To make matters worse, a click on a tab in the tabbar actually dispatches two different click events, one of which is a “simulated click trigger event.”

My purpose isn’t to go into the shortcomings of the TabBar component or its inner workings.  Instead, I’ll offer the BlockableTabBar for your use:
Continue reading »


12.01.2008 / Meta-Learnings from Adobe MAX 2008

While I learned a fair share at Adobe MAX 2008, I’d like to focus this post on meta-learnings.  What are meta-learnings?  I’m not sure yet, but here we go:

  • Gucci is to Hollywood as writing books is to nerds.  I don’t remember the number of times I heard someone flaunting his/her authorship on a book, but I’m quite positive it surpassed the fingers on one hand.  Writing books is the new black when it comes to tech.
  • Adobe is very in-tune with their customers.  One of their general sessions was focused on presenting how Adobe is addressing specific customer problems.  Key corporate leaders presented in real style and with what seemed to be honest sincerity.  Being that I’ve seen the problems firsthand, I can honestly say they seem to know what their customers need and how to get there.  At one presentation, a member of the audience asked something related to accessing the screen dimensions of a cell phone an AIR application is running on.  I then overheard one of Adobe’s team members on the back row ask another team member, “Do you know if we do that?”  The other one said, “I don’t know, but let’s take a look at it.”  How many times can you ask a question about a product and get the immediate attention of the development team behind it? Continue reading »

10.15.2008 / Finding the nearest component in Flex

In Flex, we sometimes need to find the component nearest to the mouse cursor. The following example will show you how to do so. Here are the basic steps:

  1. We will set up an event listener to watch for mouse movements.
  2. On every mouse movement, we will loop through all the application’s children, evaluating each one.
  3. We retrieve the bounding rectangle for the component we are currently evaluating.
  4. If the cursor is to the left or right of the component, we find the distance between the x position of the cursor and the x position of the nearest vertical side of the bounding rectangle. If it’s not to the left or the right, the horizontal distance is zero.
  5. If the cursor is above or below the component, we find the distance between the y position of the cursor and the y position of the nearest horizontal side of the bounding rectangle. If it’s not to the top or the left, the vertical distance is zero.
  6. We use the Pythagorean theorem to find the actual distance between the cursor and the component using the two distances previously determined.
  7. If it is a shorter distance to the component we are evaluating than the distance to any of the components previously evaluated, we’ll make note of it.
  8. Finally, we report the closest component found.

Continue reading »