Home > Backend Development > PHP Tutorial > 在线文档播放有关问题:播放器加载flash失败

在线文档播放有关问题:播放器加载flash失败

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 10:43:20
Original
971 people have browsed it

在线文档播放问题:播放器加载flash失败
在网上找了phpcms百度文库插件(源程序就是phpcms的),照着做了下,转换都成功了,就是在显示的时候转换好的flash老是加载不出来(播放器正常加载),求解。
转换所用工具:OpenOffice3.0、Windows Resource Kit Tools和swftools。
先上显示页面代码:

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> {loop $docurl $r}<script type="text/javascript" src="/viewer/history/history.js"></script><script type="text/javascript" src="/viewer/swfobject.js"></script><script type="text/javascript">            var flashvars = {            SwfFile : escape("{$r[filename]}"),                  Scale : 0.6,                   ZoomTransition : "easeOut",                  ZoomTime : 0.5,                    ZoomInterval : 0.1,                    FitPageOnLoad : false,                    FitWidthOnLoad : true,                    PrintEnabled : true,                    FullScreenAsMaxWindow : false,                    ProgressiveLoading : true,                    PrintToolsVisible : true,                    ViewModeToolsVisible : true,                    ZoomToolsVisible : true,                    FullScreenVisible : true,                    NavToolsVisible : true,                    CursorToolsVisible : true,                    SearchToolsVisible : true                  };            var params = {};            var attributes = {};            params.quality = "high";            params.bgcolor = "#ffffff";            params.allowscriptaccess = "sameDomain";            params.allowfullscreen = "true";            attributes.id = "wenkuplays";            attributes.name = "wenkuplays";            swfobject.embedSWF("{APP_PATH}viewer/wenkuplays.swf","flashContent","700","550", "10.0.0","{APP_PATH}viewer/playerProductInstall.swf",flashvars,params,attributes);            swfobject.createCSS("#flashContent", "display:block;text-align:left;");        </script> <div id="flashContent"> <p>  本文档播放器要确保Adobe Flash Player版本10.0.0或更高版本。</p> <script type="text/javascript">     var pageHost = ((document.location.protocol == "https:") ? "https://" :    "http://");     document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"+ pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' />" ); </script> </div>{/loop}
Copy after login

网上找了一圈,有人说是下边这行错了,
PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->SwfFile : escape("{$r[filename]}"),
Copy after login

应该改为:
PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->SwfFile : decodeURI("{$r[filename]}"),
Copy after login

但我改完后还是加载不了swf,
还有说是swf文件名含中文或者是swf文件被放在文件夹下了,于是我在根目录下放了一个转换好的swf文件,并把上段代码改为:
PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->SwfFile : decodeURI("a.swf"),
Copy after login


PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->SwfFile : decodeURI("/a.swf"),
Copy after login


PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->SwfFile : decodeURI("{APP_PATH}/a.swf"),
Copy after login


PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->SwfFile : decodeURI("{APP_PATH}a.swf"),
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template