I've been a zone leader with DZone since 2008, and I'm crazy about community. Every day I get to work with the best that JavaScript, HTML5, Android and iOS has to offer, creating apps that truly make at difference, as principal front-end architect at Avego. James is a DZone Zone Leader and has posted 639 posts at DZone. You can read more from them at their website. View Full User Profile

Flex 3 In Action: Free Chapters

  • submit to reddit

We're giving away two free chapters from the new Flex 3 In Action book in association with Manning Publications. Flex 3 in Action is an easy-to-follow, hands-on Flex tutorial. This book goes beyond feature coverage and helps you put Flex to work in real day-to-day tasks. You'll quickly master the Flex API and learn to apply the techniques that make your Flex applications stand out from the crowd.

The chapters included are Working With ActionScript  and Displaying Forms And Capturing User Input

Working With ActionScript 

ActionScript is an extremely powerful object-oriented language about which you can dedicate entire books. In this chapter we’ll focus on ActionScript’s core concepts; obviously you will need to be familiar with them before we get to the more powerful aspects of Flex itself. Speaking of which, you’re probably anxious to get back into Flex, but tackling some ActionScript fundamentals will allow us to pick up the pace and move further forward.

A fundamental concept in any programming language is that of comments, so we’ll begin our discussion with how Flex supports documenting your code.

Download the rest of this chapter here.


Displaying Forms And Capturing User Input

Let’s put our newly acquired understanding of layout and ActionScript to work and apply it to a fundamental operation of any application—capturing user input. As mentioned in chapter 4, even though Flex offers a Form component, its use is optional and you’ll find it functions best as a layout tool. In the land of Flex you are
equipped with control components (usually referred to as controls) that display information and accept user input. Alongside controls are events and event handlers that recognize and respond to user actions, such as clicking a mouse.
When event handler functions run, they access data from whatever source they’ve been instructed; there’s no master Form tag that contains all the inputs as in HTML.

NOTE Say goodbye to the notion of HTML Forms. The optional <Form> tag in Flex does nothing more than lay out UI components called controls.

Remember, you’re not restricted to the set of controls that come with Flex. Unlike HTML, which limits your UI controls to the HTML specification and browser implementation, Flex encourages you to extend an existing control to add more functionality, or create your own, completely new, UI controls from scratch.
One of the teaching approaches this book employs is to show many ways of doing the same thing. From example to example, we’ll use an idea from the previous one, but then change a portion of it to demonstrate an alternative. The alternatives aren’t necessarily any better, they’re just different, but more importantly help you to think with the ActionScript mentality.

A core piece to that understanding is the invaluable id attribute, a handle to an MXML component that allows you to access the values contained by the id attribute.

Download the rest of this chapter here.



Kees Kuip replied on Wed, 2009/05/20 - 2:52am

Why do you (as a zoneleader) advertise your flex book on java lobby?

Otengi Miloskov replied on Wed, 2009/05/20 - 3:30am

They are giving free chapters and the Java and Flex combo it is great this days for RIA development.

James Sugrue replied on Wed, 2009/05/20 - 4:44am in response to: Kees Kuip


This isn't my book - we're just giving away free chapters thanks to a collaboration with Manning. The book is written by Tariq Ahmed and Jon Hirsch.

Flex is an important part of the RIA stack, and as it can integrate with Java I feel it's fair to have it on Javalobby


Mark Haniford replied on Wed, 2009/05/20 - 11:00pm

My question is who at Javalobby decided that Flex is part of the Java ecosystem?  I guess we should get those Silverlight articles ready for Javalobby.

Alexander Shirkov replied on Fri, 2009/05/22 - 7:01am in response to: Mark Haniford

Flex has a good Java-friendly development environment and integration solutions. Silverlight is not.

Mark Haniford replied on Sat, 2009/05/23 - 8:16pm in response to: Alexander Shirkov

Flex's eclipse-based IDE doesn't make it any more part of the Java ecosystem than a PHP eclipse plugin makes it part of the Java ecosystem. 


But Adobe has done a good job of sending out its evangelists.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.