...

View Full Version : Why isn't the Label showing a hand cursor?



Spudhead
03-03-2008, 05:16 PM
Adding a bunch of clickable Labels to a container Sprite as follows:



var storiesListContainer:Sprite = new Sprite();
storiesListContainer.name = "storiesListContainer";
storiesListContainer.x = 15;
storiesListContainer.y = 75;
storiesListContainer.visible = false;
storiesListContainer.buttonMode = true;
storiesListContainer.useHandCursor = true;
stage.addChild(storiesListContainer);

var storyLabel:Label;

for (var i = 0; i<storiesArray.length; i++){

storyLabel = new Label();
storyLabel.move(4,yPos);
storyLabel.buttonMode = true;
storyLabel.useHandCursor = true;
storyLabel.autoSize = TextFieldAutoSize.LEFT;
storyLabel.htmlText = '<font face="Helvetica" size="10" color="#BCB9B5">' + unescape(storiesArray[i]).toLowerCase() + "</font>";
storyLabel.selectable = false;
storyLabel.addEventListener(MouseEvent.CLICK, loadSlideshowFromLabel);
storiesListContainer.addChild(storyLabel);

yPos += ySpacing;
}


When the cursor is over the container, it's a hand - but when it's over the label text, it's a pointer. Shouldn't the code above make it a hand? What am I overlooking?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum