Hi,
I've actually never used components before so having a little trouble figuring out how to do this, although I would think it would be simple?
Basically there is a list component that holds a list of gallery names.
The list component display a list of gallery names, gallery1 - gallery7
The only thing I need to figure out is that I want to call a function whenever each list item is clicked. Just don't know how...
Thanks for any help
Code:
// The following example discovers the number of visible items in a list:
var rowCount = my_list.rowCount;
// The following example removes a partial row at the bottom of a list, if there is one:
my_list.rowCount = my_list.rowCount;
// The following example resizes the list using the setSize() method and then sets a row count of 8 items:
my_list.addItem({data:"gallery1", label:"gallery1"});
my_list.addItem({data:"gallery2", label:"gallery2"});
my_list.addItem({data:"gallery3", label:"gallery3"});
my_list.addItem({data:"gallery4", label:"gallery4"});
my_list.addItem({data:"gallery5", label:"gallery5"});
my_list.addItem({data:"gallery6", label:"gallery6"});
my_list.addItem({data:"gallery7", label:"gallery7"});
my_list.setSize(130, 30);
my_list.rowCount = 7;
my_list.hScrollPolicy = "off";
trace("my_list has " + my_list.rowCount + " rows.");
// set the row height
my_list.rowHeight = 20;
// custom look 'n' feel...
my_list.backgroundColor = "0x2c2c2c";
my_list.borderStyle = "none";
my_list.color = "0x94CE00";
my_list.embedFonts = "true";
my_list.fontFamily = "FFF Star";
my_list.fontWeight = "normal";
my_list.fontSize = "8";
my_list.textRollOverColor = "0x777777";
my_list.textSelectedColor = "0x898888";
my_list.rollOverColor = "0x2c2c2c";
my_list.selectionColor = "0x2c2c2c";