Skip navigation
Currently Being Moderated

ClickToGoToWebPage snippet not working

Jun 17, 2013 3:45 PM

Tags: #url #flash_professional #snippet

hi,

 

i'm having a problem with the ClickToGoToWebPage snippet because it works while i am in a preview mode, but once i publish my file, nothing happens when i click on the button.  I tried created a simple file to test out the problem.  i choose actionscript 3.0 with flash player 11.4.  i wrote some text and then converted it to a symbol with the instance name as: test.  i embedded the go to webpage snippet with the proper instance name and it works perfectly when previewing, but not when published as an HTML file.  

 

I am working on a recently bought flash cs6 and doubt that an update would help (which i am not sure how to do).  the version is 12.0.2.529.  i am using windows 8. 

 

here's what's in my actions layer:

 

stop()

 

 

test.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage);

 

 

function fl_ClickToGoToWebPage(event:MouseEvent):void

{

          navigateToURL(new URLRequest("http://www.adobe.com"), "_blank");

}

 

 

on an unrelated note, why can't i just write text and then put the web address in the "Link" text box under the text options?  i've tried this, but it does not work as well.  what is the "Link" function?

 

if anybody has any insight, it would be appreciated. 

 

thanks

 
Replies
  • kglad
    72,188 posts
    Jul 21, 2002
    Currently Being Moderated
    Jun 17, 2013 4:53 PM   in reply to apalmer1347

    you probably have a security sandbox issue with both your link and navigateToURL.

     

    either upload your files to a web server and test or, add you flash files to your trusted list, http://www.macromedia.com/support/documentation/en/flashplayer/help/se ttings_manager04.html

     
    |
    Mark as:
  • kglad
    72,188 posts
    Jul 21, 2002
    Currently Being Moderated
    Jun 18, 2013 12:05 PM   in reply to apalmer1347

    click on the link i suggested>click the 3rd tab (global security settings)>edit locations>add locations>browse for folder>navigate to the folder that contains your html and swf files and click ok, as needed.

     

    retest.

     
    |
    Mark as:
  • kglad
    72,188 posts
    Jul 21, 2002
    Currently Being Moderated
    Jun 19, 2013 1:01 PM   in reply to apalmer1347

    you didn't follow the directions in message 3.

     

    it may be easier for you to just upload your source files to your web server and test them there.  that will obivate the security sandbox issue (unless some other part of your code is triggering the error).

     
    |
    Mark as:
  • kglad
    72,188 posts
    Jul 21, 2002
    Currently Being Moderated
    Jun 20, 2013 9:44 AM   in reply to apalmer1347

    you're welcome.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points