2

現在のプロジェクトでは、SwfObject 2.2 を使用してフラッシュ ファイルを埋め込み、CRD の達人は SwfAddress 2.3 を使用して SEO フラッシュの優れた機能を作成しています。

ページに両方のライブラリが含まれている場合、API ( http://code.google.com/p/swfobject/wiki/api )で SwfObject コールバックを使用しようとすると、SwfObject の読み込みが妨げられます。この例では、SwfAddress ファイルを HTML でコメントアウトするだけで、これを切り替えることができます。

以下のコードでは、これら 2 つのライブラリの絶対 URL を指定できませんでした。

<head>
    <title>SWFObject 2.2 dynamic embed with callback</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <script type="text/javascript" src="swfobject.js"></script>
    <script type="text/javascript" src="swfaddress.js"></script>
    <script type="text/javascript">
    function outputStatus(e) {
        alert("e.success = " + e.success +"\ne.id = "+ e.id +"\ne.ref = "+ e.ref);
    }
    var params = {};
    params.allowscriptaccess = "always";

    swfobject.embedSWF("http://www.bobbyvandersluis.com/swfobject/testsuite_2_2/test6.swf", "myContent1", "300", "120", "9.0.0", "expressInstall.swf", null, null);
    swfobject.embedSWF("http://www.bobbyvandersluis.com/swfobject/testsuite_2_2/test6.swf", "myContent2", "300", "120", "9.0.0", "expressInstall.swf", null, params, null, outputStatus);
    </script>
</head>

<body>
    <div id="myContent1">
        <h1>Alternative content</h1>
        <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
    </div>
    <div id="myContent2">
        <h1>Alternative content</h1>
        <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
    </div>
</body>

何か案は?前もって感謝します!

4

1 に答える 1