我在linux上安装了gnash swf viewer,但是gnash swf viewer不能播放swf文件?右键点击打开时没有用!

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了我在linux上安装了gnash swf viewer,但是gnash swf viewer不能播放swf文件?右键点击打开时没有用!相关的知识,希望对你有一定的参考价值。

并且电影播放机播放MP4文件没声音?这是怎么回事?我新手,帮忙解答下,感激不尽!

gnash是开源的flash插件,但是还不成熟。建议使用开源播放器vlc或者smplayer,都是非常强大的视频播放器 参考技术A 如果电脑别的也发不出声音,估计是声卡坏了,如果不是,那我也不太清楚。

ActionScript 3 如何在网站上安装swf

About how to install swf files in your website,here have some method for you to choose.

Method 1:

Add js code in <head> ... </head>:

<script type="text/javascript" src="swfobject/swfobject.js"></script>

Add div code for load swf file in <body> ... <body>:

<div id="preview_div">
                <script type="text/javascript">
                    <!--
                    var flashvars = {                    
                };
            var params = {
                    scale: "noscale",
                    menu: "false",
                    bgcolor: "#000000"
                };                  
                    var attributes = {
                    id: "preview_swf",
                                name: "preview_swf"
                };          
                    swfobject.embedSWF("preview.swf", "preview_div", "590", "300", "9", "swfobject/expressInstall.swf", flashvars, params, attributes);
                    //-->
                </script>
        </div>

If you use the method,you need notice the xml file path.For example:

index.html -> xmlbaner.swf
            the swf files and the xml must the same path like load index path.
service path files like
            root/ index.html
            root/ xmlbanner.swf
            root/ data.xml
            root/ image/...

Method 2:

<div id="preview_div">
                    <iframe src="preview.swf " width="590" height="300" scrolling="no" frameborder="0" style="float:left; width:590px;">
iframe>
 </div>

If you need the method,you don't worry the xml files path.

Method 3:

Add js code in <head> ... </head>:

<script src="js/AC_RunActiveContent.js" language="javascript"></script>

Add div code for load swf file in <body> ... <body>:

<div id="preview_swf">
                   <script language="javascript">
                        if (AC_FL_RunContent == 0) {
                            alert("This page requires AC_RunActiveContent.js.");
                        } else {
                            AC_FL_RunContent(
                            'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
                            'width', '590',
                            'height', '300',
                            'src', 'preview',
                            'quality', 'best',
                            'pluginspage', 'http://get.adobe.com/flashplayer/',
                            'align', 'middle',
                            'play', 'true',
                            'loop', 'true',
                            'scale', 'showall',
                            'wmode', 'window',
                            'devicefont', 'false',
                            'id', 'preview',
                            'bgcolor', '#000000',
                            'name', 'preview',
                            'menu', 'true',
                            'allowFullScreen', 'false',
                            'allowScriptAccess','sameDomain',
                            'movie', 'preview',
                            'salign', ''
                            ); //end AC code
                    }
                </script>
                <noscript>
                    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553541111" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="590" height="300" id="preview" align="middle">
                    <param name="allowScriptAccess" value="sameDomain" />
                    <param name="allowFullScreen" value="false" />
                    <param name="movie" value="preview.swf" />
                    <param name="quality" value="high" />
                    <param name="bgcolor" value="#000000" />   
                    <embed src="preview.swf" quality="high" bgcolor="#000000" width="590" height="300" name="preview" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://get.adobe.com/flashplayer/" />
                    </object>
                </noscript>
        </div>

If you use the method,you need notice the xml file path.For example:

index.html -> xmlbaner.swf
            the swf files and the xml must the same path like load index path.
service path files like
            root/ index.html
            root/ xmlbanner.swf
            root/ data.xml
            root/ image/...
From: http://activetofocus.com/blog/how-to-install-swf-in-website-28/

以上是关于我在linux上安装了gnash swf viewer,但是gnash swf viewer不能播放swf文件?右键点击打开时没有用!的主要内容,如果未能解决你的问题,请参考以下文章

在flash文件中调用shell命令

linux下如何看swf文件

linux下怎么观看本机里面的swf文件

我现在在用linux操作系统,怎么打开swf格式的文件啊?安装了mplayer播放器也是没发播放,问下大家啥播放

如何在Linux 上播放本地SWF Flash文件

在android中加载swf文件的问题