Progress with Flex 3
Somewhat irrelevant news: Please excuse my absence. I decided to take a long break, since I experienced some complications and my son was delivered a month earlier than he was due. This post was scheduled for editing and posting on March 26.
With a magic little button, I managed to connect to the FMS. Then I bit off more than I could chew with a larger set of UI components. Now, with a little data binding and a lot of ActionScript 3, I have a basic broadcaster built. I’ve read more documentation and books on ActionScript 3, Flex 3 and Flash Media Server than I care to admit, but so far I have absorbed and applied everything I have read. Building my first RIA has been every bit of fun and frustration as I expected, only on a much slower timeline than I had hoped. For every 1 hour I expected to work on a task, I have actually worked 4.
Many of the things I built came from old sample projects. I translated them from Flash to Flex, then from ActionScript 2 to ActionScript 3. You can download my sample projects, supply your own RTMP address and see instant results:
- playback-stream.zip
- make-connection.zip
- nice-ui.zip
- data-binding.zip
I hope these examples help you learn Flex faster than I did.
Flex Resources and Help
The best resources I found, in a variety of media:
Books
These were the top 3 books recommended over and over again by the Usenet groups I follow.
- Programming Flex 3: The Comprehensive Guide to Creating Rich Internet Applications with Adobe Flex [link]
- Essential ActionScript 3.0 [link]
- Programming Flash Communication Server [link]
Web
Documentation
If you have a project already in mind and understand object oriented code, you may want to jump right in with your idea.
- Flex 3 docs [html | pdf]
- ActionScript 3 docs [html | pdf]
- Flash Media Server 3 docs [html | pdf]
- Flash Media Server 3.5 docs [html | pdf]
Video Tutorials
While Lynda.com has been a great resource for learning Flex, these free video tutorials have proven just as handy:
- Learn Flex in a Week [video tutorials]
- Flash 411: Getting your video questions answered [video tutorials]
Sample Apps
Sometimes the best way to learn a new concept is to just jump right in and get your hands dirty. These sample applications are small, simple and great examples of the potential behind RIAs. Although the first one is created in Flash, it can be done in Flex, too.
- Building a Simple Live Video Broadcaster and Receiver [sample app]*
- Creating a Simple RIA [sample app]
* As someone new to Flex, I thought the broadcaster/receiver idea would have been really useful as a sample Flex project, so I rebuilt this one in Flex and translated it from ActionScript 2 into ActionScript 3. I’ll make the .zip file available for download in the next post.
People
For those really complex questions that can’t be answered by a definition in the documentation or isn’t covered in the books, you can connect to a pool of professionals via e-mail:
Flex, Flash Media Server and RIA concepts
Flex Research
Rich Internet Applications are popping up all over the web. When I first saw them, I thought, “I want to do that too!” I started from level 0 when learning how to use Flex and Flash Media Server to build RIAs, and I had a lot of questions:
- What is Flex?
- What makes the Flash Media Server so special?
- Why are developers using Flex & FMS to build their Rich Internet Applications?
Defining Flex
Flex is confusing. Like Flash, it can mean many different things, depending on the conversation. If you are familiar with the multiple meanings of “Flash,” it will help you understand “Flex.” As you are probably already aware, “Flash” can refer to:
- the software – an IDE, such as Flash MX 2004
- an animation or game built from the software – like homestarrunner.com
- the .swf – the most common compiled file created by the software
- the player – such as Flash Player 10, a web browser plug in
Its logic is driven by a script language called ActionScript. “Flex” can mean:
- the software – an IDE, such as Flex Builder 3
- the framework – the SDK, such as Flex SDK
- Rich Internet Applications built from the software
Flex creates .swf files for the client, just like Flash. It uses Flash Player, just like Flash. Its logic is driven by ActionScript and can also incorporate a server-side language, such as Coldfusion, PHP or asp.NET.
The applications I develop for my company will use a symphony created from Flex, Flash Media Server, ActionScript 3 and asp.NET.
The Flash Media Server
FMS is a powerful tool that is simple to implement. If you want to manipulate online video and deliver it in an efficient manner without knowing much about video, FMS is a good, albeit expensive, answer. Dynamic video streaming and live streaming video with fast setup and use. Once FMS was installed it was easy to jump right in and begin adding stream-on-demand videos for our clients. The Flash Media Encoder allows you to start streaming live video with less than 5 minutes of time setting up the program. The major flaw of the Flash Media Encoder is that it supports Windows only- no Linux or Mac version of the software is available.
Rich Internet Application Development – Why FMSÂ and Flex?
FMS makes it easy to deploy video as well as coordinate any real-time tasks by using RTMP. Flex allows rapid prototype development thanks to the multitude of components and libraries available in the framework. Create your application in Flex, publish the resulting .swf file, have it coordinate with FMS for any real-time tasks you have, and voilĂ ! you just produced: an online video chat, a live auction complete with audio, video and real-time bidding, or a live business presentation across countries.
Working with Flex 3
Predictable as ever, requests for updates to our clients’ sites are picking up as everyone gears up for the Spring Sale season. It’s comforting to see that demand hasn’t slowed, despite the media’s constant attention on lost jobs and drooping sales.
From 8 a.m. to 4:30 p.m., I do updates. It’s dull work, but I’m grateful nonetheless. It’s become dull because there are only 15 sites left that need migrated from GoLive to Dreamweaver and 5 of them won’t count, since I plan on rebuilding them anyway. I stick to the daily grind because of an agreement with Rich: if I want to work on projects during busy season, I have to do updates during regular hours and the fun projects during overtime hours. I have to admit, it’s a nice managerial trick to keeping me focused and motivated to do what I have to do.
So why do I look forward to after hours work? Because we just bought Flex Builder 3
and four new
technical
manuals
(full disclosure: these are my affiliate links). For the past three weeks I have taken a crash course in Rich Internet Application development in the form of MXML, ActionScript 3, XML and Flex Builder 3. So far I have figured out how to use MXML to create a static video player and a streaming video player. I tried to extend what I learned and connect an HSlider component to a Video Display method to create a scrub bar, but wasn’t successful.
Moving on, I’m another step closer to creating a web-based Flash Media Encoder. Currently it’s a free app available from Adobe for Windows XP/Vista only – with no Mac support, which is why I am building my own. I have built a small receiver, so users can watch a live stream that we broadcast out. It’s for learning and testing purposes only, so there aren’t any regular live streams happening. Next I’ll be working on building the broadcaster. Just getting the broadcaster to RUN is my first goal. Beyond that, I’ll work on auto-detecting bandwidth levels, error/exception handling, and handling multiple requests for the live stream.
The main goal is to have a functional prototype ready to use during the National Junior Angus Show. So my first big project due date is Sunday, July 19. I hope I can meet the deadline!

