Posted on


Sharing custom components are a great way to keep from re-inventing the actionscripted wheel.  Pulling these off of Flex Exchange, I had been really confused about why developers were nesting their .as files in folder after folder that seemed to be named in some kind of odd pattern.  “Why can’t they just put it in the root folder!?”  I guess it showed my inexperience because I finally have more of an understaning on the reason and it makes a lot of sense.  I guess those professional programmers at Adobe really do know what they’re doing!

So, it’s essentially, reverse domain name notation so something from would be com.adobe… The folder structure would be the same.  I found some links to descriptions of the convention, and why it’s done.  Here’s a couple that explain it pretty well:
ActionScript 2.0 Best Practices -Great reference, not just for AS2! Under Naming Packages it talks about the classpath convention.
Once you understand classpaths, then you will know how to include custom components downloaded from the Flex Exchange or from other professional programmers.  Here’s a link describing how to add the path for the custom classes.
I hope this explains it for people starting out that are as confused as I was before I understood it.  It should get you looking professional, quicker.
Posted on

Recipes for Success

I recently received the book ActionScript 3.0 Cookbook by Joey Lott, Darron Schall & Keith Peters. I have to say, I’m extremely impressed. The recipes are very well written, giving examples of what works and what doesn’t work, there is a variety of topics and it’s laid out in a way that lends itself to being very usable.
It discusses a lot of great topics, like how to detect a users bandwidth to decide what video file to serve. This is great since without Flash Media Server, you don’t have automatic bandwidth detection and would need an alternate method. It talks about some of the math challenges you could come against and has some solutions. If I had to, I’m sure I could figure out how to identify a point on a circle, but they include sample code for you.

A lot of fundamental questions I had were answered in this book. It doesn’t go into a lot of deep detail on theory but it gets just deep enough to make a person feel comfortable with the language. The only criticism I could tell about the book is that there are typos. Enough that it can be somewhat distracting at times but they aren’t bad enough to detract from learning the recipes.

In summary, this book is a must have for anyone who wants to go places with thier Flash 9 and Flex 2.0 skills!

Posted on

When Christophe Coenraets speaks, we listen!

Last night was a special Seattle Flex User Group (SeaFlex) meeting, where Christophe Coenraets spoke to us. He talked about Apollo, what it is, why it’s the best thing since sliced bacon and why we should anxiously await it’s release. He had some sample applications he was able to whip up right before our eyes. It was impressive!

Developers that weren’t sure if they should build a web app to take advantage of the centralized server and information, or build a desktop app to take advantage of file access and better ability to work with it on the road – will no longer need to ask that question. Apollo apps can store information when they aren’t connected to a network and sync with the server as soon as they detect connectivity… automatically.

You might still be saying “big deal”. There’s apps that do that already. Well, the other nice thing is that a developer creates the app ONCE and deploys it for use on Windows machines, Macs, etc… No more creating separate builds to run on each platform. It uses Flash Player 9 which takes care of all that behind the scenes.

Another thing I liked was the ability to change the program skin, so you don’t have to have the classic Windows chrome (blue title bar, red X, etc) that all your other applications use. You can specify different chromes, such as transparent. If that wasn’t cool enough, you also aren’t bound to the classic rectangle application box. Potentially, you could make your application contained in a circle, or a star, or a flower, or the shape of Tom Cruise’s head; whatever your creative side tells you is going to sell your application.

Christophe also talked about Flex Data Services, which is the department he works in. He showed a server he wrote that runs off Tomcat and gives users a lot of help getting up and running. It can be found on his blog, specifically, the entry titled “Flex Test Drive Server for Java Developers (Tomcat-based)”. It’s a great tool for someone who wants to integrate Flex with Spring, Hibernate, JMS. Check it out!

There’s a new era of desktop application development coming, and those that don’t know how to develop Flex and Apollo apps will be labeled “old school”.

Posted on

DHL Service Tracker

see the app in action

Here’s a little app I made in Flex to address a specific need. This app, called the DHL Service Tracker (for lack of a more creative name) tracks multiple shipments in one shot. In a shipping department that ships upwards of 30 shipments a day, there is a surprising amount of service failures for each batch of shipments. In order to keep DHL accountable and to assist in finding the shipments that should be refunded (thus saving the company x amount of dollars each year) there needed to be a way to track lots of shipments at once without having to type each individual tracking number. DHL shipping systems can create daily reports of what shipments have been sent, so the data is there it just needs to be processed. That’s where this app comes in.

Here’s a summary of the workflow:

1) User copies from a shipment report and pastes into the first text area, dates and all.

2) User clicks Parse > and the app pulls out all the potential DHL tracking numbers and populates the list on the right with them.

3) If there are less than the maximum allowed tracking numbers in the list and the parsing did it’s job correctly, the user clicks Track Shipments.

4) At this point, the little man behind the curtain makes a call to DHL to get the tracking results for each of the tracking numbers.

5) The results are formatted and shown in the datagrid across the bottom of the page. Green icons mean it was on-time, red means it was late. Check marks mean it arrived, dashes mean it’s still “in transit” and if it’s late and still in transit, you might shorten that to “lost”.

Feel free to play with it. It’s a work in progress. Future versions, if I feel there’s a need, will have printing ability and more! Feel free to send suggestions on how to make the app more usable. Try out the app here.

Posted on

To start with…

Welcome! I’ll be posting projects I’m working on, things I learn about Flex 2 and ActionScript 3, and any other (hopefully useful) information that comes to mind.

Feel free to provide feedback about projects or solutions I’ve posted. My goal is to help others learn how to develop Rich Internet Applications (RIAs) as quickly and painlessly as possible. I also like to share what I’ve created with others.