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

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

Explorer ,
Jan 25, 2013 Jan 25, 2013

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.

TOPICS
ActionScript
1.4K
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

correct answers 1 Correct answer

LEGEND , Jan 25, 2013 Jan 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.

Translate
LEGEND ,
Jan 25, 2013 Jan 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.

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
Explorer ,
Jan 31, 2013 Jan 31, 2013
LATEST

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.

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