3.3 Macromedia's DRK

In October 2002, Macromedia released the first Developer Resource Kits (DRK), containing the UI Components Set 3 and one of the most important Flash extensions to date?the DataGrid component. The DataGrid component is especially important if you are going to be using Flash Remoting. Whereas the standard Flash UI components are included with Flash MX and the UI Components Set 2 are a free download, the DRK is a commercial product available from Macromedia for $99 at:

http://www.macromedia.com/go/drk

3.3.1 UI Components Set 3

The UI components that come with Flash MX provide some useful functionality and interaction with some standard user interface elements. The free UI Components Set 2 adds some more esoteric functionality to the Flash developer's toolbox, such as a calendar control and a ticker. The UI Components Set 3 is available only as part of the DRK and offers more advanced message boxes, tooltips, and loading boxes. None of the UI components in this third set, listed in Table 3-3, are data-aware.

Table 3-3. UI Components Set 3, code hint suffixes, and object types

Component

Object type

Code hints suffix

AdvancedMessageBox

FAdvancedMessageBox

None available

LoadingBox

FLoadingBox

None available

PromptBox

FPromptBox

None available

Tooltip

FTooltip

None available

TooltipLite

FTooltipLite

None available

Here is a brief description of the components in the UI Components Set 3:

PromptBox

The PromptBox component is handy for getting an item of data from a user, such as prompting the user for a password. You could then use the NetConnection.setCredentials( ) method to submit the password to a remote service. The PromptBox component allows you to specify a close handler programmatically with FPromptBox.setCloseHandler( ). The close handler callback function receives three arguments: the PromptBox name, the index of the button that was clicked, and any user input to the PromptBox.

AdvancedMessageBox

The AdvancedMessageBox component creates message boxes with multiple buttons. The AdvancedMessageBox component has functionality similar to the MessageBox component of UI Components Set 2 but adds features such as scrollable message content.

LoadingBox

The LoadingBox component can be used to display progress of any code that takes a long time to execute, such as when a remote method is executed or a recordset loads in.

Tooltip

The Tooltip components (Tooltip and TooltipLite) can be attached to other UI components to give your visual interface an added professional look.

3.3.2 DataGrid Control

The DataGrid component is the high point of the DRK, and the DRK is the only place you can get it. The DataGrid component implements a complex, navigable grid that you can tie to a RecordSet object with one line:

myGrid_dg.setDataProvider(myRecordset_rs);

This gives you a default grid that displays the entire recordset that is returned to your Flash movie, including clickable column headers that sort the data. Later in this chapter, under Section 3.7.2, I present a simple example using the DataGrid and its additional features. First, see Section 3.6 to familiarize yourself with the RecordSet class.

3.3.3 Other Content, DRKs, and Components

In addition to the DataGrid component and the UI Components Set 3, the DRK 1 contains much valuable information, including an email services ActionScript library and stock services ActionScript library that both utilize Flash Remoting and ColdFusion. Also included are several top Flash extensions from the Macromedia Exchange (including UI Components Set 2 and the Flash Charting Components), and many articles from Macromedia DevNet, several of which are focused on Flash Remoting.

Macromedia has committed to a quarterly DRK. Each DRK contains content for Flash and other Macromedia products. As of this writing, DRK Volumes 1, 2, and 3 have been issued. The Flash UI Components Sets 4 and 5 include additional advanced components and are available only as part of the DRK.

Macromedia has also released a set of components called the Data Connection Kit (DCK), or Firefly, as it is also known. The DCK contains sophisticated controls that can be utilized with Flash Remoting, or directly with XML or SQL Server. More information on the DCK can be found at:

http://www.macromedia.com/go/dck


    Part III: Advanced Flash Remoting
     
    ASPTreeView.com
     
    Evaluation has іМЦАЕЧЗexpired.
    Info...