Flash AS3:光标手不显示在Firefox
问题描述:
我有下面的代码添加一个影片剪辑到我的舞台,并将buttonMode设置为true。我可以在Chrome浏览器中看到光标而不是在Firefox中。此影片剪辑中没有任何文字。有任何想法吗?Flash AS3:光标手不显示在Firefox
//get the objects
var mcLogo:mc_logo_still = new mc_logo_still();
mcLogo.buttonMode = true;
//add the still object to the stage
addChild(mcLogo);
var mcLogo_X = 142.00;
var mcLogo_Y = 66.00;
mcLogo.x = mcLogo_X;
mcLogo.y = mcLogo_Y;
//set up the link
function gotoHomePage(event:MouseEvent):void {
//var targetURL:URLRequest = new URLRequest("http://mc.com/");
//navigateToURL(targetURL);
navigateToURL(new URLRequest("http://mc.com"), "_blank");
}
mcLogo.addEventListener(MouseEvent.CLICK, gotoHomePage);
答
我猜你使用Firefox 4.0。 Firefox 4.0中似乎存在一个关于Flash和鼠标光标的错误(也影响Mouse.hide()
)。显然目前没有什么可以做的......也看看这个Firefox help thread。
答
添加这两行的按钮模式行之后:
mcLogo.useHandCursor = true;
mcLogo.mouseChildren = false;
答
这是Firefox的一个错误。它是在Firefox 4中引入的,并未在Firefox 5中解决。“useHandCursor”不会解决此问题。
似乎没有工作。这些线路是否有特定的顺序? – Dan 2011-05-25 18:00:37
我编辑了答案并添加了一行,因为我不知道mcLogo的组成。你有什么版本的Firefox?另外,你有什么版本的Flash播放器在Firefox?如果可能的话,你可以把一个链接到.swf,以便我可以在Firefox中检查它。 – prototypical 2011-05-25 18:11:07
是的 - 可能只是想确保没有其他舞台元素覆盖剪辑。理想情况下,如果剪辑包含其他剪辑,则应该在剪辑中放置一个按钮,专门执行任何点击操作。 – mheavers 2011-05-25 21:24:00