Skip navigation
H_ford
Currently Being Moderated

sendToURL()

Aug 7, 2012 3:37 PM

Tags: #swf #actionscript #actionscript3 #sendtourl

sendToURL("http://google.com")

 

When I add this code and preview, I get errors. What kind of code am I supposed to use for  sendToURL function to redirect to google.com?

 
Replies
  • Currently Being Moderated
    Aug 7, 2012 3:44 PM   in reply to H_ford

    If you are trying to link to a new web page use navigateToURL()

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 7, 2012 3:46 PM   in reply to H_ford

    Note that I changed the command to navigateToURL().  Also, the argument in the function call needs to be a URLRequest object, not a String, as in...

     

    navigateToURL(new URLRequest("http://google.com"));

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 7, 2012 3:47 PM   in reply to H_ford

    Actually, getURL is AS2... my mind slipped a bit.  If you know you need to use sendToURL, it still requires a URLRequest object such as what I showed in the last posting.

     
    |
    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