当有人点击 flashobject 时,Javascript 是否可以触发事件
我们在网站上使用视频播放器,它为我们提供了以下嵌入代码
<object width="640" height="390" id="gorillanationPlayer_sotv002_playlist_677_sotv002_single_302479" data="http://cdn.springboard.gorillanation.com/storage/xplayer/yo033.swf?pid=sotv002&siteId=677&videoId=302479&autostart=false&file=http://cms.springboard.gorillanation.com/xml_feeds_advanced/index/677/3/302479/" class="SpringboardSwitcher" type="application/x-shockwave-flash"> <param name="wmode" value="transparent"> <param name="swliveconnect" value="true"> <param name="allowfullscreen" value="true"> <param name="allowScriptAccess" value="always"> <param name="movie" value="http://cdn.springboard.gorillanation.com/storage/xplayer/yo033.swf?pid=sotv002&siteId=677&videoId=302479&autostart=false&file=http://cms.springboard.gorillanation.com/xml_feeds_advanced/index/677/3/302479/"></object>
是否可以检测到有人单击对象来播放它?我想捕获一个事件来触发其他一些 JavaScript。欢迎任何想法。
干杯
We use a video player on our site which gives us the following embed code
<object width="640" height="390" id="gorillanationPlayer_sotv002_playlist_677_sotv002_single_302479" data="http://cdn.springboard.gorillanation.com/storage/xplayer/yo033.swf?pid=sotv002&siteId=677&videoId=302479&autostart=false&file=http://cms.springboard.gorillanation.com/xml_feeds_advanced/index/677/3/302479/" class="SpringboardSwitcher" type="application/x-shockwave-flash"> <param name="wmode" value="transparent"> <param name="swliveconnect" value="true"> <param name="allowfullscreen" value="true"> <param name="allowScriptAccess" value="always"> <param name="movie" value="http://cdn.springboard.gorillanation.com/storage/xplayer/yo033.swf?pid=sotv002&siteId=677&videoId=302479&autostart=false&file=http://cms.springboard.gorillanation.com/xml_feeds_advanced/index/677/3/302479/"></object>
Is it possible to detect when someone clicks on the object to play it? I'd like to capture an event to fire off some other Javascript. Any ideas welcomed.
Cheers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你想使用ExternalInterface来调用你的javascript:
http://help.adobe.com/en_US /FlashPlatform/reference/actionscript/3/flash/external/ExternalInterface.html
You want to use ExternalInterface to call your javascript:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/external/ExternalInterface.html