PDA

View Full Version : Creating links



ALS Photo
September 29th, 2007, 07:36 AM
I need help in creating links. I'm new to this Flash but I love a challenge. I know it onRelease something another like that.
Andrew

Krilnon
September 30th, 2007, 01:09 PM
What sort of link? If you you have text in a TextField that you want to be a link, you can use something like this if the text is set to be rendered as HTML.
my_txt.htmlText = '<a href="http://www.kirupa.com">Kirupa</a>';

If you want to make a button/MovieClip/Sprite a link, then you can use something like this:
my_mc.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
function onMouseUp(e:MouseEvent):void {
navigateToURL(new URLRequest("http://www.kirupa.com"));
}