Do everything with so much love in your heart that you would never want to do it any other way. - Brahma Kumaris

— SWFObjectに対応したFlashCS3パブリッシュ用テンプレート

Posted: Mar 28, 2008, 4:17 pm | Author: cyberryo | Category: Dialy | Tags: ,

noimage.jpg
いちいち書き直すのが面倒なのでこちら[5ive.blogさん]を参考にFlashCS3でHTMLごとパブリッシュするときのテンプレートを作ってみました。
これやっておくと、とても便利ですね。

自分が使いやすい感じのカスタマイズなので、実際にサイトとして使用するには色々と変更が必要だったり。。。
SWFObjectでswfを埋め込んで、さらにフルスクリーンに対応するテンプレートです。
FlashCS3への反映方法はこちら[5ive.blogさん]に詳しく記載されています。

$TTFlash SWFObject
$DXDefaultDetection.html
$DS
SWFObject用に更新されたHTMLファイルでAdobeFlashムービーを表示します。メモ:swfobject.jsファイルは出力されないので、HTMLと一緒に手動でアップロードする必要があります。
$DF

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
$CS
<title>$TI</title>
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript" src="js/swfmacmousewheel2.js"></script>
<script type="text/javascript">
	var vars = {};
	var params = { scale:'noScale', salign:'lt', menu:'false',allowfullscreen :'true' };
	var attributes = { id:'$TIflash', name:'$TIflash' };
	swfobject.embedSWF("$TI.swf", "flashContent", "$WI", "$HE", "$FV.$JR.$NR", "js/expressInstall.swf", vars, params, attributes );
	swfmacmousewheel.registerObject(attributes.id);
</script>
<style type="text/css">
/* hide from ie on mac \*/
html {
	height: 100%;
	overflow: hidden;
}

#flashContent {
	height: 100%;
}
/* end hide */

body {
	height: 100%;
	margin: 0;
	padding: 0;
	background-color: $BG;
}
</style>
</head>
<body>
	<div id="flashContent">
		<a href="http://www.macromedia.com/go/getflashplayer" target="_blank"><img src="img/noflash.jpg" alt="You need to upgrade your Adobe Flash Player!" width="100%" height="100%" hspace="0" vspace="0" border="0"/></a>
	</div>
</body>
</html>

Facebook Comments