package com.components
{
import flash.events.MouseEvent;
import mx.controls.Label;
public class HyperLink extends Label
{
public function HyperLink()
{
super();
this.setStyle('color','#0000FF');
this.addEventListener(MouseEvent.MOUSE_OVER,mouseOverHandler);
this.addEventListener(MouseEvent.MOUSE_OUT,mouseOutHandler);
}
override protected function commitProperties():void{
super.commitProperties();
this.buttonMode = true;
this.useHandCursor = true;
this.mouseChildren = false;
}
private function mouseOverHandler(e:MouseEvent):void{
setStyle('textDecoration','underline');
}
private function mouseOutHandler(e:MouseEvent):void{
setStyle('textDecoration','normal');
}
}
}
You can use this component directly.
Let me know if you like it. :)
Cheers!
2 comments:
This is so Good.Useful to easy learening.Thanks provide this opportunity.
technical....
didnt read the blog, it would have been greek to me, still impressed :)
Post a Comment