触发带有图像叠加的Flash按钮

Triggering a Flash button with an image overlay

本文关键字:Flash 按钮 叠加 图像      更新时间:2023-09-26

我正在使用谷歌的音频播放器在网页上播放MP3。我的问题是,我在播放/暂停按钮的顶部叠加了一个图像。然而,当点击图像时,什么也没有发生。我做错了什么?下面是代码:

<div class="center" style="width: 400px; z-index:1; visibility:hidden;">
<embed wmode="transparent" width="400" height="27" 
type="application/x-shockwave-flash" flashvars="audioUrl=/sourcefile.mp3" 
src="http://www.google.com/reader/ui/3523697345-audio-player.swf" quality="best"
></embed>
</div>
<img style="position:absolute; left:323px; top:630px; z-index:10000;" 
src="/messages4u/2011/images/december/star-button.jpg" width="60" height="60"
alt="Play/Pause" />

我需要知道如何触发闪光灯按钮。我知道这是可能的Javascript,但我不知道如何。请举例说明

UPDATE:这是我在这一点上尝试的。根据Matt H的建议,我尝试了以下代码:

<input type="image" disabled style="position:absolute; left:323px; top:630px;
      z-index:10000;" src="/messages4u/2011/images/december/star-button.jpg"
      width="60" height="60" alt="Play/Pause" />

这不起作用。我注意到的一件事是,如果我有visibility:hidden;的flash播放器不会响应任何点击,不管它是什么。话虽如此,我试图使用<input> 覆盖图像,但没有 visibility:hidden;,它仍然不起作用。

我需要得到这个固定如果可能的话。我愿意使用另一个类似的flash播放器,只要它能正常工作,并将使用mp3。

看起来你的图像是捕捉点击,应该去播放按钮。你应该为你的图像添加一个处理程序,它返回true或调用播放器的play函数。

试试这个:

<input type="image" disabled style="position:absolute; left:323px; top:630px; z-index:10000;"
      src="/messages4u/2011/images/december/star-button.jpg"
      width="60" height="60" alt="Play/Pause" />