Hi all, I tried searching for this, but couldn’t find anything. I have a movie in which buttons are created dynamically:
links = [“About Us|about.html”, “Locations|locations.html”, “Doctors|doctors.html”, “Hospitals|hospitals.html”, “Research|research.html”, “Optical Shops|optical.html”, “International|international.html”];
function buildList() {
var i = -1;
while (++i<links.length) {
name = “Button”+i;
_root.linksHolder.attachMovie(“links”, name, i, {_x:800, number:i, high:links.length});
_root.linksHolder[name].linkName = links*.split(’|’)[0];
_root.linksHolder[name].link = links*.split(’|’)[1];
}
}
buildList();
stop();
But, I want the “hit” area of the buttons to be the same length as linkName, because right now, the button extends way beyond the text, which doesn’t look that nice. I’ve tried both using “autoSize” and creating a movieclip in the hit area, but have been successful with neither, any suggestions would be greatly appreciated!