flash player: usage

北城以北 提交于 2019-12-24 18:24:13

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/2639966/flash-player-usage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!