MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference page 129

Components language reference
Table of Contents

Advertisement

If you want to enable the check box on the second row, you communicate through the data
provider. Any change to the data provider (when made through a DataProvider method such
as
DataProvider.editField()
code would be written in the Flash application, either on a frame, on an object, or in another
class file (but not in the cell renderer class file):
// calls setValue() again
myGrid.editField(1, "enabled", true);
The following example loads an image in a loader component within the cell, depending on
the value passed:
function setValue(suggested, item, selected) : Void
{
/* Hide anything normally rendered in the cell if item is undefined.
Otherwise update the cell contents with the new data.
*/
if (item == undefined){
loader._visible = false;
}else{
// clear the loader
loader.contentPath = undefined;
// the list has URLs for different images in its data provider
if (suggested!=undefined){
loader.contentPath = suggested;
}
}
}
The following example is from a multiline text cell renderer:
function setValue(suggested:String, item:Object, selected:Boolean):Void
{
/* Hide anything normally rendered in the cell if item is undefined.
Otherwise update the cell contents with the new data.
*/
if (item == undefined){
multiLineLabel._visible = false;
}else{
// adds the text to the label
multiLineLabel.text = suggested;
}
}
) calls
to refresh the display of the grid. This
setValue()
CellRenderer.setValue()
127

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash 8

Table of Contents