views:

18

answers:

1

I am creating a textbutton using actionscript. the code is given below.

public function createTextButton(parentId){
            var mytext:TextField = new TextField();
            mytext.x = 478;
            mytext.y = 225;
            mytext.height = 20;
            var format:TextFormat = new TextFormat();
            format.font = "Hitchcock";
            format.size = 20;
            mytext.defaultTextFormat = format; 
            mytext.textColor =  0xffffff;
            mytext.htmlText = '<a href="j#" >Click Here</a>';

            mytext.addEventListener(MouseEvent.CLICK,paginationLinkClicked);
            mytext.addEventListener(MouseEvent.MOUSE_OVER,mouseOverButton);
            mytext.addEventListener(MouseEvent.MOUSE_OUT,mouseOutButton);
            parentId.addChild(mytext);  
        }

Now i want the click event of this button to be handled in my event handler function only. It should not navigate away to the 'href' source given upon clicking. How can i achieve that.

+2  A: 
sdolan
It seems not helping , i tried out
Wind Chimez
ok . let me try this out
Wind Chimez
great, it worked well. Thanks a lot friend
Wind Chimez