Flash CS5- Problem with "navigateToURL" in web-browswer hosted on MySpace
- by NervXT
I made a quick flash document for my friend who posted it his MySpace. The document has 3 buttons, each with a URL attached to them. When I play the SWF file locally, the links work fine, however once it's published to MySpace, the links refuse to work. The hand icon comes up so it understands them at least as buttons, but it seems to do nothing when clicked in the web-browser. Also, I can open the SWF in my browser and it also works fine.
I'm using Flash CS5 and working in ActionScript 3.0.
The three buttons are on one layer called "Buttons". I right click the button and click "Actions". From there, I click the "Code Snippets" and under the folder "Actions" there is an item called "Click to Go To Webpage". Here is the code it gives you by default:
button_2.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage_6);
function fl_ClickToGoToWebPage_6(event:MouseEvent):void
{
navigateToURL(new URLRequest("http://www.adobe.com"), "_blank");
}
I heard there was a problem with MySpace not allowing action scripts, but after checking the source code of the web-page, the values in the "param" code seem to "always" allow action scripts.
At any point, I'm lost and not sure what it causing this. I don't think it's a browser issue, since it's working fine when I execute the SWF by itself, and when I load it into Firefox. It's just seems MySpace is having a problem with it.
Any advice is appreciated.