Flash not opening links on click

狂风中的少年 提交于 2019-12-10 19:19:09

问题


I created this banner with Flash and I need that on click it opens a web page.

I used this Actionscript 3.0 code...

link_btn.addEventListener(MouseEvent.CLICK, openurl);

function openurl(event:MouseEvent):void {
var url:URLRequest = new URLRequest("http://www.festivity.it");
navigateToURL(url, "_blank");
}

BUT it's not working!

WHYYYYY?!

I tried setting it on the timeline and also on a button, but nothing changed.

Whenever I click on the button... nothing happens, but sometimes a message opens with a security alert.

Thanks.

Chiara


回答1:


Make sure your publish settings enable network access from "local playback security":




回答2:


I have spent hours and hours working with the action code snippets. My head was practically bleeding, trying to figure out why my simple Go-To-URL action script wasn't working. I've been using a much older version of Flash for ten years. The "local playback security" setting was the problem, and it was not mentioned in any of the Adobe forums that I visited. What a frustrating "feature".



来源:https://stackoverflow.com/questions/13140817/flash-not-opening-links-on-click

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!