2
votes

I have a button to link URL using Flahs CS6 AS3. When I test it in Flash Professional,(Cntl+Enter) it worked, but when I test in Browser (F12) the button is not working. also when I open swf file it self, it is not working as well. Only works when it export from Fla file (using Cntl+Enter), but not opening acutal swf file from the folder)

the code is this - and I think this one is ok, because it working when exported (Cntl+Enter)

function gotoAuthorPage(event:MouseEvent):void

 { 
  var targetURL:URLRequest = new URLRequest("http://www.google.com/"); 
  navigateToURL(targetURL,"_self"); 
} 

  my_btn.addEventListener(MouseEvent.CLICK, gotoAuthorPage);

Does anybody know why this happening and how can I make it work in browser, and swf file... please help!

Thanks

1

1 Answers

0
votes

When you ctrl+enter from Flash, your SWF is executing in projector.

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

publish-settings