PHP & JavaScript Room :: 設置サンプル

実行結果

flashembed - Adobe Flash embedding | 設置サンプル

例1:基本的なFlashの埋め込み

例2:複数のFlashオブジェクトを埋め込み

例3:マウスでクリックするとFlashを読み込む

クリックすると再生されます。

例4:Flashオブジェクト上にHTML要素をオーバーレイ表示

This layer is on top of the Flash object

例5:古いFlashのバージョンの取り扱い

Flash Playerのバージョンが指定したバージョンより古い場合に、
最新版のFlashをダウンロード案内を表示します。

Flash Playerの入手

最新版のFlash Playerをインストールしてください。 ダウンロードはこちら

設置サンプルのソース

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <meta http-equiv="Content-Language" content="ja" />
      <meta http-equiv="Content-Script-Type" content="text/javascript" />
      <meta http-equiv="Content-Style-Type" content="text/css" />
      <meta http-equiv="imagetoolbar" content="no" />
      <title>jQuery + Adobe Flash integration plugin | 設置サンプル</title>
      <link rel="stylesheet" type="text/css" href="/content/lib/global.css" />
      <!-- JS -->
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
      <script type="text/javascript" src="/content/lib/jquery/flashembed-1.0.1.js"></script> 
      <script type="text/javascript">
         $(function(){
            /* 例1 */
            flashembed("clock", "/content/media/flash/mv016a.swf");
            /* 例2 */
            $("div.clock").flashembed("/content/media/flash/mv016a.swf");
            /* 例3 */
             $("#flash").click(function(){ 
                 flashembed(this, "/content/media/flash/mv016a.swf");
             });
            /* 例5 */
            flashembed("version_chk", {src: "/content/media/flash/mv016a.swf", version: [20, 0]});  
         }); 
         /* 例4 */
         flashembed.domReady(function() {
            // wmode parameter does the trick
            flashembed("place", {src: "/content/media/flash/mv016a.swf", wmode: 'opaque'});
         });
      </script>
      <style type="text/css">
         /* 例1 */
         #clock { width:320px; height:110px; border:1px solid #000; }
         /* 例2 */
         .clock { width:110px; height:110px; float:left; border:1px solid #000; margin-right:10px; }
         /* 例3 */
         #flash { width:320px; height:110px; border:1px solid #000; background-color:#fff; line-height:110px; font-weight:bold; text-align:center; }
         /* 例4 */
         #layer { width:100px; position:absolute; background-color:#ff6699; margin:10px; padding:10px; color:#fff; }
         #place { border:1px solid #000; width:320px;  height:110px; }
         /* 例5 */
         #version_chk { width:400px; border:1px outset #ccc; background-color:#efefef; padding:10px; }
         #version_chk img { float:left; margin-right:10px; }
         #version_chk h3 { margin-top:0px; }
      </style>
   <link rel="stylesheet" type="text/css" href="/common/css/example.css"></head>
   <body id='example3' class='example'><div class="ads" style="margin:32px auto;text-align:center;"></div><h1 class='h'><a href='/'>PHP &amp; JavaScript Room</a> :: 設置サンプル</h1>
<h3 class='h'>実行結果</h3>
      <div id="wrap">
         <h1><a href='http://flowplayer.org/tools/flashembed.html'>flashembed - Adobe Flash embedding</a> | 設置サンプル</h1>
<!-- CODE -->
         <h2>例1:基本的なFlashの埋め込み</h2>
         <div id="clock"></div>

         <h2>例2:複数のFlashオブジェクトを埋め込み</h2>
         <div class="cf">
            <div class="clock"></div>
            <div class="clock"></div>
            <div class="clock"></div>
         </div>

         <h2>例3:マウスでクリックするとFlashを読み込む</h2>
         <div id="flash">
             クリックすると再生されます。
         </div>

         <h2>例4:Flashオブジェクト上にHTML要素をオーバーレイ表示</h2>
         <div id="layer">This layer is on top of the Flash object</div>
         <div id="place"></div>

         <h2>例5:古いFlashのバージョンの取り扱い</h2>
         <p>Flash Playerのバージョンが指定したバージョンより古い場合に、<br>最新版のFlashをダウンロード案内を表示します。</p>
         <div id="version_chk" class="cf"> 
             <img src="/content/img/flashplayer_100x100.jpg" /> 
             <h3>Flash Playerの入手</h3> 
             <p> 
                 最新版のFlash Playerをインストールしてください。
                 <a href="http://get.adobe.com/flashplayer/">ダウンロードはこちら</a>
             </p> 
         </div>
<!-- / CODE -->
      </div>
   </body>
</html>