Viewing the ‘Flex’ Category
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!
1 Comment »
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!
No Comments »
Here’s my presentation from today’s training at Rain entitled Flex 4 with a Hint of AIR 2. Enjoy!
4 Comments »
When digging through XML, e4x is definitely your friend but it can be tricky sometimes. I recently came across a situation where I needed to find all nodes with a certain namespaced attribute. I didn’t care what the attribute’s value was; I just needed to know which nodes had the attribute. Continue reading »
No Comments »
A common thing to do in most any rich application is to show progress while loading remote assets. In ActionScript, the bytesLoaded and bytesTotal properties of classes such as LoaderInfo and URLLoader provide the needed information to show a fancy percentage-based progress indicator. The bytesLoaded property is updated as more and more of the asset is loaded in. Divide that by the bytesTotal and you have the percentage loaded.
Easy enough. How about multiple loaders? Lets say you have a group of 10 images and you’d like to show progress for all the images collectively. Because you have 10 different images you also have 10 different URLLoader instances (or Loader instances, whatever suits your fancy)–one for each image. Math would say that you divide the sum of bytesLoaded by the sum of bytesTotal and that gives you the percentage complete. Two issues arise: Continue reading »
No Comments »
Rain, where I work, has released yet another super-duper app. It’s called Piano Marvel and it’s set to revolutionize how people learn how to play the piano. I’m not a piano player myself, but I do remember taking piano lessons as a kid. I hated it. It was monotonous, inconvenient, and felt like a chore. I wasn’t intrigued and I don’t believe I was the only kid that felt this way.
A while back, Guitar Hero hit the gaming industry by storm and kids flocked to learning the guitar. Sure, it wasn’t a real guitar, but it was still an instrument of sorts and kids were still learning hand-eye-ear coordination, rhythm, and other music essentials. The game was a huge success, bringing in over $1 billion in sales in the first 26 months and set an industry record.
Why such a difference in my experience learning how to play the piano years ago and kids learning the pseudo-guitar with Guitar Hero? Guitar Hero provides objectivity, benchmarking, competition, and addiction. You can play with your friends in a fun atmosphere. Piano Marvel takes these concepts and applies them to learning the piano. Students play along to accompaniment, see exactly which notes they hit and when they hit them, and earn trophies as they complete increasingly difficult exercises. They can practice whenever they choose and can even battle it out with their piano-playing comrades. Continue reading »
9 Comments »
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 »
3 Comments »
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 »
27 Comments »
Businesses win customers when they deliver what customers want. Customers get what they want when they can customize products to their own preferences. At Rain, where I work, we recognize the profit potential that clients can achieve with this concept and have created many applications allowing users to design their own products. How do we do it? Let’s talk SVG.
Suppose we create a simple product designer containing a single rectangle. The user can rotate, scale, position, and color the rectangle. The rectangle will then be printed in spectacular fashion on the customer’s very own poster. So, Jim hops into the application and moves the rectangle to the center of the poster, doubles its size, colors it blue, then rotates it 45 degrees. He then saves his design.
How is Jim’s design saved? That is, how is Jim’s design described in such a way that (1) he can later re-open it and continue modifying his rectangle and (2) a printing shop can print his poster at virtually any size without degrading its quality? Continue reading »
No Comments »
Three posts in three days? Yeah, I’m that crazy.
This post is on how to set up a scrollbar that’s associated with a container, but not necessary part of (built-into) the container. For lack of a better term, it’s a standalone scrollbar. Let’s get right to it. View the sample here and right-click to view the source. Continue reading »
1 Comment »