添加一个接受整个精灵的 ActionScript 事件监听器

发布于 2024-09-03 06:19:29 字数 351 浏览 1 评论 0原文

我在 ActionScript 中有一个非常简单的构造函数,如下所示:

public function ButtonTest() {
this.addEventListener(MouseEvent.CLICK, browseFiles);
}

我的问题是,当我打开 SWF 文件本身时,窗口不是全尺寸的,整个区域都会响应鼠标单击。如果我将窗口放大到全尺寸,左侧 200 像素左右的边距将无法单击。我希望我说得有道理。

问题是我的 HTML 代码中的 a 中有 .SWF 文件,当我将其缩小时,似乎只有 SWF 文件的中心是可单击的。

我希望有人能帮助我。

谢谢你, 鲁迪

I have a very simple constructor in ActionScript as the following:

public function ButtonTest() {
this.addEventListener(MouseEvent.CLICK, browseFiles);
}

My problem is that when I open the SWF file itself, the window is not full size and the whole area responds to the mouse click. If I expand the window to full size, a margin of like 200 pixels on the left is not clickable. I hope I make some sense.

The issue is that I had the .SWF file in a in my HTML code, and when I make it small, it seems that only the center of the SWF file is clickable.

I hope someone can please help me.

Thank you,
Rudy

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一个人的旅程 2024-09-10 06:19:30

stage.scaleMode 设置为 StageScaleMode.NO_SCALE,这样您就可以读取影片的实际大小,以便将按钮拉伸到整个区域。

Set stage.scaleMode to StageScaleMode.NO_SCALE, that will allow you to read the actual size of the movie so you can stretch the button over that entire area.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文