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

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

Jun 13, 2016 pm 01:19 PM
quot script swf true

在线文档播放问题:播放器加载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
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What does script mean? What does script mean? Aug 29, 2023 pm 02:00 PM

Script means script or script. In film, television, drama and other art forms, script is used to describe the dialogue, actions and scenes of characters, as well as the development and structure of the story. Script writing requires certain skills and experience, and it should be vivid and powerful, capable of attracting the audience's attention and conveying the emotions and themes of the story. Scripts are particularly important in the film and television industries. They are the basis of creation and determine the storyline, character development and dialogue content of the film. Script is an important tool for artists to create and express themselves.

php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 Jun 13, 2016 am 10:23 AM

php提交表单通过后,弹出的对话框怎样在当前页弹出php提交表单通过后,弹出的对话框怎样在当前页弹出而不是在空白页弹出?想实现这样的效果:而不是空白页弹出:------解决方案--------------------如果你的验证用PHP在后端,那么就用Ajax;仅供参考:HTML code

What file format is swf? What file format is swf? Jul 20, 2022 pm 04:03 PM

SWF is a vector-based Flash animation file format that is widely used in web design, animation production and other fields. SWF files are also often called Flash files. FLASH software is generally used to create and generate SWF file formats, and PDF and other types can also be converted to SWF format through corresponding software; SWF can be opened with Flash Player, and the browser must have the Flash Player plug-in installed. Designers and developers can use it to create presentations, applications, and other content that allows user interaction.

what is script what is script Oct 12, 2023 am 10:04 AM

In the field of computer science, "script" usually refers to a scripting language or script file. A scripting language is an interpreted programming language commonly used for tasks such as automation, batch processing, and rapid prototyping.

How to solve scripterror How to solve scripterror Oct 18, 2023 am 09:44 AM

Solutions to scripterror include checking syntax, file path, checking network connection, browser compatibility, using try-catch statements, using developer tools for debugging, updating browsers and JavaScript libraries, or seeking professional help. Detailed introduction: 1. Check for syntax errors: Script Error may be caused by syntax errors in JavaScript code. Use developer tools to check the code and fix syntax errors. Make sure that the brackets, quotation marks, semicolons, etc. in the code are correct. etc.

Steps to convert SWF files to MP4 format Steps to convert SWF files to MP4 format Jan 04, 2024 pm 02:20 PM

Many friends have downloaded files in swf format, but cannot open them and need to convert them to mp4 format files. Today I will teach you how to use Format Factory to convert to mp4 format, which is very convenient and fast. Let’s take a look at the specific tutorial below. Method to convert swf format to MP4 format 1. First download the video converter, 2. After downloading and installing, enter the software, select "Video Conversion" on the left and click "Add File", 2. Then select "Output" in "Output Format" Format" and "Output Quality", 3. Then click the "Convert" function on the right. It is recommended to use "Extreme Speed ​​Mode", which can increase the speed by 30%. 4. After the video is converted, you can click "Open Folder" on the right to jump Transfer to the corresponding folder.

Detailed explanation of the meaning of true in PHP functions Detailed explanation of the meaning of true in PHP functions Mar 16, 2024 am 08:57 AM

Detailed explanation of the meaning of true in PHP function In PHP, true is a Boolean value, representing the state of &quot;true&quot; or &quot;yes&quot;. Using true in a function is usually used to express that a condition is true or to return a success status. This article will explain in detail the meaning of true in PHP functions from different perspectives, and give specific code examples. 1. Conditional judgment when true is returned: In PHP functions, true is usually used in conditional judgment to indicate that the condition is true. For example: functioni

What does true mean in PHP function? What does true mean in PHP function? Mar 16, 2024 pm 12:12 PM

Title: What does true mean in PHP functions? In PHP programming, true represents true in a Boolean value, usually indicating the state of &quot;true&quot;. When true is used in a function, it is usually used to determine whether a condition is true or to perform some operation. The following will use specific code examples to illustrate what true means in PHP functions. example:

See all articles