Flash播放器:使用情况 [英] flash player: usage

查看:125
本文介绍了Flash播放器:使用情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的网站中使用Adobe Flash播放器,现在我需要在用户点击播放器时增加一些数据库中的数据。
这里是脚本

 < div id =conteinerstyle =text-align:center; >< / DIV> 
< script type =text / javascript>
var s1 = new SWFObject(player.swf,ply,420,380,9,#FFFFFF);
s1.addParam(allowfullscreen,true);
s1.addParam(allowcriptaccess,always);
s1.addParam(flashvars,file =<?= $ video?>);
s1.write(conteiner);
< / script>

我希望为它使用ajax,但是如何在flash对象中编写函数?
提前致谢

更新:
i仅包含swfobject.js文件,其中包含此类数据

  if(typeof deconcept ==undefined){var deconcept = new Object();} 
if(typeof deconcept。如果(de> deconcept.SWFObjectUtil ==undefined){deconcept.SWFObjectUtil = new Object();} deconcept.SWFObject = function (_1,ID,W,H,_5,C,_7,_8,_9,_a){如果(的document.getElementById!){回报;} this.DETECT_KEY = _a _a: detectflash; this.skipDetect = deconcept .util.getRequestParameter(this.DETECT_KEY); this.params = new Object(); this.variables = new Object(); this.attributes = new Array(); if(_1){this.setAttribute(swf, _1);}如果(ID){this.setAttribute( ID,ID);}如果(w)的{this.setAttribute( 宽度 中,w);}如果(H){this.setAttribute( 高度 ,);} if(_5){this.setAttribute(version,new deconcept.PlayerVersion(_5.toString().split(。)));} this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion() ;如果(window.opera&安培;!&放大器;的document.all& amp; this.installedVer.major> 7)
...

player.swf ,以及我已经显示的html。我现在不是这个Flash播放器或不是,我该怎么办? 解决方案

HTML中的脚本没有得到收听插件中的点击。如果您想通知Flash内嵌的点击,您必须向Flash影片添加代码,以通知点击返回JavaScript。



你使用什么视频播放器?它可能已经提供了这个功能 - 检查它的文档。如果没有,你需要源代码来修改和重新编译。


i use Adobe flash player in my site, and now i need to increment some filed in database, when user click on player. here is the script

<div id="conteiner" style="text-align: center;" ></div>
<script type="text/javascript">
            var s1 = new SWFObject("player.swf","ply","420","380","9","#FFFFFF");
            s1.addParam("allowfullscreen","true");
            s1.addParam("allowscriptaccess","always");
            s1.addParam("flashvars","file=<?=$video ?>");
            s1.write("conteiner");
        </script>

i deside to use ajax for it, but how can i write a function in the flash object? thanks in advance

UPDATE: i only have the swfobject.js file, which contains such data

if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7)
...

and the player.swf, and the html, i've shown allready. i don't now is this flash player or no, and what can i do?

解决方案

Scripts in HTML don't get to listen to clicks in plugins. If you want to be informed of a click in a Flash embed, you will have to add code to the Flash movie to pass notification of the click back up to JavaScript.

What video player are you using? It might already offer this feature — check its docs. If not you'll need the source code to alter and recompile.

这篇关于Flash播放器:使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆