Today I’m going to be live-blogging from BFlex, an Adobe Flex conference hosted at the Kelly School of Business in Bloomington, IN. I’m in the beginner’s track with BFug Manager Ben Dalton. Ben is an Adobe certified Flex instructor. I’m in the room as his assistant today and we’ll be working with people that have little or no Flex experience. The goal of this room is to give people who have some programming exposure an overview of how Flex works and what can be done with it!

One of the great things about Flex is that it is incredibly scalable. It could be used to build a widget on your sidebar, or the entire web page, or a product that is deployed through Adobe Air to the desktop.
Since Flex is delivered via Adobe Flash Player, you know that your clients will be in a situation for a couple of things:
- See The Content: 98% of people out there on the web have Flash Player
- See The Content The Right Way: Much fewer rendering issues between IE 6/7, Firefox 2/3, Safari, Etc. since they all use Flash Player
Flex uses MXML and Actionscript 3 (AS3) on the coding side. After the code has been written, the Flex Builder will compile a .swf and then the Flash Player will “play” the application. Since the Flash Player is a common platform in the Flex world, many of the standardized components that one might have to write into their applications are already included in the player itself (version 9.) As a result, Flex applications are not only richer, but also smaller (and therefore faster loading) than they might normally have to be to deliver the Rich Internet content.

One of the greatest things about this standardized content is the ability to easily reference what you are trying to do. Adobe has a wonderful Live Docs site that will give you ever bit of code you need to actually develop your own Flex applications using AS3 and MXML.
Personally, I always enjoy programs that don’t force me to code every piece of every code 100% by hand. The Flex Builder will help you to finish statements and complete tags as you begin typing. It also will show you the various components / tags / etc that are available to you when you start to type. For example, if you start trying to type s, Flex will automatically bring up the list of S operations, as well as automatically adding the mx: block to the script. If you’ve done JavaScript development before, you might be familiar with eclipse, which is the platform that Flex Builder is built on.
I’ll be updating this Blog as we cover new topics and information. I won’t be doing a play by play of the actual code that we’re doing however I will try to hit all of the major topics!
We’ve spent some time this morning talking about errors. Flex Builder has a great error console built into it! Not only does it mark up the code, but it gives specific error information at the bottom of the screen that will tell you where the problem is, and potentially (like 60% of the time) what to do about it. A best practice we discussed was to try and avoid putting all of your application into a single file. This allows for much easier debugging if you run into a problem! And of course, keep in mind that if you hit an error as you’re building, Flex is telling you this because it cannot compile with the error. Cancel the problem and solve it otherwise you’ll just keep seeing the same version of the file over and over again until you get it fixed (which is difficult if you think you are seeing updated versions when you run the application.)
Another topic we’ve covered is events. An event occurs in the system when something has happened. For example, the “creationComplete” event will fire when an object (like the application) has finished loading. Events are literally a flare gun shooting up saying “HI I DID SOMETHING!” You can then use these events to tell your code either to do, or not to do, something based on the result of an event.
LUNCH
So I’ve had several people ask me why you would use Flex instead of Flash. Flash is so popular that people are trying to use it for things that it wasn’t really originally intended. For example, at my job, we use Flash for Text delivery and content management. The problem here though, is that Flash is designed to deliver rich media content (video, audio, animation, etc.) using a timeline creation system. Flash is designed to handle text, to an extent, but its not really designed to be an entire web site or other application. It is certainly possible, but its not what it was intended to be used for. Flex on the other hand is designed to be a total application development environment. If you’re trying to do anything other than move from point a to point b, you probably want to use Flex. Probably. You can certainly still do your cool little animated header, or other device in Flash and then import that object into Flex and use it. In doing this, you’re going to be essentially getting the best of both worlds.
Just a quick note on debugging: Make sure you have the debugging version of Flash installed before you start messing with Flex!!!!!!!
Steps So Far:
- Create the Application
- Change the background color
- Create a bindable, private, variable,
- Call the variable
- Place an image
- Discussed Errors
- Discussed Components
- Events
- Debugging
- HTTP Services
Adobe does a lot of cool things for students, one of which is their education licenses. If you’re a student, you can actually get the Education version of Flex for FREE. Click here to go to their registration site. I highly recommend taking advantage of this if you’re a student!
