Life is Adventure!

Flash Video | Home | window.prompt

FLV Playerの埋め込み

フラッシュビデオを埋め込むスクリプト Embedding Flash
<div id="flvplayer"></div>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
      var s1 = new SWFObject("mediaplayer.swf","mediaplayer","420","315","7");
	s1.addParam("allowfullscreen","true");
	s1.addVariable("width","420");
	s1.addVariable("height","315");
	s1.addVariable("file","sample2.flv");
	s1.addVariable("image","sample2.jpg");
	s1.write("flvplayer");
</script>

SWF Player: swfファイルを埋め込み再生するときは、下記のスクリプトを使う。
 Start Stop  SWFObject
<div id="swfplayer"></div>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
   var so = new SWFObject("flower.swf", "mymovie", "420", "280", "8", "#336699");
   so.write("swfplayer");
</script>

Allowing cross-domain data loading

The following example shows a policy file that permits access to Flash documents that originate from foo.com, www.friendOfFoo.com, *.foo.com, and 105.216.0.40, from a Flash document on foo.com:

<?xml version="1.0"?>
<!-- http://www.foo.com/crossdomain.xml -->
<cross-domain-policy>
  <allow-access-from domain="www.friendOfFoo.com" />
  <allow-access-from domain="*.foo.com" />
  <allow-access-from domain="105.216.0.40" />
</cross-domain-policy>

You can also permit access to documents originating from any domain, as shown in the following example:

<?xml version="1.0"?>
<!-- http://www.foo.com/crossdomain.xml -->
<cross-domain-policy>
  <allow-access-from domain="*" />
</cross-domain-policy>
今日の言葉: 

コメントを投稿


counter