Home » Software » Adobe Flex
Learning Flex Through Applications
In this chapter we ll roll up our sleeves and build several mini-applications to illustrate the use of
various elements and techniques of both ActionScript 3.0 (AS3) and MXML that you ll be using in
real-world projects. But this is not a tutorial and we ll be introducing these elements on an as-need-
ed basis ...
In particular, this chapter contains:
- A description of some of the AS3 features that may seem unusual to Java programmers
- A review of object-oriented programming techniques in AS3
- A short description of ECMAScript for XML, which offers simpliï¬ ed processing of the XML sources
- An overview of the Flex event model
- An application that uses namespaces in AS3
- A program that uses Flex data binding and regular expressions
- An application illustrating the communication between Flex and JavaServer Pages
- A sample application showing different ways of achieving the same results by people with dif- ferent programming backgrounds
- An application illustrating the use of collections, ï¬ lters, and timers
Some of the Flex classes are intentionally deï¬ ned as dynamic, those being Object, Array, MovieClip, NetConnection, and AsyncToken. When this chapter was written, the subclasses of the dynamic classes were not dynamic by default. Because of this, you may run into a runtime error: imagine a sealed class S that extends a dynamic class D.
Almost any non-trivial action in Flex â communication with the server, say, or get- ting input from a user â is asynchronous. Using closure automatically gives you the reference to the class instance in which you have your function to the external object processing the event. Thatâ s sufï¬ cient for processing the asynchronous methodâ s results in most cases. Automatic pointing of this context to the instance deï¬ ning the function greatly simpliï¬ es the coding since itâ s natural to the developer.
The Flex compiler generates bindable wrappers in AS3 for each property or expression that is be- ing watched (i.e., PropertyWatcher), and itâ ll generate all the required AS3 code for event process- ing (see the section on events later in this chapter). And of course, itâ ll create an instance of an mx.binding.Binding object that ties everything together.
...
Source: res.sys-con.com
Related PDF Files
Topic:
Comments for Learning Flex Through Applications