【问题标题】:passing flashvars and texting locally在本地传递 flashvars 和发短信
【发布时间】:2012-07-11 04:39:41
【问题描述】:

在本地测试时 flashvars 是否有效?当我使用为 Flash Player 10 保存的文件使用 swfObject V1.5 对其进行测试时,它似乎不起作用。任何人都可以确认这应该在本地工作。

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Screensaver</title>
<script type="text/javascript" src="swfobject.js"></script>
<style type="text/css">

    body {
        background-color: #ffffff;
    }

    #flashcontent {
        width: 100%x;
        height: 100%;
        margin: 0 auto;
    }

</style>
</head>
<body>
<div id="flashcontent">
        <strong>You need to upgrade your Flash Player</strong>
        This is replaced by the Flash content. 
        Place your alternate content here and users without the Flash plugin or with 
        Javascript turned off will see this. Content here allows you to leave out <code>noscript</code> 
        tags. Include a link to <a href="swfobject.html?detectflash=false">bypass the detection</a> if you wish.
    </div>

    <script type="text/javascript">
        var so = new SWFObject("screensaver.swf", "main", "100%", "100%", "10", "#ffffff");
        so.addVariable("rssFeedUrl", "campaign.xml");
        so.write("flashcontent");

    </script>   
</body>
</html>

然后在闪存中我有这个。

var flashVars:Object=LoaderInfo(loaderInfo).parameters;

var rss = flashVars.rssFeedUrl;

【问题讨论】:

  • 好的,不知道问题出在哪里。

标签: flash swfobject


【解决方案1】:

我已经尝试过 SWFObject 2.2(最新版本)并且 html 在本地使用传递的参数没有任何问题。

我想知道您为什么不迁移到最新版本的 SWFObject。在你的情况下,代码看起来像

swfobject.embedSWF(
                "screensaver.swf", "main", 
                "100%", "100%", 
                "10", "", 
                { rssFeedUrl: "compaign.xml" }, {}, {});

【讨论】:

    猜你喜欢
    • 2011-10-13
    • 1970-01-01
    • 2011-01-18
    • 2011-02-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多