What I'm trying to do is; upon clicking a textfield, a function runs which uses the text in the textfield as the URL for a URLRequest and sends you to another page. It works perfectly, but I want the cursor to switch to a hand upon hovering over the textfield.
I was able to do this by adding them as Children to a MovieClip with buttonMode and useHandCursor enabled, but I had to set MovieClip.mouseChildren to false for it to work. And that's where the problem lies; mouseChildren is disallowing me from going to the page...
I can't make the MovieClip parent go to the URL with the function, because there are multiple textfields, not just one, and I can't use e.target.text to get the URL from the textfield, because that gets the text property from the parent MovieClip instead...
Here's my code:
var handyMan:MovieClip = new MovieClip;
handyMan.useHandCursor = true;
handyMan.buttonMode = true;
handyMan.mouseChildren = false;
for each (var xit:TextField in linkus)
{
xit.addEventListener(MouseEvent.CLICK, useLink);
handyMan.addChild(xit);
}
this.addChild(handyMan);
function useLink(e:MouseEvent):void
{
navigateToURL(new URLRequest(e.target.text));
}
So, is there a way to enable mouseChildren and use a hand cursor at the same time?