Flash Player 7.
DisplayBox.addColumnImage(ColumnID,ImageName,LibraryID[,xPos,yPos,isClickable,RollText,nHeight,nWidth])
ColumnID The ID of the column header 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 ColumnImageClick
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. A negative value will result in the image being offset
from the end of the column header. default : 0
yPos Optional; The y position you want the image
to appear at in the column header, 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
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. A value of -1 will result in
the image being resized to the length of the column header. default : 0
Nothing.
Function; Allows one or more images to be associated with a column header. You can decide if each image is user clickable and then perform additional events based on the image being clicked.
In this example, we add a new row and image. When the user clicks on the image, the ColumnImageClick Event is fired passing back which column header and the name of the image that was clicked. We can now modify the image on the header to change the sort direction and call a sorting function. The negative 10 will result in the image being 10 pixels from the end of the column.
myDisplayBox.ColumnImageClick=function(ID,ImageName)
{ var SortDir;
myDisplayBox.removeColumnImage(ID,ImageName);
if (ImageName==”Up”)
{
SortDir="Down;
}
else
{
SortDir="Up";
} myDisplayBox.addColumnImage(ID,SortDir,"imgSort"+SortDir,-10,0,true,"Click here to reverse your sort");
} myDisplayBox.addItemImage(ID,"Up","imgSortUp",-10,0,true,"Click here to reverse your sort") ;