HTML and CSS Reference
In the document body, we need a function call and a div with the text to replace (Listing 6-2).
Listing 6-2. The Function Call and the div with the Original Text
Original text in the markup
The http.open() argument is the asynchronous argument that sends the request in the background.
Adobe Flex is a software development kit (SDK) for cross-platform, rich Internet applications based on the Adobe
Flash technology . The user interface layout and behavior are described by a declarative XML-based language,
MXML, while the client logic is created by using the ActionScript 3.0 programming language.
■ actionScript is an object-oriented language and a dialect of eCMaScript. Consequently, actionScript is a super-
As an example, let's create a simple RSS news feed reader! First, we need to write a common XML declaration,
followed by an MXML declaration (Listing 6-3).
Listing 6-3. The XML and MXML Declaration
Within the mx:Application , our HTTPService should be defined, and the custom controls (DataGrid, TextArea,
and Button) are prepared for the panel (Listing 6-4).
Listing 6-4. The HTTPService and the Panel for the Custom Controls
<mx:HTTPService id="httpRSS" url="http://www.example.com/rss/" resultFormat="object" />
<mx:Panel id="reader" title="Simple RSS Reader" width="600">
Now it is time to define the DataGrid. The horizontal dimension of the panel should be set by the width
parameter. Each item tag of the RSS file is bound to a DataGrid row by the dataProvider attribute. Next we create an
event handler to display the contents of the description tags inside the RSS items selected by the user. The
entries.selectedIndex variable is used to determine which item was clicked. The description of the corresponding
item is retrieved by httpRSS.result.rss.channel.item[entries.selectedIndex].description . The value of the
RSS description is assigned to the htmlText property of the TextArea (Listing 6-5).