views:

250

answers:

1

My datagrid component appears to be broken.

When I drag one out onto the stage, its just a square. Nothing in it. Just a square...

Then, when I tried to programmatically add it to the stage, using an example straight off the docs, it throws some errors:

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/controls/DataGrid.html

import fl.controls.DataGrid;
var myDataGrid:DataGrid = new DataGrid();

Errors:

1172: Definition fl.controls:DataGrid could not be found.
1046: Type was not found or was not a compile-time constant: DataGrid.
1180: Call to a possibly undefined method DataGrid.

This sounds very bad, especially considering that I need to use the DataGrid to complete my program.

What am I doing wrong and how can I fix it? This is AS3, right in frame 1 of the main timeline.

+1  A: 

enable "Components" panel -> drag datagrid component inside the library panel -> it should work now

antpaw
Tried that, thats what I mean by the square.
Cyclone
hmm i did exactly the same and it compiled the swf without errors. I'm using cs4
antpaw
I'm in CS3...think that could do it?
Cyclone
Got it working now
Cyclone