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

Problems with URL in CS5

New Here ,
Jun 24, 2010 Jun 24, 2010

Hello, all.  I'm having a simple but very frustrating problem in Flash CS5 with Actionscript 3.  I'm trying to set up a link in an image, when you mouseover the image, it says video and I want to be able to click on it and have it lead to a new URL.  I've gotten the swinging right and have tried (what seems like) every actionscript code out there.  Currently I have:

/* Click to Go to Web Page
Clicking on the specified symbol instance loads the URL in a new browser window.

Instructions:
1. Replace http://www.adobe.com with the desired URL address.
Keep the quotation marks ("").
*/

help_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage);

function fl_ClickToGoToWebPage(event:MouseEvent):void
{
navigateToURL(new URLRequest("http://www.adobe.com"),
"_blank");
}

Which is the basic code snippet, but it won't load adobe.com or any other site and doesn't show any error messages.  Might anyone have any thoughts or suggestions?

Thank you in advance,

Katie

TOPICS
ActionScript
792
Translate
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
Jun 24, 2010 Jun 24, 2010

There's nothing wrong with the code. You should put a trace in the function to verify it's getting called.

Translate
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
New Here ,
Jun 24, 2010 Jun 24, 2010

How do I do that?  (Sorry, I'm quite new at this)


Translate
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
Jun 24, 2010 Jun 24, 2010

You could look in the help, as you need to learn to use trace - it's very useful for debugging. That being said - you just do like:

function fl_ClickToGoToWebPage(event:MouseEvent):void
{

     trace("fl_Click was called successfully");
     navigateToURL(new URLRequest("http://www.adobe.com"), "_blank");
}

If the function is called, you will see the text appear in the Output window.

Translate
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
New Here ,
Jul 01, 2010 Jul 01, 2010
LATEST

I see the same problem but it appears to be an IE problem. Gee, what else is new? Linking works fine in Mac/PC FF-Chrome-Safari. No go in IE 6 or 7. Have not checked IE8.

Translate
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