• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

How to link a button

New Here ,
Feb 10, 2011 Feb 10, 2011

Copy link to clipboard

Copied

I'm new to flash builder I add a button to my page how do I link it to a web site ?

Views

366

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 07, 2011 Apr 07, 2011

Copy link to clipboard

Copied

LATEST

your_button_name_here.addEventListener(MouseEvent.CLICK, callLink);
function callLink(event:MouseEvent):void {
  var url:String = "the_url_of_the_website_here";
  var request:URLRequest = new URLRequest(url);
  try {
    navigateToURL(request, '_blank');
  } catch (e:Error) {
    trace("Error occurred!");
  }
}

I hope this helps

Loukas

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines