Skip to main content
Inspiring
January 25, 2013
Answered

URL request doesn't work outside of Flash Pro [CS6]

  • January 25, 2013
  • 1 reply
  • 1480 views

I've been working on a XML project in class using Hellcat, and everything seemed to be working properly, untill I used the html test in google chrome. None of the links would work, nor would it show an error. I thought "hey this is beta software, so it might be an error." and re-did the project in CS6. The exact same issue occured. I decided to test it in another browser. I opened it in Nightly (Firefox) and instead it blocked access to the link. I can't change the setting to allow it either (didn't show in the settings); so I don't know if it works there.

Here's my AS3 code:

var navURL2 = "http://" + (myXML.LINK[1]);

nav2.addEventListener(MouseEvent.CLICK, onClick2);

bg2.addEventListener(MouseEvent.CLICK, onClick2);

function onClick2(e:MouseEvent):void{

navigateToURL(new URLRequest(navURL2), "_blank");

}

and the XML: (I cut out the parts that aren't needed)

<LINK TITLE="">www.google.com</LINK>

What it's supposed to do:

It allows low-end users create a simple nav bar by editing elements in XML, and changing a link. You can change everything from the link, to the background of the swf.

This topic has been closed for replies.
Correct answer Ned Murphy

Have you tried tracing the navURL2 value to see if it is what you think it is?   While I don't know how you parse your xml,  I see you are using myXML.LINK[1]... since arrays start at 0 you might be missing your target.

1 reply

Ned Murphy
Ned MurphyCorrect answer
Legend
January 25, 2013

Have you tried tracing the navURL2 value to see if it is what you think it is?   While I don't know how you parse your xml,  I see you are using myXML.LINK[1]... since arrays start at 0 you might be missing your target.

Inspiring
February 1, 2013

I actually found the issue. Something was going on with my computer and wasn't allowing the links to be used on local host. But when I tested it on one of my websites, it ran find, then I had to add some exceptions and it started working corretly, thanks for the answer though.