Tooltip to link elements
Hello
I am trying to attaching tooltips to the link elements in my text flow.I added the roll over event listener with the link element and then trying to display the href of link element in the tool tip.
The problem is when I am trying to get the particular link element over which the mouse is rolling as evt.currentTarget as linkElement,it is null.When I try to check it using trace, the output was [Object eventDispatcher]. I am writing the few effect related lines of my code:
linkElement.addEventListener(MouseEvent.ROLL_OVER,applyToolTipToLink);
and after adding event, I am creating tooltip using
private function applyToolTipToLink(evt:Event):void{
var linkElem:LinkElement = evt.currentTarget as LinkElement;
spriteToolTip = ToolTipManager.createToolTip(linkElem.href,this.mouseX + 10,this.mouseY)as ToolTip;
}
Doesn't meet the required results and exception arise is "Cannot access a property or method of a null object reference."
Any Solution.
