• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 18. Adding Advanced Display Components > Using a Local Data Provider

Using a Local Data Provider

The DataGrid component lets you provide data using a local (embedded in the document) data provider. The data is read into the grid from a pre-written ActionScript, and since Flash components are on the Stage, the ActionScript would typically be entered into the first frame of the Flash Timeline.

Use a Local Data Provider

1.
Open the Components panel.

2.
Click the UI Components Expand triangle.

3.
Drag the DataGrid component onto the Stage, and then select the component.

4.
Enter a unique instance name for the DataGrid component in the Property Inspector.

5.
Select Frame 1, open the Actions panel, and then enter the script as shown in the illustration.

6.
Click the Control menu, and then click Test Movie.

The name and home fields are the column headings for the DataGrid component, and the values fill the cells in each row.

IMPORTANT It’s smart programming to create a separate layer to hold the ActionScript for the DataGrid. That way you have much easier access to the script.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint