浏览器中的 Flash CS6 AS3 测试影片不工作 [英] Flash CS6 AS3 test movie in browser not working

查看:36
本文介绍了浏览器中的 Flash CS6 AS3 测试影片不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用 Flahs CS6 AS3 链接 URL 的按钮.当我在 Flash Professional 中测试它时,(Cntl+Enter)它起作用了,但是当我在浏览器(F12)中测试时,按钮不起作用.此外,当我自己打开 swf 文件时,它也无法正常工作.仅在从 Fla 文件导出时有效(使用 Cntl+Enter),但不能从文件夹中打开实际 swf 文件)

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)

代码是这样的 - 我认为这个没问题,因为它在导出时可以工作(Cntl+Enter)

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);

有谁知道为什么会发生这种情况以及如何使其在浏览器和 swf 文件中工作...请帮忙!

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

谢谢

推荐答案

当您从 Flash ctrl+enter 时,您的 SWF 正在投影仪中执行.

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

确保您的发布设置允许从本地播放安全"进行网络访问:

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

这篇关于浏览器中的 Flash CS6 AS3 测试影片不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆