Flash Player 7.
DisplayBox.addItemImage(ID,ImageName,LibraryID[,xPos,yPos,isClickable,RollText,ColumnID,nHeight,nWidth])
ID The ID of the row to add an image to.
ImageName The name used to refer to this image, used
to delete the image later on and also passed back to the ImageClick event when
a user clicks on the image.
LibraryID The name assigned to this image in your movies
library.
xPos Optional; The x position you want the image
to appear at in the row, default : 0
yPos Optional; The y position you want the image
to appear at in the row, default : 0
isClickable Optional; If set to true, allows the
user to click on this image for notification to your movie. default : false.
RollText Optional; Sets the text the user sees in
the rollover box when the mouse is over the image. default : No rollover
ColumnID Optional; If specified, the xPos will automatically
be offset by the _x value of the ColumnID specified. default : 0
nHeight Optional; Height to resize the image to,
a 0 will result in the image not being resized. default : 0
nWidth Optional; Width to resize the image to,
a 0 will result in the image not being resized. default : 0
Nothing.
Function; Allows one or more images to be associated with a row. You can decide if each image is user clickable and then perform additional events based on the image being clicked. This allows huge flexability when needing a single row to accomplish multiple events.
In this example, we add a new row and image. When the user clicks on the image, the ImageClick Event is fired passing back which row and the name of the image that was clicked. We then modify the database or anything else that you are using the control for. Next we remove the clicked image, and set it to the next image. This example shows how to use the images as a pseudo checkbox in the control, therefore allowing multiple checkboxes, or multi-state symbols per row.
myDisplayBox.ImageClick=function(ID,ImageName)
{
//Code to update your database or anything else that needs to be updated
myDisplayBox.removeItemImage(ID,ImageName);
if (ImageName==”UnChecked”)
{
myDisplayBox.addItemImage(ID,"Checked","imgCheckBoxSet",0,0,true,"Click here to change to user mode") ;
}
else
{
myDisplayBox.addItemImage(ID,"UnChecked","imgCheckBoxEmpty",0,0,true,"Click here to change to administrative mode") ;
}
}
nID=myDisplayBox.addListItem();
myDisplayBox.addItemImage(nID,"UnChecked","imgCheckBoxEmpty",0,0,true,"Click here to change to administrative mode") ;