Flash 4 位图图像和事件

发布于 2024-08-25 14:31:42 字数 298 浏览 5 评论 0原文

我正在尝试使用 BitmapImage Spark 类而不是 mx 图像类。 图像加载相同,很好

<s:BitmapImage  id="img" source="sample.jpg">

</s:BitmapImage>

但是我在添加鼠标事件时遇到问题,例如:

img.addEventListener(MouseEvent.CLICK,clicked);

单击图像时不要触发任何鼠标事件

帮助! 谢谢

I am trying to use BitmapImage spark class instead of mx image class.
Image loads the same, fine

<s:BitmapImage  id="img" source="sample.jpg">

</s:BitmapImage>

But I have an issue with adding mouse events on it, eg:

img.addEventListener(MouseEvent.CLICK,clicked);

do not trigger any mouse events when clicking on the image

Help!
Thanks

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

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

发布评论

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

评论(1

风向决定发型 2024-09-01 14:31:42

我找到了一个解决方案,通过 Graphic 类处理事件......

<s:Graphic id="img">


        <s:BitmapImage   source="media/paxRomana005_150dpi.jpg">

        </s:BitmapImage>
</s:Graphic>

谁能点亮我......?谢谢

I found a solution, handling the events through the Graphic class ...

<s:Graphic id="img">


        <s:BitmapImage   source="media/paxRomana005_150dpi.jpg">

        </s:BitmapImage>
</s:Graphic>

Who can light me ...? Thanks

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