PDA

View Full Version : list rollover problem


TimDiacon
11-18-2005, 09:10 PM
Hello,

I have a bunch of images which are each contained within their own movie clip named thumb1, thumb2 etc

They are all set to alpha=0 and when I rollover my list component I want the thumb relavent to the index of the list item rolled over to become visible. At the moment I have:

// list rollover function
var listListenerbject = new Object();
listListener.itemRollOver = function(evt_obj) {
rolled_index = (evt_obj.index);
thumb[artist_box.getItemAt(rolled_index).data]._alpha = 100;
//thumb0._alpha = 100; // if I use this line it works so I am sure it is just the syntax in the line above which is wrong
};
artist_box.addEventListener("itemRollOver", listListener);
// roll out function
listListener.itemRollOut = function() {
thumb[artist_box.getItemAt(rolled_index).data]._alpha = 0; // again this one needs fixing
};
// Add listener.
artist_box.addEventListener("itemRollOut", listListener);

Any help appreciated :-) [CODE]