<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
    <title type="text">ants Lab.</title>
    <link rel="alternate" type="text/html" href="http://labs.anthill.jp/" />
    
   <id>tag:labs.anthill.jp,2010://10</id>
    <link rel="service.post" type="application/atom+xml" href="http://www.anthill.jp/mt/mt-atom.cgi/weblog/blog_id=10" title="ants Lab." />
    <updated>2009-10-19T02:44:31Z</updated>
    <subtitle type="html">株式会社antsのエンジニア達が配信する技術ブログ。最新の技術情報やノウハウなどを不定期に掲載しています。</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type  3.33-ja</generator>
 
<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/AntsLab" /><feedburner:info uri="antslab" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
    <title>SWF情報表示ツール 64bit化</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AntsLab/~3/iNW_vhffU2Y/swf_64bit.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.anthill.jp/mt/mt-atom.cgi/weblog/blog_id=10/entry_id=578" title="SWF情報表示ツール 64bit化" />
    <id>tag:labs.anthill.jp,2009://10.578</id>
    
    <published>2009-10-19T02:31:58Z</published>
    <updated>2009-10-19T02:44:31Z</updated>
    
    <summary>Windows7の発売を前にした今日この頃ですが、64bitでWindowsを使...</summary>
    <author>
        <name>ohura</name>
        
    </author>
            <category term="Flash" />
    
    <content type="html" xml:lang="ja" xml:base="http://labs.anthill.jp/">
        <![CDATA[Windows7の発売を前にした今日この頃ですが、64bitでWindowsを使用されている方も<br/>
増えたのではないでしょうか。<br/>
エクスプローラーの機能をシェル拡張という機能は、dllを使って実現されているので、<br/>
64bitのエクスプローラーからは32bitのシェル拡張は使えません。<br/>
<br/>
細々と、更新しているSWF情報表示ツールにかんしても、<br/>
64bit Windowsでは使えなかったわけですがこの度64bit Windowsに対応しました。<br/>
SWF情報表示ツールについて、<a href="http://labs.anthill.jp/2007/12/swf_1.html">過去のエントリー</a>をご覧ください<br/>
<br/>]]>
        <![CDATA[<p>
<code>利用許諾に了解いただいた上で、このファイルをダウンロードしてインストールしてください。<br /><br />
</code>
利用許諾
<code><br />* 本ソフトウェアの作成には細心の注意を払っておりますが、インストールはご自身の判断で行ってください。<br />
* 本ソフトウェアの使用、またはそれを使用できなかったことにより生じた派生的、付随的または間接的損害（営業上の利益の損失、業務の中断、営業情報の喪失などによる損害を含む）については、たとえそのような損害の発生や第三者からの賠償請求の可能性があることについて予め知らされた場合でも、一切責任を負いません。また、本ソフトウェアに不備があっても訂正する義務を負わないものとします。</code>
</blockquote><br />
</p>

<a href="http://labs.anthill.jp/bin/SwfInfoShex64_1.1_setup.exe" target="_blank">SWF情報表示ツール1.1 64bit Windows用</a><br />
<a href="http://labs.anthill.jp/bin/SwfInfoShex1.1_setup.exe" target="_blank">SWF情報表示ツール1.1 32bit Windows用</a><br />
]]>
    </content>
<feedburner:origLink>http://labs.anthill.jp/2009/10/swf_64bit.html</feedburner:origLink></entry>
<entry>
    <title>GIZMO CARDのパラメーター機能とケータイ連携機能の紹介</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AntsLab/~3/NGpwjz_JIJQ/gizmo_card_1.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.anthill.jp/mt/mt-atom.cgi/weblog/blog_id=10/entry_id=555" title="GIZMO CARDのパラメーター機能とケータイ連携機能の紹介" />
    <id>tag:labs.anthill.jp,2009://10.555</id>
    
    <published>2009-06-26T03:11:43Z</published>
    <updated>2009-06-30T08:51:38Z</updated>
    
    <summary>こんにちは、はっちーです。 以前、紹介した「GACHAPIN x MUKKUチャ...</summary>
    <author>
        <name>はっちー</name>
        
    </author>
            <category term="GIZMO" />
    
    <content type="html" xml:lang="ja" xml:base="http://labs.anthill.jp/">
        <![CDATA[こんにちは、はっちーです。

<br />
以前、紹介した「GACHAPIN x MUKKUチャンネル 」の配信期限が切れてしまったので、
GIZMO CARDでシュート先にパラメーター渡す機能について、改めて紹介させていただきます。
<br />
今回は作り方についてと、ケータイ連携機能についても紹介したいと思います。

<br />
まずは、以下の俳句ジェネレーターを触ってみてください。
作った俳句をデスクトップに飾ったり、ブログに貼り付けたり、ケータイの待ち受けにしたりできます。
<div align="center">
<script language="javascript" type="text/javascript" src="http://content.badge.anthill.jp/common/badge.js"></script><script language="javascript" type="text/javascript">renderBadge2("9.0.115","FFFFFF","A80000000001","49b9c09c221441f1928d6898d2fbff7d","77fec91772e29a92c267237b080fbc822ee9","","5","window","");</script>
</div>

作り方についは以下から。
]]>
        <![CDATA[このジェネレーターの仕組みは、シュート先の埋め込みタグにパラメーターを埋め込むことで実現しています。
GIZMO CARDでは、シュート先にパラメーターを渡す機能をAPIで提供しています。
以下のようにスクリプトを記述することで、シュート先にパラメーターを渡すことができます。

<textarea name="code" class="as3">
import jp.anthill.badge.extension.Badge;

var textField:TextField = new TextField();
addChild(textField);

//1) Badgeクラスの初期化
var badge:Badge = new Badge(this);

if (!badge.parameters.p)//2) パラメーターが設定されていない
{
	//3) シュート先にパラメーターを設定
	var object:Object = {p : "1"};
	badge.parameters = object;//ＰＣ向け
	badge.mobileParameters = object;//ケータイ向け
	
	//4) ルートとしての処理
	textField.text = "ルートです。シュートしてください。";
}
else//5) パラメーターが設定されている
{
	//6) シュート先での処理
	textField.text = "シュート先です。";
}
</textarea>

<ol>
<li>7行目：APIを使うためにBadgeオブジェクトを生成します。第1引数にドキュメントクラスのインスタンスを渡してください。</li>
<li>9行目：パラメーターが設定されていないのでif文に入ります。1回もシュートされていない最も親「ルート」であることを示します。
<li>12行目：シュート先用にパラメーターを設定します。シュート先がPC向けとケータイ向けで別のAPIになります。ケータイ向けについての詳細は後述します。</li>
<li>17行目：シュートを促し、シュートを行ってもらいます。ルートの処理はここで終了です。</li>
<li>19行目：シュート先では、パラメーターが存在するのでelse文に入ります。</li>
<li>22行目：シュート先の処理を行います。</li>
</ol>

GIZMO CARDのパラメーター機能を使うと、埋め込みタグやJavaScriptを意識することなくシュート先とシュート元でパラメーターの受け渡しができます。
<br /><br />

GZIMO CARDのケータイとの連携機能についても紹介します。<br />
CARD化したコンテンツは、ケータイにコンテンツを展開するために、
ケータイ向けコンテンツのURLのQRコードを表示することができます。
URLは、あらかじめCARD作成サイトで設定します。
Webページなどからケータイにコンテンツを持ち帰るような演出をすることができます。

ケータイへのシュートの場合もパラメーターを渡すことができます。
ケータイの場合のパラメーターは、URLパラメーターとして付加されます。
イメージは、以下のような感じです。
<br />
<img src="http://labs.anthill.jp/cardParameter/fig001v.png" alt="ケータイのパラメーター機能の動作イメージ">
<br />
注意点は、Flash Lite 1.xでは、URLパラメーターを受け取ることができないので、パラメーターを利用する場合は、Webアプリを使って動的にSWFを生成する(変数を埋め込む)必要があります。
Flash Lite 1.xでパラメーターを使う方法については、<a href="http://www.google.co.jp/search?source=ig&hl=ja&rlz=&=&q=flash+lite+parameter&btnG=Google+%E6%A4%9C%E7%B4%A2&meta=lr%3D&aq=f&oq=" target="_blank">検索する</a>
とサンプルを提供している方がいるので参考にしてみるとよいと思います。
また、QRコードを出す都合で、URLの長さには限りがあります。URLパラメーターは、なるべく短くなるようにする必要があります。


<br /><br />
今回紹介したパラメーター機能、ケータイ連携機能を使ったCARDは、誰でも無料で試せるので、みなさんも試してみてください。

<br /><br />
※CARDの作り方については<a href="http://gizmo.anthill.jp/tutorial_card/index.html" target="_blank">こちら</a>のチュートリアルをご覧ください。
<br />


<script type="text/javascript" src="/scripts/SyntaxHighlighter/shCore.js"></script><script type="text/javascript" src="/scripts/SyntaxHighlighter/shBrushAS3.js"></script><script type="text/javascript">dp.SyntaxHighlighter.ClipboardSwf = '/scripts/SyntaxHighlighter/flash/clipboard.swf';dp.SyntaxHighlighter.HighlightAll('code');</script>
]]>
    </content>
<feedburner:origLink>http://labs.anthill.jp/2009/06/gizmo_card_1.html</feedburner:origLink></entry>
<entry>
    <title>FlaProfiler 0.2をリリースしました</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AntsLab/~3/1_PdDRHKy2k/flaprofiler_02.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.anthill.jp/mt/mt-atom.cgi/weblog/blog_id=10/entry_id=508" title="FlaProfiler 0.2をリリースしました" />
    <id>tag:labs.anthill.jp,2009://10.508</id>
    
    <published>2009-03-11T03:31:41Z</published>
    <updated>2009-03-11T06:18:47Z</updated>
    
    <summary>こんにちはohuraです。 久しぶりにいじってFlaProfilerを0.2にし...</summary>
    <author>
        <name>ohura</name>
        
    </author>
            <category term="Flash" />
    
    <content type="html" xml:lang="ja" xml:base="http://labs.anthill.jp/">
        <![CDATA[こんにちはohuraです。
久しぶりにいじってFlaProfilerを0.2にしました。
といってもそれほど変わってないですが、使っていただけるようになったかもしれないです。

<div>
<h4>今回の変更点</h4>
<ul>
<li>localTrustedの設定、PreloadSwfの設定を起動時に自動で行うように変更</li>
<li>MacOSXで動くように調整</li>
</ul>
<img src="http://labs.anthill.jp/2009/03/FlaProfiler_mac.png">
</div>
<br />

<div>
<h4>使い方</h4>
<ol>
<li>Flash Player デバッグ版 9.0.115.0以上をインストールします</li>
<li>FlaProfilerをダウンロードして、展開します</li>
<li>winの場合はprofileViewer.exe macの場合はprofileViewer.appを起動します</li>
<li>後は確認したいSWFを開きます。同時に１つしか対応できてないですけど。</li>
</ol>
</div>
<br />

<div>
とりあえず、見た目上は動くようになったわけですが、
次は複数のswfが起動しても使えるようにすることですかねえ。
それではまた。
</div>
<br />

<div>
<h4>ダウンロード</h4>
<ul>
<li>ソースコード（subversionのリポジトリです）
<ul><li>http://www.libspark.org/svn/as3/FlaProfiler/trunk/</li></ul></li>

<li>バイナリ（ウインドウズ用のバイナリ）
<ul><li> <a href="http://labs.anthill.jp/FlaProfiler/FlaProfiler-0.2-win.zip">http://labs.anthill.jp/FlaProfiler/FlaProfiler-0.2-win.zip</a></li></ul></li>

<li>バイナリ（MacOSX用のバイナリ）
<ul><li> <a href="http://labs.anthill.jp/FlaProfiler/FlaProfiler-0.2-mac.zip">http://labs.anthill.jp/FlaProfiler/FlaProfiler-0.2-mac.zip</a></li></ul></li>

</ul>
</div>
]]>
        
    </content>
<feedburner:origLink>http://labs.anthill.jp/2009/03/flaprofiler_02.html</feedburner:origLink></entry>
<entry>
    <title>FLASHer向けプロファイラはじめてみました</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AntsLab/~3/Z-DTnl8mN_0/flash.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.anthill.jp/mt/mt-atom.cgi/weblog/blog_id=10/entry_id=506" title="FLASHer向けプロファイラはじめてみました" />
    <id>tag:labs.anthill.jp,2009://10.506</id>
    
    <published>2009-02-26T01:15:37Z</published>
    <updated>2009-02-26T01:28:56Z</updated>
    
    <summary>こんにちはohuraです。 antsにはFLASHerはたくさんいますが、Fle...</summary>
    <author>
        <name>ohura</name>
        
    </author>
            <category term="Flash" />
    
    <content type="html" xml:lang="ja" xml:base="http://labs.anthill.jp/">
        <![CDATA[こんにちはohuraです。
antsにはFLASHerはたくさんいますが、Flex Builder使いはほとんどいません。
私もFlex Builderを試用したことしかないのですが
メモリリークの検証などでは、プロファイラーが使えていいなあと思ってました。
Flex Builderを買うのでもいいですが、プロファイラーの仕組みにも興味があったので、作ってみることにしました。

<img src="/2009/02/profile_viewer.png">

まだまだ、作り始めたばっかりで普通に使ってもらえる様にはなってませんが、
readmeを丹念に読めば使えるかもしれません。

ソースはSpark projectさんに置かせていただいてます。
ライセンスはMITライセンスです。

結果を表示する部分はPythonで開発したので、Macでも動くと思いますが、
いまのところWindowsでしか動かしてみてません。
近々動かしてみようと思います。

それではまた。

<ul>
<li>ソースコード（subversionのリポジトリです）
<ul><li>http://www.libspark.org/svn/as3/FlaProfiler/trunk/</li></ul></li>

<li>バイナリ（ウインドウズ用のバイナリ）
<ul><li> <a href="http://labs.anthill.jp/FlaProfiler/FlaProfiler-0.1-win.zip">http://labs.anthill.jp/FlaProfiler/FlaProfiler-0.1-win.zip</a></li></ul></li>

</ul>]]>
        
    </content>
<feedburner:origLink>http://labs.anthill.jp/2009/02/flash.html</feedburner:origLink></entry>
<entry>
    <title>エラー処理</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AntsLab/~3/G4_W5ULU3dY/post_5.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.anthill.jp/mt/mt-atom.cgi/weblog/blog_id=10/entry_id=497" title="エラー処理" />
    <id>tag:labs.anthill.jp,2009://10.497</id>
    
    <published>2009-02-23T02:19:16Z</published>
    <updated>2009-02-23T06:10:04Z</updated>
    
    <summary>外部委託したAS3コンテンツを受け取った際、結構ランタイムエラーが出てたりするこ...</summary>
    <author>
        <name>タナカヤスヒロ</name>
        
    </author>
            <category term="Flash" />
    
    <content type="html" xml:lang="ja" xml:base="http://labs.anthill.jp/">
        <![CDATA[外部委託したAS3コンテンツを受け取った際、結構ランタイムエラーが出てたりすることがあります。どうやらAS2と同じような流儀で作っていて、デバッグプレーヤも使ってないところがあるようです。
AS2だと良い意味でも悪い意味でもエラーが無視されるので、それでプログラミングを覚えてしまった場合は仕方ない面もありますが... 決してAS2ではエラー処理が要らなかったわけでもなく、AS3に移行するにあたってその辺を改めて啓蒙している場面もあんまり見ない気がします。

まあとりあえずは<a href="http://www.adobe.com/support/flashplayer/downloads.html">ここ</a>からデバッグプレーヤを入れてもらって、どんな状況でもランタイムエラーが出ない仕上がりにもっていく必要があります。よくあるエラーはアクセスしようとしたオブジェクトがnullだったというパターン。あとは、外部ファイルの読み込み時にエラーイベントをまったく受け取っていないソースなんかもちらほら見かけます。適宜値のチェックをしたり例外処理を入れたりして堅牢な設計をするクセをつけるのが吉です。]]>
        
    </content>
<feedburner:origLink>http://labs.anthill.jp/2009/02/post_5.html</feedburner:origLink></entry>
<entry>
    <title>httpsアクセスができない!?</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AntsLab/~3/-QJwiI6AcHc/https.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.anthill.jp/mt/mt-atom.cgi/weblog/blog_id=10/entry_id=489" title="httpsアクセスができない!?" />
    <id>tag:labs.anthill.jp,2009://10.489</id>
    
    <published>2009-02-10T07:07:23Z</published>
    <updated>2009-02-10T07:10:38Z</updated>
    
    <summary>SWFでhttpsアクセスする場合にioErrorが発生する問題をご存知でしょうか？これ、知らずにハマると大変です。</summary>
    <author>
        <name>T768</name>
        <uri>t768</uri>
    </author>
            <category term="Flash" />
    
    <content type="html" xml:lang="ja" xml:base="http://labs.anthill.jp/">
        <![CDATA[ども、T768です。<br />
SWFでhttpsアクセスする場合にioErrorが発生する問題をご存知でしょうか？これ、知らずにハマると大変です。<br />
というわけで、原因と対策について、例によってヌルくご紹介したいと思います。<br /><br />]]>
        <![CDATA[<div class="section">
<h3>事の次第</h3>
さて、なにをしようとしたときにどうなってしまう問題なのか。<br />
簡単にいうと、<strong>https://～ にアクセスして、結果を受け取りたいのだが、ioError になってしまう。</strong>というものです。<br />
現象は Internet Explorer （ActiveX コントロール）と https アクセスのセットのときにだけ起こります。<br />
調べたところ、どうやらInternet Explorer がポイントっぽいです。<br />
<blockquote>参照：<br />
<a href="http://support.microsoft.com/kb/323308/ja">SSL でのファイルの Internet Explorer のダウンロードは、キャッシュ コントロール ヘッダーで動作しません。</a><br />
<a href="http://support.microsoft.com/kb/234067/ja">[HOWTO] Internet Explorer でキャッシュを無効にする</a></blockquote>
さらに調べていくと・・・ちょっと困ったことがわかりました。
<blockquote>参照：<br /><a href="http://d.hatena.ne.jp/Uki/20070627/1182892570">前向きな技術者になるためのブログ [Flex] httpsでアクセスできない その３</a>
</blockquote>
Internet Explorer （ActiveX コントロール）と https アクセスのセットのときに、サーバからの応答のヘッダーに <strong>Pragma: no-cache</strong> が含まれているとアウトということです。<br />
ちなみに、われらが GIZMO では SWF をガジェットとして表示するのに ActiveX コントロールを使っています。つまり、この話にガッツリと該当してしまいます。
</div>
<div class="section">
<h3>さてどうしたものか・・・</h3>
サーバの応答が・・・とか言われると、残念ながら ActionScript 側ではどうしようもないので、そこは開き直って、サーバ側に手を入れていただくしかありません！<br />
応答に <strong>Pragma: no-cache</strong> が含まれていなければいいので、 <strong>Pragma: </strong> とかに適当に書き換えてもらえばOKなのです。<br />
<br />
では、よろしくお願いします （はい、自分ではしません、サーバ担当の方よろしくお願いします）。<br />
</div>
<div class="section">
<h4>オマケ</h4>
逆に <strong>Pragma: no-cache</strong> をつけてキャッシュ対策をしよう！というやり方もあるようです。これまた Internet Explorer では思い通りにならないようですけど。
<blockquote>参照：<br />
<a href="http://www.jinten.net/blog/archives/15">Jinten Blog [AS3]外部データをロード。そしてキャッシュしない(1)</a>
</blockquote>
</div>]]>
    </content>
<feedburner:origLink>http://labs.anthill.jp/2009/02/https.html</feedburner:origLink></entry>
<entry>
    <title>AS3のVideo.clear()が効かない!?</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AntsLab/~3/qz8v1YcwL0Q/videoclear.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.anthill.jp/mt/mt-atom.cgi/weblog/blog_id=10/entry_id=490" title="AS3のVideo.clear()が効かない!?" />
    <id>tag:labs.anthill.jp,2009://10.490</id>
    
    <published>2009-02-10T06:55:36Z</published>
    <updated>2009-02-10T07:28:55Z</updated>
    
    <summary>FLV の再生完了後は Video.clear() で画面をキレイにしたいのが人...</summary>
    <author>
        <name>タナカヤスヒロ</name>
        
    </author>
            <category term="Flash" />
    
    <content type="html" xml:lang="ja" xml:base="http://labs.anthill.jp/">
        <![CDATA[FLV の再生完了後は Video.clear() で画面をキレイにしたいのが人情ですが、どうも AS3 になってから clear() が効いてない気がしていました。

そのまま放置してましたが、機会があって調べたところやはり Flash Player のバグのようで、Video.smoothing が true の場合に起こる不具合でした（左上の1ピクセルだけ効くらしい）。ならば clear() の前に smoothing を false にしてやるぜと思うところですが、そう簡単には回避させてくれません。どうしても対処したいなら、都度ビデオの削除や初期化をしないとダメっぽい。試してないけど。

バグ自体は 2008 年のアタマに Adobe のバグシステムに登録されてますが、未だに直っていないとは何ということでしょう。まあ自分もそうだったし、気になるけどまあいいか的な状況なのかな。

<a href="https://bugs.adobe.com/jira/browse/FP-178" target="_blank">The clear() method of flash.media.Video only clears a single pixel in the top-left corner when smoothing is enabled.</a>]]>
        
    </content>
<feedburner:origLink>http://labs.anthill.jp/2009/02/videoclear.html</feedburner:origLink></entry>
<entry>
    <title>Flash CS3を使用したガジェットのデバッグ。ActionScript3編</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AntsLab/~3/3TI8PJxYvbE/flash_cs3actionscript3.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.anthill.jp/mt/mt-atom.cgi/weblog/blog_id=10/entry_id=479" title="Flash CS3を使用したガジェットのデバッグ。ActionScript3編" />
    <id>tag:labs.anthill.jp,2009://10.479</id>
    
    <published>2009-01-13T05:44:43Z</published>
    <updated>2009-01-13T05:51:37Z</updated>
    
    <summary>GIZMOの機能を使用しているときはFlashのムービーのデバッグの機能を使用し...</summary>
    <author>
        <name>ohura</name>
        
    </author>
            <category term="Flash" />
            <category term="GIZMO" />
    
    <content type="html" xml:lang="ja" xml:base="http://labs.anthill.jp/">
        <![CDATA[GIZMOの機能を使用しているときはFlashのムービーのデバッグの機能を使用しても
うまく動いてくれません。<br />
基本的にはtraceで間に合うのですが、
たとえば関数のコールが深くなったりとか、人のソースを読むときなどにはデバッガを使えると便利だったりします。<br />
<br />
そこで、今回はFlash CS3を使ったガジェットのデバッグの仕方をご紹介します。<br />
<br />]]>
        <![CDATA[<div class="section">  
<h3>1. 準備</h3>
まずは環境を準備する必要があります。<br />
<ul type="disc">
<li>Flash Plyaerのデバッグプレイヤー</li>
<li>GIZMO コミュニティデッキ</li>
</ul>
</div>

<div class="section">  
<h3>2. swfの準備</h3>
ガジェットとして動くようにswfとgadget.xmlなどのファイルを置いてください<br />
C:\Documents and Settings\ユーザー\Application Data\GIZMO2\deck\community\gadget\debugTestAs3
<br />
そして「デバッグを許可」にチェックを入れてパブリッシュ<br />
<img src="/2009/01/as3debug_publish.png" />
</div>

<div class="section">  
<h3>3. ブレイクを設定</h3>
実行をとめたい部分にブレイクを設定します。<br />
今回は閉じるボタンのイベントリスナーに、ブレイクをセットします。<br />
<img src="/2009/01/as3debug_break.png" />
</div>

<div class="section">  
<h3>4. デバッグを開始</h3>
先にFlashでリモートデバッグを開始しておきます<br />
メニュー「デバッグ」->「リモートデバッグセッションを開始」->「ActionScript 3.0」を選択<br />
<img src="/2009/01/as3debug_menu.png" />
<br />
<br />
その後、すかさずコミュニティデッキのリストからガジェットを起動します<br />
うまくデバッグが開始されたらこんな感じのメッセージが出ます<br />
<img src="/2009/01/as3debug_text.png" />
<br />
後は、「閉じる」ボタンを押すと、先ほどブレイクを設定した行で動作は中断します。<br />
また、「例外」ボタンを押すと、キャッチされないが発生しそこでも中断します<br />
</div>

<br />
<a href="/2009/01/as3debug_sample.zip" target="_blank">今回使用したファイル</a>
]]>
    </content>
<feedburner:origLink>http://labs.anthill.jp/2009/01/flash_cs3actionscript3.html</feedburner:origLink></entry>
<entry>
    <title>コミュニティデッキ3D版＜物理エンジンで遊んでみよう編＞</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AntsLab/~3/wxie3B8Axiw/3d_3.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.anthill.jp/mt/mt-atom.cgi/weblog/blog_id=10/entry_id=430" title="コミュニティデッキ3D版＜物理エンジンで遊んでみよう編＞" />
    <id>tag:labs.anthill.jp,2008://10.430</id>
    
    <published>2008-08-12T08:40:40Z</published>
    <updated>2008-08-12T08:43:19Z</updated>
    
    <summary>こんにちは、kiyokazkです。 まだまだ引き続きコミュニティデッキ3D版で遊...</summary>
    <author>
        <name>kiyokazk</name>
        
    </author>
            <category term="3D" />
            <category term="GIZMO" />
    
    <content type="html" xml:lang="ja" xml:base="http://labs.anthill.jp/">
        <![CDATA[こんにちは、kiyokazkです。<br />
<br />
まだまだ引き続きコミュニティデッキ3D版で遊びましょう。<br />
今回は物理エンジンを試してみます。<br />
<br />]]>
        <![CDATA[<div class="section">  
    <h3>物理エンジンサンプル</h3>  
<div class="clearfix"> 
 <p><img alt="プリミティブサンプル" src="http://labs.anthill.jp/gizmo3d/community3d/dynamics_box_x_box.JPG" width="100" height="100"class="imgright" /></p>
<p>コミュニティデッキ3D版には物理エンジンを使用したサンプルとして、「物理エンジンサンプル」という3Dガジェットが2つ同梱されています。シンプルな箱モデルを物理空間に置いただけのサンプルです。他のサンプルガジェットのようにマウスの右ドラッグでモデルを回転させたりすることはできませんが、左クリックで掴んで、そのままドラッグで持ち上げたりすることができます。当たり判定（コリジョン）も持っているので、スクリーンショットのように二つ重ねたりすることも可能です。<br />
<br />
今回は、この物理エンジンサンプルと同じように、他のサンプルガジェットを同じ物理空間に置いてみます。</p>
</div>
</div>

<div class="section">  
    <h3>Xファイルサンプルを物理空間に置いてみよう</h3>  
<div class="clearfix"> 
 <p><img alt="プリミティブサンプル" src="http://labs.anthill.jp/gizmo3d/community3d/dynamics_box_monitor.JPG" width="100" height="100"class="imgright" /></p>
<p>それではサンプルガジェットのXファイルサンプルを物理空間に置いてみることにしましょう。Xファイルサンプルのガジェットフォルダはsample_xですので、そのフォルダ内のgadget3d.xmlをテキストエディタなどで開いて編集します。<br />
<br />
実は、物理空間に置くだけなら変更する点はたったの一箇所だけです。gadget3d.xmlの中のsceneタグのアトリビュートとしてdynamics="false"となっている部分を、dynamics="true"に変更するだけです。この部分を変更してガジェットを起動するとモニターモデルが物理空間に落ちてきます。マウスで持ち上げたり物理エンジンサンプルをぶつけたりできるようになっているので試してみてください。</p>
</div>
</div>

<div class="section">  
    <h3>いろいろな設定</h3>  
物理空間に存在するガジェットの場合、質量やコリジョンの大きさなど、通常の3Dガジェットにはない設定をすることができます。つまりdynamics="true"の場合だけ有効になる設定です。<br />
<br />
これらの設定はobject要素のアトリビュートとして指定します。具体的な設定値については、以下にまとめましたのでこれを参考にいろいろと試してみてください。<br />
</div>
<div class="tbl">  
    <table>  
        <caption>object要素のアトリビュート</caption>  
        <tr>  
            <th>アトリビュート名</th>  
            <th>説明</th>  
             <th>値</th>  
            <th>省略時</th>  
       </tr>  
        <tr>  
            <td class="nowrap">shape</td>  
            <td class="center">コリジョンの形状</td>  
             <td class="center">sphere, box</td>  
             <td class="center">sphere</td>  
       </tr>  
        <tr>  
            <td>position</td>  
             <td class="center">物理空間内の初期位置</td>  
             <td class="center">x, y, zの値をコンマ区切りで指定</td>  
             <td class="center">0,5,0</td>  
        </tr>  
        <tr>  
            <td>mass</td>  
             <td class="center">質量</td>  
             <td class="center">キログラムを数値で指定</td>  
             <td class="center">10</td>  
        </tr>  
        <tr>  
            <td>radius</td>  
             <td class="center">コリジョンが球の場合の半径</td>  
             <td class="center">数値で指定</td>  
             <td class="center">1</td>  
        </tr>  
         <tr>  
            <td>boxSize</td>  
             <td class="center">コリジョンが箱の場合のサイズ</td>  
             <td class="center">x, y, zの値をコンマ区切りで指定</td>  
             <td class="center">1,1,1</td>  
        </tr>  
   </table>  
</div>  
<br />
ちなみに、上記のサンプル（モニター）の場合だと、shape属性を"box"、boxSize属性を"0.4,0.4,0.4"とすると見た目とコリジョン形状がぴったりあっておすすめです。<br />

]]>
    </content>
<feedburner:origLink>http://labs.anthill.jp/2008/08/3d_3.html</feedburner:origLink></entry>
<entry>
    <title>コミュニティデッキ3D版＜ガジェットを作ってみよう編その２＞</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AntsLab/~3/FIZQHyL7rUw/3d_2.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.anthill.jp/mt/mt-atom.cgi/weblog/blog_id=10/entry_id=425" title="コミュニティデッキ3D版＜ガジェットを作ってみよう編その２＞" />
    <id>tag:labs.anthill.jp,2008://10.425</id>
    
    <published>2008-07-31T02:25:48Z</published>
    <updated>2008-08-01T06:44:56Z</updated>
    
    <summary>こんにちは、kiyokazkです。 今回も引き続き、コミュニティデッキ3D版の使...</summary>
    <author>
        <name>kiyokazk</name>
        
    </author>
            <category term="3D" />
            <category term="GIZMO" />
    
    <content type="html" xml:lang="ja" xml:base="http://labs.anthill.jp/">
        <![CDATA[こんにちは、kiyokazkです。<br />
今回も引き続き、コミュニティデッキ3D版の使い方についての解説です。<br />
<br />
今回は前回の予告通り、＜ガジェットを作ってみよう編その２＞と題し、用意した3Dモデルデータをそのままデスクトップガジェットとして表示させる方法について説明します。<br />
<br />
]]>
        <![CDATA[<div class="section">  
    <h3>概要</h3>  
以前の<a href="http://labs.anthill.jp/2008/07/3d_1.html">＜ガジェットを作ってみよう編その１＞</a>では、モデルデータを用意しなくても3Dガジェットを作成する方法をご紹介しました。<br />
この方法では実際にモデルを用意しなくてよい分、気軽に試してみるにはいいのですが、実際に自分が表現したい3Dオブジェクトを作るには少し無理がありました。また、xmlを直接いじって定義するので、表示されるもののイメージも湧きづらく、コードをいじることに慣れていない人にとっては逆にわかりにくかったかもしれません。<br />
<br />
今回の方法では3Dモデルデータを用意して、xmlで指定したモデルを変更するだけですのでデータさえ用意できれば難しくはありません。今回の方法の難しいところは何と言っても「モデルデータを用意する」部分でしょう。インターネット上にはフリーでいろいろな3Dモデルデータを作成・提供している人もいますので、自分でモデリングできないという方も探せば見つかると思います。もちろん自分でモデリングができる方であれば、特に問題はないでしょう。<br />
<br />
ただ、ひとまとめに「3Dモデルデータ」と言っても、様々なフォーマットが存在します。GIZMO 3Dでモデルデータを扱うためには対応しているフォーマットのデータを用意しなくてはいけません。<br />
</div>

<div class="section">  
    <h3>扱えるモデルデータフォーマット</h3>  
さて、それでは実際にGIZMO 3Dで扱えるモデルデータフォーマットについて説明します。（下記にあげた対応フォーマットは現在のGIZMO 3Dプラグインver1.1.0のものです。）<br />
</div>
<dl class="dlist">  
    <dt>Xファイルフォーマット</dt>  
        <dd>  
            <p>MicrosoftのDirectXという3Dグラフィックスライブラリで標準的に使われているフォーマットです。拡張子は*.xです。</p>  
        </dd>  
    <dt>Colladaフォーマット</dt>
        <dd>  
            <p>汎用3Dデータフォーマット。いろいろなモデリングツールにおいて、Colladaフォーマットでデータを出力するためのプラグインなども豊富です。拡張子は*.daeです。（公式サイト： <a href="http://www.collada.org/">http://www.collada.org/</a>）</p>  
        </dd>  
    <dt>メタセコイアデータフォーマット</dt>  
        <dd>  
            <p>国産のモデリングツール「メタセコイア」で使用されているモデルデータフォーマット。拡張子は*.mqoです。（公式サイト：<a href="http://www.metaseq.net/metaseq/index.html">http://www.metaseq.net/metaseq/index.html</a>）</p>  
        </dd>  
    <dt>GIZMO 3Dオリジナルフォーマット</dt>  
        <dd>  
            <p>GIZMO 3Dプラグインでのみ使用するオリジナルフォーマット。拡張子は*.g3mです。専用のコンバータを通すことで生成されます。（コンバータは後日公開予定です）</p>  
        </dd>  
</dl>  
<br />
これらの形式のモデルであれば基本的にGIZMO 3Dプラグインで扱うことが可能です。<br />
しかし、モデルフォーマットによっては、様々な記述方法ができる場合があり（いわゆる方言）、それによっては読み込むことができない、もしくは一部のパラメータに対応しきれていなくて表示がおかしくなる場合があります。ごめんなさい。そういった問題については今後のバージョンアップで対応していく予定です。<br />
<br />
<div class="section">  
    <h3>モデルデータを用意する</h3>  
</div>
さてそれでは実際に3Dモデルデータを準備しましょう。<br />
<br />
<img alt="サンプルデータinメタセコイア" src="http://labs.anthill.jp/gizmo3d/community3d/metasequoia_500.JPG" width="300" height="219" /><br />
<br />
今回はメタセコイア形式のモデルデータとして、<a href="http://nanoha.kirara.st/3dcg/">三次元CG@七葉</a>さんからnh0086.zipをお借りしました。ここに含まれるmqoファイルを実際にメタセコイアで開いてみたのが上のスクリーンショットです。このモデルデータを3Dガジェットにしてみます。<br />
<br />
<div class="section">  
    <h3>モデルデータを差し替える</h3>  
モデルデータが用意できたので、あとは既存のガジェットを差し替えるか、新しくガジェットフォルダを作成して、ガジェット定義ファイル（gadget.xml, gadget3d.xml）を準備するだけです。今回は説明を簡単にするために、既存の3Dガジェットに対して単純なモデルの差し替えを行うことにしましょう。差し替えに使うベースのガジェットは何でもいいのですが、ここではコミュニティデッキ3D版に最初から含まれるメタセコイアサンプル（ガジェットフォルダ名はsample_mqo）のモデルデータを差し替えてみることにします。<br />
<br />
ちなみに以前のエントリーでも説明したように、ガジェットフォルダはWindowsXPの場合は<br />
　Documents and Settings\(User)\Application Data\GIZMO2\deck\community3d\gadget<br />
以下に、Windows Vistaの場合は、<br />
　Users\(User)\AppData\Roaming\GIZMO2\deck\community3d\gadget<br />
以下に存在します。<br />
今回の例では上記にあるsample_mqoフォルダが対象のガジェットとなります。<br />
<br />
sample_mqoで使用しているモデルはデフォルト状態ではcylinder.mqo（メタセコイア形式モデル）です。このモデルデータに代えて用意したモデルデータ（および使われているテクスチャファイル）をフォルダにコピーし、同じフォルダにあるgadget3d.xmlの内容を少し書き換えれば、モデルの差し替えは完了です。<br />
<br />
書き換える箇所は、modelタグのsrc=の部分、そしてtype=の部分です。srcには使用するモデルデータ名を拡張子付きで記述し、typeにはモデルフォーマットを指定してください。typeに記述するモデルフォーマットは、メタセコイアは"metasequoia"、Colladaは"collada"、Xファイルは"x"、と指定します。<br />
<textarea name="code" class="xml">
	<model src="low_p09_2.mqo" type="metasequoia"></model>
</textarea>
<br />
以上の作業（モデルデータの追加、定義ファイルの書き換え）でやるべきことは完了しました。自分で指定したモデルを使った3Dガジェットの完成です。表示するには、タクストレイアイコンを左クリックして表示されるガジェットリストから開くだけです。ガジェットリストにない場合は右クリックメニューからデッキの再起動を選んだあとで再度ガジェットリストを確認してみてください。無事に思い通りのモデルが表示されたでしょうか？思う存分右ドラッグでぐるぐる回してみましょう。<br />
<br />
<img alt="3Dガジェット１" src="http://labs.anthill.jp/gizmo3d/community3d/sample_mqo_500_01.JPG" width="150" height="150" />　<img alt="3Dガジェット２" src="http://labs.anthill.jp/gizmo3d/community3d/sample_mqo_500_03.JPG" width="150" height="150" />　<img alt="3Dガジェット３" src="http://labs.anthill.jp/gizmo3d/community3d/sample_mqo_500_02.JPG" width="150" height="150" />
<br />
3Dガジェットはこの状態では右ドラッグでぐるぐる回すことしかでませんが、自由に3Dガジェットを制御する方法については後日、別のエントリーにてご紹介できればと思います。デスクトップ上をアニメーション付きで自由に歩かせたりしたいですね。<br />
<br />
さて次回はダイナミクス（物理ワールド）上にガジェットを作成する方法について説明します。<br />
<br />
</div>

<script type="text/javascript" src="/scripts/SyntaxHighlighter/shCore.js"></script><script type="text/javascript" src="/scripts/SyntaxHighlighter/shBrushXml.js"></script><script type="text/javascript">dp.SyntaxHighlighter.ClipboardSwf = '/scripts/SyntaxHighlighter/flash/clipboard.swf';dp.SyntaxHighlighter.HighlightAll('code');</script>
]]>
    </content>
<feedburner:origLink>http://labs.anthill.jp/2008/07/3d_2.html</feedburner:origLink></entry>
<entry>
    <title>コミュニティデッキ3D版＜ガジェットを作ってみよう編その１＞</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AntsLab/~3/nZxL3bvlX_s/3d_1.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.anthill.jp/mt/mt-atom.cgi/weblog/blog_id=10/entry_id=423" title="コミュニティデッキ3D版＜ガジェットを作ってみよう編その１＞" />
    <id>tag:labs.anthill.jp,2008://10.423</id>
    
    <published>2008-07-28T02:06:37Z</published>
    <updated>2008-07-28T02:09:54Z</updated>
    
    <summary>こんにちは、kiyokazkです。 先日、GIZMOコミュニティデッキ3D版を公...</summary>
    <author>
        <name>kiyokazk</name>
        
    </author>
            <category term="3D" />
            <category term="GIZMO" />
    
    <content type="html" xml:lang="ja" xml:base="http://labs.anthill.jp/">
        <![CDATA[こんにちは、kiyokazkです。<br />
先日、GIZMOコミュニティデッキ3D版を公開しましたが、この3Dデッキの基本的な使い方をいくつかのエントリーに分けて解説していきます。簡単なものから順を追って説明していきますので、興味があればいろいろ試してみてください。<br />
<br />
まずはじめの今回は初級編として＜ガジェットを作ってみよう編その１＞をお送りします。<br />
3Dモデルのデータなどを用意しなくても、簡単な3Dガジェットを作る方法について説明します。<br />
<br />]]>
        <![CDATA[<div class="section">  
    <h3>3Dガジェットの構成</h3>  
まずはじめに基本的な知識として、3Dガジェットがどのような構成でできているかについて説明します。<br />
<br />
GIZMOにおけるガジェットは、基本的に1フォルダを１ガジェットとして構成されています。コミュニティデッキ3D版に属するガジェットはWindowsXPの場合、<br />
Documents and Settings\(User)\Application Data\GIZMO2\deck\community3d\gadget<br />
以下に配置されます（Windows Vistaの場合はUsers\(User)\AppData\Roaming\GIZMO2）。<br />
<br />
ここに配置される各フォルダがガジェットとして認識され、3Dガジェットの場合最低限以下のファイルが存在します。<br />
<ul>  
    <li>gadget.xml　－　ガジェット定義ファイル</li>  
    <li>gadget3d.xml　－　3Dガジェット定義ファイル</li>  
</ul>
これらに追加して必要なデータファイルがあればフォルダ内に配置し、このフォルダ単位でひとつのガジェットとして振舞います。<br />
<br />
ガジェットの構成やガジェット定義ファイルの詳細については、<a href="http://gizmo.anthill.jp/developer/tutorial/">GIZMOサイト開発者情報のチュートリアル</a>にも説明がありますのであわせてご覧ください。<br />
</div>

<div class="section">  
    <h3>ベースとなるサンプルガジェット</h3>  
<div class="clearfix"> 
 <p><img alt="プリミティブサンプル" src="http://labs.anthill.jp/gizmo3d/community3d/primitive_sample.JPG" width="100" height="100"class="imgright" /></p>
<p>今回の記事ではサンプルとして同梱されている3Dガジェットのうちの「プリミティブサンプル」をベースに解説していきます。プリミティブサンプルは、テクスチャを貼った板と箱、もしくはテクスチャを貼った板と真っ白な板で構成されたガジェットです。<br />
<br />
「プリミティブサンプル」は、それぞれsample_primitive およびsample_primitive2というフォルダでガジェットとして配置されています。この中身について説明し、どのように3Dガジェットとして定義されているかを解説していきます。</p>
</div>
</div>
<div class="section">  
    <h3>primitive_sampleの中身をのぞいてみる</h3>  
それではprimitive_sampleの中身をのぞいてみましょう。<br />
フォルダの中身を見ると、ガジェット定義ファイル（gadget.xmlとgadget3d.xml）とants_logo.pngという画像ファイルがあるのが分かると思います。特にモデルデータのようなものは見当たりません。では、どのように板や箱を決めているのでしょうか。<br />
<br />
その答えはgadget3d.xmlの中身を見てみるとわかります。gadget3d.xmlファイルを適当なテキストエディタなどで開いてみてください。以下のような内容であることが分かると思います。<br />

<textarea name="code" class="xml">
<?xml version="1.0" encoding="UTF-8"?>
<gadget xmlns="http://gizmo.anthill.jp/gadget3d" version="1.0">
	<scene
		transparent="true"
		topmost="true"
		dynamics="false"
		>
		<object
			type="normal"
			draggable="true"
			>
			<model type="primitive">
				<primitive type="plane" texture="ants_logo.png" lightEnable="false" size="0.5,0.5,0.5" />
			</model>
			<model type="primitive">
				<primitive type="cube" size="0.5,0.5,0.5" offset="0,0,0.5" rotation="45,0,0" />
			</model>
		</object>
	</scene>
</gadget>
</textarea>
<br />
真ん中よりちょっと下あたりに、modelというタグがあるのが分かるでしょうか。<br />
GIZMO 3Dプラグインではこのmodelタグによって、表示する3Dモデルについての定義をしています。このガジェットではmodelのtypeをprimitiveとして定義し、その中で実際のprimitiveについての定義をしています。<br />
このようにprimitiveタイプのmodelとして定義することで、3Dモデルデータを使用せずに、3Dプラグインがあらかじめ持っている簡易モデルを表示することができるようになります。<br />
</div>
<br />
<div class="section">  
    <h3>primitive_sampleを改造してみる</h3>  
さて、それではprimitive_sampleガジェットの定義ファイルgadget3d.xmlのprimitiveの部分をいろいろといじってみましょう。<br/>
<br/>
<textarea name="code" class="xml">
	<model type="primitive">
		<primitive type="plane" texture="ants_logo.png" lightEnable="false" size="0.5,0.5,0.5" />
	</model>
</textarea>

<br />
このgadget3d.xmlのprimitiveタグの内容を変更することで表示するプリミティブを様々に変更できます。テキストエディタなどで開いて編集し、ガジェットを開きなおすことで内容が反映されます。<br />
例えば、primitiveタグのtype="plane"となっている部分をtype="cube"とすることで、板が箱に変更されます。同様にサイズや位置、向きなども自由に変更することができます。<br />
<br />
実際にそれぞれの属性の意味や属性として何を設定できるのかについては以下にまとめました。これを参考にいろいろ試してみてください。<br />
</div>
<div class="tbl">  
    <table>  
        <caption>primitive要素のアトリビュート</caption>  
        <tr>  
            <th>アトリビュート名</th>  
            <th>説明</th>  
             <th>値</th>  
            <th>省略時</th>  
       </tr>  
        <tr>  
            <td class="nowrap">type</td>  
            <td class="center">プリミティブのタイプ</td>  
             <td class="center">plane, cube, sphere</td>  
             <td class="center">省略不可</td>  
       </tr>  
        <tr>  
            <td>texture</td>  
             <td class="center">テクスチャ（planeのみに有効）</td>  
             <td class="center">ガジェットフォルダからの相対パス</td>  
             <td class="center">省略時は無視</td>  
        </tr>  
        <tr>  
            <td>size</td>  
             <td class="center">プリミティブのサイズ</td>  
             <td class="center">x, y, zの値をコンマ区切りで指定</td>  
             <td class="center">1, 1, 1</td>  
        </tr>  
        <tr>  
            <td>offset</td>  
             <td class="center">プリミティブの位置オフセット</td>  
             <td class="center">x, y, zの値をコンマ区切りで指定</td>  
             <td class="center">0, 0, 0</td>  
        </tr>  
        <tr>  
            <td>rotation</td>  
             <td class="center">プリミティブの回転角度</td>  
             <td class="center">x, y, zの値をコンマ区切りで指定（degree）</td>  
             <td class="center">0, 0, 0</td>  
        </tr>  
         <tr>  
            <td>lightEnable</td>  
             <td class="center">ライティングの有無</td>  
             <td class="center">true, false</td>  
             <td class="center">true</td>  
        </tr>  
   </table>  
</div>  
<br/>
例えば、いろいろなオフセットを持ったprimitiveとして定義したmodelタグをたくさん並べることで、テクスチャを貼った板をたくさん表示することもできます。それぞれ定義した板は位置オフセットや回転を指定したり、それぞれにテクスチャを貼ったりすることができるので、がんばればいろんな形を模倣することも不可能ではないでしょう。<br/>
ただ、そこまでやるのであれば、適当なモデリングツールなどを使って3Dモデルデータを作成する方が思い通りのものを表現しやすいでしょう。<br/>
<br/>
というわけで、次回は3Dモデルデータを使用した3Dガジェットを作成する方法について解説します。<br/>


<script type="text/javascript" src="/scripts/SyntaxHighlighter/shCore.js"></script><script type="text/javascript" src="/scripts/SyntaxHighlighter/shBrushXml.js"></script><script type="text/javascript">dp.SyntaxHighlighter.ClipboardSwf = '/scripts/SyntaxHighlighter/flash/clipboard.swf';dp.SyntaxHighlighter.HighlightAll('code');</script>
]]>
    </content>
<feedburner:origLink>http://labs.anthill.jp/2008/07/3d_1.html</feedburner:origLink></entry>
<entry>
    <title>コミュニティデッキ3D版をベータ公開します＜導入編＞</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AntsLab/~3/pqlMBFp09wo/3d.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.anthill.jp/mt/mt-atom.cgi/weblog/blog_id=10/entry_id=422" title="コミュニティデッキ3D版をベータ公開します＜導入編＞" />
    <id>tag:labs.anthill.jp,2008://10.422</id>
    
    <published>2008-07-25T03:19:26Z</published>
    <updated>2008-07-25T03:26:44Z</updated>
    
    <summary>こんにちは、kiyokazkです。 GIZMO向けの3D拡張プラグインの最新バー...</summary>
    <author>
        <name>kiyokazk</name>
        
    </author>
            <category term="3D" />
            <category term="GIZMO" />
    
    <content type="html" xml:lang="ja" xml:base="http://labs.anthill.jp/">
        こんにちは、kiyokazkです。
GIZMO向けの3D拡張プラグインの最新バージョンをテスト公開します。
以前のバージョンはGIZMOアバターデッキに同梱されていましたが、今回は汎用的に使えるデッキという位置付けでCommunityデッキ3D版というものを作成して、3D拡張プラグインをそちらに同梱しました。

今回のエントリーではこのCommunityデッキ3D版の導入から付属のサンプルについての説明までを行います。今後は、今回の＜導入編＞に続き、3Dガジェットの作り方や開発情報などについてのエントリーを公開していく予定です。

        <![CDATA[<div class="section">  
    <h3>必要な環境</h3>  
Communityデッキ3D版はGIZMOのデッキという形で配布されます。動作環境としてはGIZMO Runtimeが動作することが最低限必要となります。
GIZMO Runtimeおよび3Dプラグインの動作環境は下記です。残念ながらMacOSには対応していません。
<blockquote>    OS：日本語Windows 2000/XP/Vista<br />
    Internet Exploler 5.5以上<br />
    最新版のFlashPlayer<br />
    August 2007以降のDirectXランタイム（できれば最新版が望ましい）</blockquote>

また、Microsoft DirectXランタイムが必要になりますので、DirectXランタイムがインストールされていない、もしくはインストールされているかどうかよく分からない方は以下のリンクから最新版のDirectX End-Userランタイムをダウンロードし、インストールを行ってください。
<a href="http://www.microsoft.com/japan/windows/directx/default.mspx">Microsoft DirectXホームページ</a>

DirectXランタイムがインストールされていない環境ではCommunityデッキ3D版のインストール後、3Dガジェットを起動しようとしても失敗します。
</div>

<div class="section">  
    <h3>ダウンロード＆インストール＆使い方</h3>  
まずはインストーラを下記よりダウンロードしてください。

<a href="http://labs.anthill.jp/gizmo3d/community3d/community3d_setup.exe"><img alt="GIZMOコミュニティ3Dデッキ" src="http://labs.anthill.jp/gizmo3d/community3d/installer_image.JPG" width="152" height="112" /><br />
GIZMOコミュニティ3Dデッキインストーラ</a>

無事にダウンロードできたら実行するとインストーラが起動しますので、指示通りインストールを行えば準備は完了です。お使いの環境にGIZMO Runtimeがインストールされていない場合はGIZMO Runtimeも同時にインストールされます。

無事にインストールが完了しCommunityデッキ3D版を起動すると、タスクトレイにオレンジ色の歯車マークのアイコンが表示されます。Communityデッキ3D版は基本的にこのタスクトレイアイコンから操作します。タスクトレイアイコンを左クリックするとガジェット一覧が、右クリックするとメニューが表示されますので、左クリックのガジェット一覧もしくは右クリックメニューのガジェット一覧からガジェットを選択することでいろいろなガジェットを起動することができます。

Communityデッキ3D版は初期状態ではサンプルとして7つの3Dガジェットが同梱されています。これらはサンプルとして同梱されているので特に機能のないシンプルなものですが、さまざまな3Dガジェットやその作り方は今後順次公開していきますので、ここではサンプルとして同梱した3Dガジェットについて説明します。
</div>

<div class="section">  
    <h3>サンプルガジェット</h3>  
このデッキには7つのサンプルガジェットが同梱されています。
以下に各サンプルガジェットについて説明します。


<u>Colladaサンプル（ドーナツ）</u>
<a href="http://www.collada.org/">Collada</a>形式のモデルを3Dガジェットとして表示するだけのサンプルです。サンプルとしてドーナツ形状のモデルデータが入っています。マウスの左ドラッグで移動、右ドラッグで回転ができます。
<img alt="Colladaサンプル" src="http://labs.anthill.jp/gizmo3d/community3d/collada_sample.JPG" width="100" height="100" />

<u>メタセコイアサンプル（円柱）</u>
<a href="http://www.metaseq.net/metaseq/index.html">メタセコイア</a>形式のモデルを3Dガジェットとして表示するだけのサンプルです。サンプルとして円柱形状のモデルデータが入っています。マウスの左ドラッグで移動、右ドラッグで回転ができます。
<img alt="メタセコイアサンプル" src="http://labs.anthill.jp/gizmo3d/community3d/mqo_sample.JPG" width="100" height="100" />

<u>物理エンジンサンプル</u>
<u>物理エンジンサンプル２</u>
物理エンジン上で動く3Dガジェットのサンプルです。起動すると画面中央に箱が落ちてきます。マウスの左クリックで掴み、ドラッグで動かすことができます。右クリックおよびドラッグは使用しません。
二つの箱は互いに干渉し合うので、同時に表示して重ねたりすると楽しいかもしれません。
<img alt="物理エンジンサンプル" src="http://labs.anthill.jp/gizmo3d/community3d/physics_sample.JPG" width="100" height="100" />

<u>プリミティブサンプル（板と箱）</u>
<u>プリミティブサンプル（板と板）</u>
プリミティブ（基本形状）を表示する3Dガジェットのサンプルです。このガジェットはモデルデータを持たず、3Dガジェットを定義しているxmlファイルにプリミティブ形状を記述するだけで3Dガジェットとして扱うことができるようになっています。マウスの左ドラッグで移動、右ドラッグで回転ができます。
<img alt="プリミティブサンプル" src="http://labs.anthill.jp/gizmo3d/community3d/primitive_sample.JPG" width="100" height="100" />

<u>Xファイルサンプル（モニター）</u>
DirectXライブラリで使用されているXファイル形式のモデルを3Dガジェットとして表示するだけのサンプルです。サンプルとしてPCモニターの形をしたモデルデータが入っています。マウスの左ドラッグで移動、右ドラッグで回転ができます。
<img alt="Xファイルサンプル" src="http://labs.anthill.jp/gizmo3d/community3d/xfile_sample.JPG" width="100" height="100" />


次回は3Dガジェットの作り方について解説する予定です。ご期待ください。
</div>
]]>
    </content>
<feedburner:origLink>http://labs.anthill.jp/2008/07/3d.html</feedburner:origLink></entry>
<entry>
    <title>【アリンコWeb標準】XHTMLの使ってよい要素・属性をガイドライン化しよう（2/2）</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AntsLab/~3/4y8-ZjE17f0/webxhtml22.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.anthill.jp/mt/mt-atom.cgi/weblog/blog_id=10/entry_id=410" title="【アリンコWeb標準】XHTMLの使ってよい要素・属性をガイドライン化しよう（2/2）" />
    <id>tag:labs.anthill.jp,2008://10.410</id>
    
    <published>2008-06-04T11:24:07Z</published>
    <updated>2008-06-04T11:29:34Z</updated>
    
    <summary> 	第2回目は、XHTMLの属性に関するガイドラインです。 XHTMLの属性に関...</summary>
    <author>
        <name>coco</name>
        
    </author>
            <category term="Web制作" />
    
    <content type="html" xml:lang="ja" xml:base="http://labs.anthill.jp/">
        <![CDATA[<p>
	第2回目は、XHTMLの属性に関するガイドラインです。
</p>
<hr />
<h3>XHTMLの属性に関するガイドライン</h3>
<p>
	要素には、一般的な属性や要素固有の属性などがあります。
</p>
<p>
	これらの属性のうち、「XHTML1.0 Strict」または「XHTML 1.1」で廃止された要素のことを<strong>「非推奨属性」</strong>といいます。
	またアリンコWeb標準では、“非推奨属性ではないが視覚表現に関する属性でCSSで代替した方がよい属性”を<strong>「CSS推奨属性」</strong>としました。
</p>
<p>
	将来的に「XHTML 1.0 Strict」や「XHTML 1.1」への移行を視野に入れるなら、<strong>非推奨属性は使わず適切な代替方法をとり、視覚表現に関する属性はCSSで代替し、文書構造と視覚表現を完全に分離</strong>しておきましょう。
</p>]]>
        <![CDATA[<p>
	しかし、サイトの仕様によっては、非推奨属性を使うケースがあります。
</p>
<p>
	例えば、「外部リンクは別窓表示、内部リンクは同窓表示にする」仕様の場合、外部リンクのa要素のtarget属性に"_blank"を指定したり、「古いブラウザに対応する」仕様の場合、“a要素のid属性＋name属性”（アンカー）、“script要素のtype属性＋language属性”など、非推奨属性を併用することがあります。
	非推奨要素を「XHTML1.0 Strict」および「XHTML 1.1」で使用すると、動作に問題がなくてもvalidではありません。
	そのため非推奨属性を使用する場合は、フレームでないページの場合は「XHTML 1.0 Tranditional」、フレームを使用したページの場合は「XHTML 1.0 Frameset」を採用する必要があります。
</p>
<hr />
<h4>XHTMLの非推奨・CSS推奨属性一覧</h4>
<p>
	下記は、XHTMLの<strong>「非推奨属性」</strong>と<strong>「CSS推奨属性」</strong>をまとめた一覧表です。
</p>
<p>
	<strong>「非推奨属性」</strong>には適切な代替方法、<strong>「CSS推奨属性」</strong>にはCSSでの代替方法、DTDごとの注意事項などは補足に掲載しています。
	適切な代替方法がない属性は「代替方法なし」となっています。
</p>
<div class="section">
	<div class="tbl">
		<table>
			<caption>≪XHTMLの非推奨・CSS推奨属性一覧≫</caption>
			<thead>
				<tr>
					<th class="nowrap">属性名</th>
					<th class="nowrap">説明</th>
					<th class="nowrap">代替方法</th>
					<th class="nowrap">補足</th>
					<th class="nowrap">使用</th>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<th class="nowrap">属性名</th>
					<th class="nowrap">説明</th>
					<th class="nowrap">代替方法</th>
					<th class="nowrap">補足</th>
					<th class="nowrap">使用</th>
				</tr>
			</tfoot>
			<tbody>
				<!-- 全要素 -->
				<tr><th colspan="5">全要素</th></tr>
				<tr>
					<td class="nowrap"><code>lang</code></td>
					<td>言語コード</td>
					<td>xml:lang属性で代替。</td>
					<td>
						【XHTML 1.0】<br />lang属性とxml:lang属性を併用。<br /><code class="code">&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"&gt;</code>
						【XHTML 1.1】<br />xml:lang属性のみ。<br /><code class="code">&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja"&gt;</code>
					</td>
					<td class="nowrap">非推奨</td>
				</tr>

				<!-- a要素 -->
				<tr><th colspan="5">a要素 （ハイパーテキスト）</th></tr>
				<tr>
					<td class="nowrap"><code>name属性</code></td>
					<td>アンカー名</td>
					<td>a要素のid属性で代替。</td>
					<td>
						【XHTML 1.0】<br />古いブラウザ対応のためにname属性とid属性の併用可。<code class="code">&lt;a <span class="caution">name="anc" id="anc"</span>&gt;</code>
						【XHTML 1.1】<br />id属性のみ。<code class="code">&lt;a <span class="caution">id="anc"</span>&gt;、&lt;h2 <span class="caution">id="anc"</span>&gt;</code>
					</td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>target属性</code></td>
					<td>リンク先の開き方</td>
					<td>別窓表示（_blank）はJavaScriptで代替。</td>
					<td>※a要素のtarget属性は、XHTML 1.0 Tranditional/Framesetでのみ使用可。</td>
					<td>非推奨</td>
				</tr>

				<!-- base要素 -->
				<tr><th colspan="5">base要素 （文書の基準URL）</th></tr>
				<tr>
					<td class="nowrap"><code>target属性</code></td>
					<td>リンク先の開き方</td>
					<td>代替方法なし</td>
					<td>※base要素のtarget属性は、XHTML 1.0 Tranditional/Framesetでのみ使用可。</td>
					<td>非推奨</td>
				</tr>

				<!-- body要素 -->
				<tr><th colspan="5">body要素 （文書の本文）</th></tr>
				<tr>
					<td class="nowrap"><code>alink属性</code></td>
					<td>アクティブ時のリンク色</td>
					<td>CSSで代替（a要素のcolorプロパティ）</td>
					<td><code class="code">a:active {<br />&nbsp;color:red;<br />}</code></td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>background属性</code></td>
					<td>背景画像</td>
					<td>CSSで代替（body要素のbackgroundプロパティ）</td>
					<td><code class="code">body {<br />&nbsp;background:transparent url("bg.png") repeat top left;<br />}</code></td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>bgcolor属性</code></td>
					<td>背景色</td>
					<td>CSSで代替（body要素のbackground-colorプロパティ）</td>
					<td><code class="code">body {<br />&nbsp;background-color:#f7f7f7;<br />}</code></td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>link属性</code></td>
					<td>通常のリンク色</td>
					<td>CSSで代替（a:hover擬似クラスのcolorプロパティ）</td>
					<td><code class="code">a {<br />&nbsp;color:blue;<br />}</code></td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>text属性</code></td>
					<td>文字色</td>
					<td>CSSで代替（body要素のcolorプロパティ）</td>
					<td><code class="code">body {<br />&nbsp;color:#333;<br />}</code></td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>vlink属性</code></td>
					<td>訪問済みリンク色</td>
					<td>CSSで代替（a:visited擬似クラスのcolorプロパティ）</td>
					<td><code class="code">a:visited {<br />&nbsp;color:purple;<br />}</code></td>
					<td>非推奨</td>
				</tr>

				<!-- br要素 -->
				<tr><th colspan="5">br要素 （強制改行）</th></tr>
				<tr>
					<td class="nowrap"><code>clear属性</code></td>
					<td>回り込み解除</td>
					<td>CSSで代替（clearプロパティまたはclearfixハック）</td>
					<td>
						●clearプロパティ<code class="code">br.clr {<br />&nbsp;clear:both; }</code>
						●clearfixハック<code class="code">.clearfix:after {<br />&nbsp;content:".";<br />&nbsp;display:block;<br />&nbsp;clear:both; <br />&nbsp;:0;<br />&nbsp;visibility:hidden;<br />}<br />.clearfix {<br />&nbsp;display:inline-block;<br />}<br />/* exlude MacIE5 \*/<br />* html .clearfix {<br />&nbsp;height:1%;<br />}<br />.clearfix {<br />&nbsp;display:block;<br />}<br />/* end MacIE5 */</code>
					</td>
					<td>非推奨</td>
				</tr>

				<!-- caption要素 -->
				<tr><th colspan="5">caption要素 （表のタイトル）</th></tr>
				<tr>
					<td class="nowrap"><code>align属性</code></td>
					<td>左右整列位置</td>
					<td>CSSで代替（caption-sideプロパティ）</td>
					<td>●要素の上揃え、下揃え、左揃え、右揃え<code class="code">caption {<br />&nbsp;caption-side:top|bottom|left|right;<br />}</code></td>
					<td>非推奨</td>
				</tr>

				<!-- div要素 -->
				<tr><th colspan="5">div要素 （ブロック要素のグループ化）</th></tr>
				<tr>
					<td class="nowrap"><code>align属性</code></td>
					<td>左右整列位置</td>
					<td>CSSで代替（margin-leftプロパティ、margin-rightプロパティ、text-alignプロパティ）</td>
					<td>●要素のセンタリング<code class="code">div {<br />&nbsp;margin-left:auto;<br />&nbsp;margin-right:auto;<br />&nbsp;text-align:center;<br />}</code>●要素内のテキストおよび要素の左揃え、センタリング、右揃え<code class="code">div {<br />&nbsp;text-align:left|center|right;<br />}</code></td>
					<td>非推奨</td>
				</tr>

				<!-- dl要素 -->
				<tr><th colspan="5">dl要素 （定義リスト）</th></tr>
				<tr>
					<td class="nowrap"><code>compact属性</code></td>
					<td>コンパクト表示</td>
					<td>代替方法なし</td>
					<td>※dl要素のcompact属性は、XHTML 1.0 Tranditional/Framesetで使用可だが文書構造と視覚表現分離のため使用しない。</td>
					<td>非推奨</td>
				</tr>

				<!-- form要素 -->
				<tr><th colspan="5">form要素 （フォームの定義）</th></tr>
				<tr>
					<td class="nowrap"><code>name属性</code></td>
					<td>要素の名前</td>
					<td>id属性で代替</td>
					<td>
						【XHTML 1.0】<br />古いブラウザ対応のためにname属性とid属性の併用可。<code class="code">&lt;form action="action="search.cgi" method="post" <span class="caution">name="frm" id="frm"</span>&gt;</code>
						【XHTML 1.1】<br />id属性のみ。<code class="code">&lt;form action="search.cgi" method="post" <span class="caution">id="frm"</span>&gt;</code>
					</td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>target属性</code></td>
					<td>リンク先の開き方</td>
					<td>別窓表示（_blank）はJavaScriptで代替。</td>
					<td>※form要素のtarget属性は、XHTML 1.0 Tranditional/Framesetでのみ使用可。</td>
					<td>非推奨</td>
				</tr>

				<!-- h1～h6要素 -->
				<tr><th colspan="5">h1～h6要素 （見出し）</th></tr>
				<tr>
					<td class="nowrap"><code>align属性</code></td>
					<td>左右整列位置</td>
					<td>CSSで代替（margin-leftプロパティ、margin-rightプロパティ、text-alignプロパティ）</td>
					<td>●要素のセンタリング<code class="code">h1 {<br />&nbsp;margin-left:auto;<br />&nbsp;margin-right:auto;<br />}</code>●要素内のテキストおよび要素の左揃え、センタリング、右揃え<code class="code">h1 {<br />&nbsp;text-align:left|center|right;<br />}</code></td>
					<td>非推奨</td>
				</tr>

				<!-- hr要素 -->
				<tr><th colspan="5">hr要素 （ブロック要素の区切り線）</th></tr>
				<tr>
					<td class="nowrap"><code>align属性</code></td>
					<td>左右整列位置</td>
					<td>CSSで代替（margin-leftプロパティ、margin-rightプロパティ）</td>
					<td>●要素のセンタリング<code class="code">hr {<br />&nbsp;margin-left:auto;<br />&nbsp;margin-right:auto;<br />}</code></td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>noshade属性</code></td>
					<td>区切り線に影を付けない</td>
					<td>CSSで代替（borderプロパティ）</td>
					<td><code class="code">hr {<br />&nbsp;border:1px solid #ccc;<br />}</code>※&lt;hr noshade="noshade" /&gt;は、XHTML 1.0 Tranditional/Framesetで使用可だが文書構造と視覚表現分離のため使用しない。</td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>size属性</code></td>
					<td>区切り線の太さ</td>
					<td>CSSで代替（borderプロパティ、heightプロパティ）</td>
					<td><code class="code">hr {<br />border:1px solid #ccc;<br />}</code></td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>width属性</code></td>
					<td>区切り線の幅</td>
					<td>CSSで代替（heightプロパティ）</td>
					<td><code class="code">hr {<br />&nbsp;width:80%;<br />}</code></td>
					<td>非推奨</td>
				</tr>

				<!-- html要素 -->
				<tr><th colspan="5">html要素 （文書ルート）</th></tr>
				<tr>
					<td class="nowrap"><code>version属性</code></td>
					<td>HTML文書のバージョン番号</td>
					<td>代替方法なし</td>
					<td>※html要素のversion属性は、DTD（文書型宣言）があるので不要。</td>
					<td>非推奨</td>
				</tr>

				<!-- img要素 -->
				<tr><th colspan="5">img要素 （画像の埋め込み）</th></tr>
				<tr>
					<td class="nowrap"><code>align属性</code></td>
					<td>左右整列位置</td>
					<td>CSSで代替（floatプロパティまたはvertical-alignプロパティ）</td>
					<td>●要素の左揃え、右揃え<code class="code">img {<br />&nbsp;float:left|right; }</code>●要素の上揃え、上下中央揃え、下揃え<code class="code">img {<br />&nbsp;vertical-align:top|middle|bottom;<br />}</code></td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>border属性</code></td>
					<td>枠線</td>
					<td>CSSで代替（borderプロパティ）</td>
					<td><code class="code">img {<br />&nbsp;border:0;<br />}<br />または<br />img {<br />&nbsp;border:none;<br />}</code></td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>hspace属性</code></td>
					<td>左右外余白</td>
					<td>CSSで代替（margin-leftプロパティ、margin-rightプロパティ）</td>
					<td><code class="code">img {<br />&nbsp;margin-left:5px;<br />&nbsp;margin-right:5px;<br />}</code></td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>name属性</code></td>
					<td>要素の名前</td>
					<td>id属性で代替</td>
					<td>
						【XHTML 1.0】<br />古いブラウザ対応のためにname属性とid属性の併用可。<code class="code">&lt;img <span class="caution">id="pic" name="pic"</span> src="photo.jpg" alt="写真" /&gt;</code>
						【XHTML 1.1】<br />id属性のみ。<code class="code">&lt;img <span class="caution">id="pic"</span> src="photo.jpg" alt="写真" /&gt;</code>
					</td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>vspace属性</code></td>
					<td>上下外余白</td>
					<td>CSSで代替（margin-topプロパティ、margin-bottomプロパティ）</td>
					<td><code class="code">img {<br />&nbsp;margin-top:5px;<br />&nbsp;margin-bottom:5px;<br />}</code></td>
					<td>非推奨</td>
				</tr>

				<!-- input要素 -->
				<tr><th colspan="5">input要素 （入力要素）</th></tr>
				<tr>
					<td class="nowrap"><code>align属性</code></td>
					<td>左右整列位置</td>
					<td>CSSで代替（floatプロパティまたはvertical-alignプロパティ）</td>
					<td>●要素の左揃え、右揃え<code class="code">input {<br />&nbsp;float:left|right;<br />}</code>●要素の上揃え、上下中央揃え、下揃え<code class="code">input {<br />&nbsp;vertical-align:top|middle|bottom;<br />}</code></td>
					<td>非推奨</td>
				</tr>

				<!-- legend要素 -->
				<tr><th colspan="5">legend要素 （フォーム要素のグループのタイトル）</th></tr>
				<tr>
					<td class="nowrap"><code>align属性</code></td>
					<td>左右整列位置</td>
					<td>代替方法なし</td>
					<td>●要素の左揃え、右揃え<code class="code">legend {<br />&nbsp;float:left|right;<br />}</code>●要素の上揃え、下揃え<code class="code">legend {<br />&nbsp;vertical-align:top|bottom;<br />}</code></td>
					<td>非推奨</td>
				</tr>

				<!-- li要素 -->
				<tr><th colspan="5">li要素 （リストの項目）</th></tr>
				<tr>
					<td class="nowrap"><code>type属性</code></td>
					<td>リストマーク</td>
					<td>CSSで代替（list-style-typeプロパティ）</td>
					<td><code class="code">li {<br />&nbsp;list-style-type:disc|circle|square;<br />}</code></td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>value属性</code></td>
					<td>リスト項目の値</td>
					<td>代替方法なし</td>
					<td>-</td>
					<td>非推奨</td>
				</tr>

				<!-- link要素 -->
				<tr><th colspan="5">link要素 （文書の関連ファイル）</th></tr>
				<tr>
					<td class="nowrap"><code>target属性</code></td>
					<td>リンク先の開き方</td>
					<td>代替方法なし</td>
					<td>※link要素のtarget属性は、XHTML 1.0 Tranditional/Framesetでのみ使用可。</td>
					<td>非推奨</td>
				</tr>

				<!-- map要素 -->
				<tr><th colspan="5">map要素 （イメージマップの定義）</th></tr>
				<tr>
					<td class="nowrap"><code>name属性</code></td>
					<td>要素の名前</td>
					<td>id属性で代替</td>
					<td>
						【XHTML 1.0】<br />古いブラウザ対応のためにname属性とid属性の併用可。<code class="code">&lt;map <span class="caution">id="umap" name="umap"</span>&gt;</code>
						【XHTML 1.1】<br />id属性のみ。<code class="code">&lt;map <span class="caution">id="umap"</span>&gt;</code>
					</td>
					<td>非推奨</td>
				</tr>

				<!-- object要素 -->
				<tr><th colspan="5">object要素 （オブジェクトの埋め込み）</th></tr>
				<tr>
					<td class="nowrap"><code>align属性</code></td>
					<td>左右整列位置</td>
					<td>CSSで代替（floatプロパティまたはvertical-alignプロパティ）</td>
					<td>●要素の左揃え、右揃え<code class="code">object {<br />&nbsp;float:left|right;<br />}</code>●要素の上揃え、上下中央揃え、下揃え<code class="code">object {<br />&nbsp;vertical-align:top|middle|bottom;<br />}</code></td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>border属性</code></td>
					<td>枠線</td>
					<td>CSSで代替（borderプロパティ）</td>
					<td><code class="code">object {<br />&nbsp;border:1px solid #ccc;<br />}</code></td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>hspace属性</code></td>
					<td>左右外余白</td>
					<td>CSSで代替（margin-leftプロパティ、margin-rightプロパティ）</td>
					<td><code class="code">object {<br />&nbsp;margin-left:5px;<br />&nbsp;margin-right:5px;<br />}</code></td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>vspace属性</code></td>
					<td>上下外余白</td>
					<td>CSSで代替（margin-topプロパティ、margin-bottomプロパティ）</td>
					<td><code class="code">object {<br />&nbsp;margin-top:1em;<br />&nbsp;margin-bottom:1em;<br />}</code></td>
					<td>非推奨</td>
				</tr>

				<!-- ol要素 -->
				<tr><th colspan="5">ol要素 （番号付きリスト）</th></tr>
				<tr>
					<td class="nowrap"><code>compact属性</code></td>
					<td>コンパクト表示</td>
					<td>代替方法なし</td>
					<td>※ol要素のcompact属性は、XHTML 1.0 Tranditional/Framesetで使用可だが文書構造と視覚表現分離のため使用しない。</td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>start属性</code></td>
					<td>開始番号</td>
					<td>代替方法なし</td>
					<td>※ol要素のstart属性は、XHTML 1.0 Tranditional/Framesetで使用可だが非推奨属性のため使用しない。</td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>type属性</code></td>
					<td>リストマーク</td>
					<td>CSSで代替（list-style-typeプロパティ）</td>
					<td><code class="code">ol {<br />&nbsp;list-style-type:decimal;<br />}</code></td>
					<td>非推奨</td>
				</tr>

				<!-- p要素 -->
				<tr><th colspan="5">p要素 （段落）</th></tr>
				<tr>
					<td class="nowrap"><code>align属性</code></td>
					<td>左右整列位置</td>
					<td>CSSで代替（margin-leftプロパティ、margin-rightプロパティ、text-alignプロパティ）</td>
					<td>●要素のセンタリング<code class="code">p {<br />&nbsp;margin-left:auto;<br />&nbsp;margin-right:auto;<br />&nbsp;text-align:center;<br />}</code>●要素内のテキストおよび要素の左揃え、センタリング、右揃え<code class="code">p {<br />&nbsp;text-align:left|center|right;<br />}</code></td>
					<td>非推奨</td>
				</tr>

				<!-- pre要素 -->
				<tr><th colspan="5">pre要素 （整形済みテキスト）</th></tr>
				<tr>
					<td class="nowrap"><code>width属性</code></td>
					<td>要素の幅</td>
					<td>CSSで代替（widthプロパティ）</td>
					<td><code class="code">pre {<br />&nbsp;width:98%;<br />}</code></td>
					<td>非推奨</td>
				</tr>

				<!-- script要素 -->
				<tr><th colspan="5">script要素 （外部スクリプトファイルの読み込み、スクリプトの記述）</th></tr>
				<tr>
					<td class="nowrap"><code>language属性</code></td>
					<td>言語</td>
					<td>type属性で代替</td>
					<td>
						【XHTML 1.0 Transitional/Frameset】<br />古いブラウザ対応するためにtype属性とlanguage属性の併用可。<code class="code">&lt;script type="text/javascript" language="JavaScript"&gt;</code>
						【XHTML 1.0 Strict、XHTML 1.1】<br />type属性のみ。<code class="code">&lt;script type="text/javascript"&gt;</code>
					</td>
					<td>非推奨</td>
				</tr>

				<!-- table要素 -->
				<tr><th colspan="5">table要素 （表の定義）</th></tr>
				<tr>
					<td class="nowrap"><code>align属性</code></td>
					<td>左右整列位置</td>
					<td>CSSで代替（floatプロパティまたはmargin-leftプロパティ＋margin-rightプロパティ）</td>
					<td>●要素の左揃え、右揃え<code class="code">table {<br />&nbsp;float:left|right; }</code>●要素のセンタリング<code class="code">table {<br />&nbsp;margin-left:auto;<br />&nbsp;margin-right:auto;<br />}</code></td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>bgcolor属性</code></td>
					<td>背景色</td>
					<td>CSSで代替（background-colorプロパティ）</td>
					<td><code class="code">table {<br />&nbsp;background-color:#f7f7f7;<br />}</code></td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>border属性</code></td>
					<td>枠線</td>
					<td>CSSで代替（table要素・th要素・td要素のborderプロパティ、border-collapseプロパティ）</td>
					<td><code class="code">table {<br />&nbsp;border:1px solid #ccc;<br />&nbsp;border-collapse:collapse;<br />}<br />th, td {<br />&nbsp;border:1px solid #ccc;<br />}</code>※table要素のborder属性は、XHTML1.0で使用可だが文書構造と視覚表現分離のため使用しない。</td>
					<td>CSS推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>cellpadding属性</code></td>
					<td>セルの内余白</td>
					<td>CSSで代替（th要素・td要素のpaddingプロパティ）</td>
					<td><code class="code">th, td {<br />&nbsp;padding:5px;<br />}</code>※table要素のcellpadding属性は、XHTML 1.0で使用可だが文書構造と視覚表現分離のため使用しない。</td>
					<td>CSS推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>cellspacing属性</code></td>
					<td>セルの外余白</td>
					<td>CSSで代替（border-spacingプロパティ）</td>
					<td><code class="code">table {<br />&nbsp;border-spacing:0;<br />}</code>※table要素のcellspacing属性は、XHTML 1.0で使用可だが文書構造と視覚表現分離のため使用しない。</td>
					<td>CSS推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>frame属性</code></td>
					<td>表の外枠の表示形式</td>
					<td>CSSで代替（borderプロパティ）</td>
					<td><code class="code">table {<br />&nbsp;border:1px solid #ccc;<br />}</code>※table要素のframe属性は、XHTML 1.0で使用可だが文書構造と視覚表現分離のため使用しない。</td>
					<td>CSS推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>rules属性</code></td>
					<td>行・列の線の引き方式</td>
					<td>CSSで代替（thead、tbody、colgroup、col、tr要素のborderプロパティ）</td>
					<td><code class="code">thead,tbody,colgroup,col,tr {<br />&nbsp;border:1px solid #ccc;<br />}</code>※table要素のrules属性は、XHTML 1.0で使用可だが文書構造と視覚表現分離のため使用しない。</td>
					<td>CSS推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>width属性</code></td>
					<td>表の幅</td>
					<td>CSSで代替（widthプロパティ）</td>
					<td><code class="code">table {<br />&nbsp;width:100%;<br />}</code>※table要素のwidth属性は、XHTML 1.0で使用可だが文書構造と視覚表現分離のため使用しない。</td>
					<td>CSS推奨</td>
				</tr>

				<!-- th要素、td要素 -->
				<tr><th colspan="5">th要素 （見出しセル）、td要素 （データセル）</th></tr>
				<tr>
					<td class="nowrap"><code>align属性</code></td>
					<td>セル内の左右整列位置</td>
					<td>CSSで代替（text-alignプロパティ）</td>
					<td>●セル内のテキストおよび要素の左揃え、センタリング、右揃え<code class="code">th, td {<br />&nbsp;text-align:left|center|right;<br />}</code>※th要素およびtd要素のalign属性は、XHTML 1.0で使用可だが文書構造と視覚表現分離のため使用しない。</td>
					<td>CSS推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>bgcolor属性</code></td>
					<td>セルの背景色</td>
					<td>CSSで代替（background-colorプロパティ）</td>
					<td><code class="code">th, td {<br />&nbsp;background-color:#fff;<br />}</code></td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>height属性</code></td>
					<td>セルの高さ</td>
					<td>CSSで代替（heightプロパティ）</td>
					<td><code class="code">th, td {<br />&nbsp;height:2em;<br />}</code></td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>nowrap属性</code></td>
					<td>セル内のテキストの折り返し</td>
					<td>CSSで代替（white-spaceプロパティ）</td>
					<td><code class="code">th, td {<br />&nbsp;white-space:nowrap;<br />}</code></td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>valign属性</code></td>
					<td>セル内の上下整列位置</td>
					<td>CSSで代替（vertical-alignプロパティ）</td>
					<td>●セル内のテキストおよび要素の上揃え、上下中央揃え、下揃え<code class="code">th, td {<br />&nbsp;vertical-align:top|middle|bottom;<br />}</code>※th要素およびtd要素のvalign属性は、XHTML 1.0で使用可だが文書構造と視覚表現分離のため使用しない。</td>
					<td>CSS推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>width属性</code></td>
					<td>セルの幅</td>
					<td>CSSで代替（widthプロパティ）</td>
					<td><code class="code">th, td {<br />&nbsp;width:25%;<br />}</code></td>
					<td>非推奨</td>
				</tr>

				<!-- tr要素 -->
				<tr><th colspan="5">tr要素 （行グループ）</th></tr>
				<tr>
					<td class="nowrap"><code>bgcolor属性</code></td>
					<td>行グループの背景色</td>
					<td>CSSで代替（background-colorプロパティ）</td>
					<td><code class="code">tr {<br />&nbsp;background-color:#ffffcc;<br />}</code></td>
					<td>非推奨</td>
				</tr>

				<!-- ul要素 -->
				<tr><th colspan="5">ul要素 （箇条書きリスト）</th></tr>
				<tr>
					<td class="nowrap"><code>compact属性</code></td>
					<td>コンパクト表示</td>
					<td>代替方法なし</td>
					<td>※ul要素のcompact属性は、XHTML 1.0 Tranditional/Framesetで使用可だが文書構造と視覚表現分離のため使用しない。</td>
					<td>非推奨</td>
				</tr>
				<tr>
					<td class="nowrap"><code>type属性</code></td>
					<td>リストマーク</td>
					<td>CSSで代替（list-style-typeプロパティ）</td>
					<td><code class="code">ul {<br />&nbsp;list-style-type:disc|circle|square;<br />}</code></td>
					<td>非推奨</td>
				</tr>


			</tbody>
		</table>
	</div>
</div>
<p>
	2回にわたって、XHTMLの要素・属性のガイドラインをご紹介してきました。
	Web制作に関わる社内外の人々の共通認識となるガイドラインを作成しておくと、コーディングの統一化や作業効率化が図れます。
	一覧やリスト化しておけば、DTD移行時やソース確認時などにも活用できます。
</p>
<p>
	さて次回は、「XHTMLの書式と記述のルール」です。
</p>]]>
    </content>
<feedburner:origLink>http://labs.anthill.jp/2008/06/webxhtml22.html</feedburner:origLink></entry>
<entry>
    <title>Pixel Bender Toolkitを試してみた</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AntsLab/~3/yydyoIyc0is/pixel_bender_toolkit.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.anthill.jp/mt/mt-atom.cgi/weblog/blog_id=10/entry_id=408" title="Pixel Bender Toolkitを試してみた" />
    <id>tag:labs.anthill.jp,2008://10.408</id>
    
    <published>2008-05-21T06:44:17Z</published>
    <updated>2008-05-21T06:50:46Z</updated>
    
    <summary>こんにちは、kiyokazkです。 先日Flash Player 10のベータ版...</summary>
    <author>
        <name>kiyokazk</name>
        
    </author>
            <category term="Flash" />
    
    <content type="html" xml:lang="ja" xml:base="http://labs.anthill.jp/">
        <![CDATA[こんにちは、kiyokazkです。<br />
先日Flash Player 10のベータ版が公開されましたが（<a href="http://labs.adobe.com/technologies/flashplayer10/">Adobe Labs - Flash Player 10</a>）、そのFlash Player 10でサポートされるカスタムフィルタ（ピクセルシェーダ）を作成できるツール<strong>Pixel Bender Toolkit</strong>（<a href="http://labs.adobe.com/wiki/index.php/Pixel_Bender_Toolkit">Adobe Labs - Pixel Bender Toolkit</a>）もプレビューリリース 3が公開されたので試してみました。<br />
<br />]]>
        <![CDATA[<strong>■環境を作成する</strong><br />
<a href="http://labs.adobe.com/wiki/index.php/Pixel_Bender_Toolkit">Adobe Labs - Pixel Bender Toolkit</a>からダウンロードしてインストールすれば準備はおしまいです。同サイトにチュートリアルのPDFも置いてあります（英語）。<br />
インストールに成功して起動すると、（僕の環境では）GPUのテストに失敗したからCPUを使ってフィルタリングするね、みたいなダイアログが表示されましたがツール自体は問題なく使えます。次回起動時にこのメッセージを出さないようにするには（毎回CPUを使用するようにするには）、メニューの"Edit - Preferences"でオプションメニューを開いてAdvancedタグにある"Force filters to run on the CPU"にチェックを入れればOKです。<br />
<br />
<img alt="pixel_bender_ss.jpg" src="http://labs.anthill.jp/pixelbender/pixel_bender_ss.jpg" width="300" height="250" /><br />
<br />
3つに区切られたエリアは、左上がイメージを表示する部分、左下がソースエディタ部分、右がフィルタパラメータ用UI部分です。<br />
<br />
<strong>■基本的なフィルタ</strong><br />
メニューから"File - New Pixel Kernel Filter"を選択すると、ソースエディタ部分に基本的なソースが自動生成されます。これはピクセル座標から元画像の色をサンプリングして出力するだけのフィルタです。元の色を読み込んでそのまま出力するだけなので何も変化しません（フィルタと呼んでいいものか）。<br />
<br />
<strong>■何か作ってみる</strong><br />
このフィルタを改造して何か作ってみます。ありがちですが画像の一部にモザイクをかけるようなフィルタにしましょう。指定のポイントから半径Rのエリアだけにモザイクがかかるようにしてみます。<br />
<br />
実際に行うピクセル処理はevaluatePixel()の中に書いていきます。（ここでは便宜上日本語のコメントを書いていますが、現在のToolkitでは日本語コメントは表示できないようです）<br />
<br />
<textarea name="code" class="as3">
  void
    evaluatePixel()
    {
        float2 coord = outCoord();
        int2 srcCoord = int2(coord);
        
        //intは16ビットしか保証されていないのでfloatで計算
        float x_sqr = float(srcCoord.x-position.x) * float(srcCoord.x-position.x);
        float y_sqr = float(srcCoord.y-position.y) * float(srcCoord.y-position.y);
        float size_sqr = float(areaSize) * float(areaSize);
 
        if( x_sqr + y_sqr < size_sqr ){
            //モザイク処理
            int2 useCoord = srcCoord;
            useCoord /= mosaicSize;
            useCoord *= mosaicSize;
            useCoord += mosaicSize/2;
            pixel4 useCol = sampleNearest(src,float2(useCoord));
            dst = useCol;
        }
        else{
            //そのまま出力
            pixel4 useCol = sampleNearest(src,coord);
            dst = useCol;
        }
    }
</textarea>
<br />
positionの点からareaSize以内の距離にある点をモザイク処理、それ以外をそのまま出力としてあります。モザイク処理の部分はmosaicSizeの定数倍ピクセルごとの正方形の中心の点の色でその正方形の中を全部塗りつぶすことにしました。<br />
また距離比較の計算部分は、int型は16ビットしか保証されないようなのでfloatにキャストして計算しています（実際、intで計算した場合にはToolkit上ではうまく動作しましたが、後述のAdobeデモサイトに読み込ませた場合は正しく動作しませんでした）。<br />
<br />
この処理の中でモザイクのブロックサイズ(mosaicSize）、モザイクをかける範囲（areaSize）、モザイクをかける位置（position）を変数として使うので、パラメータとして変更できるようにこれより前で定義しておきます。<br />
<br />
<textarea name="code" class="as3">
    //パラメータ定義
    parameter int mosaicSize
    <
        minValue:int(1);
        maxValue:int(64);
        defaultValue:int(8);
    >;
    parameter int areaSize
    <
        minValue:int(10);
        maxValue:int(300);
        defaultValue:int(50);
    >;
    parameter int2 position
    <
        minValue:int2(0,0);
        maxValue:int2(500,500);
        defaultValue:int2(100,100);
    >;
</textarea>
<br />
パラメータとして定義すると、実行したときにツールの右側エリアに自動的にスライダーが表示されて動的に変更できるようになります。<br />
<br />
<strong>■実行する</strong><br />
このフィルタを実行してみるには、まず何か画像を読み込んでおく必要があります。メニューの"File - Load Image 1"から何かの画像を選択すると読み込まれて左上のイメージエリアに表示されます。
これで実行準備が整ったのでソースエディタの右下にある「run」ボタンを押せば実行されます。（コンパイルに失敗すると実行されずに右エリアにエラーメッセージが表示されます。）<br />
<a href="http://labs.anthill.jp/pixelbender/mosaic_run_ss.jpg">
<img alt="mosaic_run_ss.jpg" src="http://labs.anthill.jp/pixelbender/mosaic_run_ss.jpg" width="300" height="227" /><br />
クリックで拡大</a><br />
<br />
右エリアにあるパラメータ変更スライダーで、モザイクのかかる範囲（areaSize）、モザイクのブロックサイズ（mosaicSize）、モザイクの中心位置（position）を変更するとイメージエリアのモザイクが動的に変化します。<br />
<br />
<strong>■保存と書き出し</strong><br />
作成したフィルタは"File - Save Pixel Bender Kernel Filter"を選択すると*.pbkという拡張子のテキストファイルで保存することができます（Windows版。Macはわからないですごめんなさい)。<br />
<br />
Flash用のバイトコードとして書き出したい場合は、"File - "Export Pixel Bender Byte Code Filter for Flash"を選択することで*.pbjファイルとして書き出すことができます。書き出したpbjファイルはFlash Player 10用に追加されたクラスflash.display.Shaderとしてロードしてswfから使用できるようです。<br />
<br />
<a href="http://labs.adobe.com/technologies/flashplayer10/demos/pixelbender/">AdobeのPixel Benderデモページ</a>（要Flash Player 10）でもコンパイル済みのフィルタ（pbjファイル）を試すことができます。今回のフィルタも以下に置いておくので、動作を見てみたい方はファイルをダウンロードした上でデモサイトで試してみてください。<br />
<br />
<strong>■今回使用したソースとフィルタ</strong><br />
今回使用したソースとフィルタを置いておきます。<br />
<a href="http://labs.anthill.jp/pixelbender/sample1.pbk">sample1.pbk</a> （ソースファイル）<br />
<a href="http://labs.anthill.jp/pixelbender/sample1.pbj">sample1.pbj</a> （バイトコード）<br />
<br />
<textarea name="code" class="as3">
<languageVersion : 1.0;>

kernel AreaMosaicFilter
<   namespace : "kiyokazk";
    vendor : "kiyokazk";
    version : 1;
    description : "area mosaic";
>
{
    input image4 src;
    output pixel4 dst;
    
    parameter int mosaicSize
    <
        minValue:int(1);
        maxValue:int(64);
        defaultValue:int(8);
    >;
    parameter int areaSize
    <
        minValue:int(10);
        maxValue:int(300);
        defaultValue:int(50);
    >;
    parameter int2 position
    <
        minValue:int2(0,0);
        maxValue:int2(500,500);
        defaultValue:int2(100,100);
    >;

    void
    evaluatePixel()
    {
        float2 coord = outCoord();
        int2 srcCoord = int2(coord);
        
        float x_sqr = float(srcCoord.x-position.x) * float(srcCoord.x-position.x);
        float y_sqr = float(srcCoord.y-position.y) * float(srcCoord.y-position.y);
        float size_sqr = float(areaSize) * float(areaSize);
 
        if( x_sqr + y_sqr < size_sqr ){
            int2 useCoord = srcCoord;
            useCoord /= mosaicSize;
            useCoord *= mosaicSize;
            useCoord += mosaicSize/2;
            pixel4 useCol = sampleNearest(src,float2(useCoord));
            dst = useCol;
        }
        else{
            pixel4 useCol = sampleNearest(src,coord);
            dst = useCol;
        }
    }
}
</textarea>

<script type="text/javascript" src="/scripts/SyntaxHighlighter/shCore.js"></script><script type="text/javascript" src="/scripts/SyntaxHighlighter/shBrushAS3.js"></script><script type="text/javascript">dp.SyntaxHighlighter.ClipboardSwf = '/scripts/SyntaxHighlighter/flash/clipboard.swf';dp.SyntaxHighlighter.HighlightAll('code');</script>
]]>
    </content>
<feedburner:origLink>http://labs.anthill.jp/2008/05/pixel_bender_toolkit.html</feedburner:origLink></entry>
<entry>
    <title>【アリンコWeb標準】XHTMLの使ってよい要素・属性をガイドライン化しよう（1/2）</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AntsLab/~3/CTzOoPAqQT4/webxhtml12.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.anthill.jp/mt/mt-atom.cgi/weblog/blog_id=10/entry_id=406" title="【アリンコWeb標準】XHTMLの使ってよい要素・属性をガイドライン化しよう（1/2）" />
    <id>tag:labs.anthill.jp,2008://10.406</id>
    
    <published>2008-05-19T02:50:05Z</published>
    <updated>2008-06-02T10:34:59Z</updated>
    
    <summary> 	Webページは、採用した文書型定義（以下、「DTD」）に基いて作成します。 ...</summary>
    <author>
        <name>coco</name>
        
    </author>
            <category term="Web制作" />
    
    <content type="html" xml:lang="ja" xml:base="http://labs.anthill.jp/">
        <![CDATA[<p>
	Webページは、採用した文書型定義（以下、「DTD」）に基いて作成します。
	<strong>XHTMLのDTD</strong>には、2つのバージョンと3つのタイプがあります。
</p>
<ul>
	<li>XHTML 1.0 － Strict（厳密型）／Tranditional（移行型）／Frameset（フレーム型）</li>
	<li>XHTML 1.1 － Strict（厳密型）のみ</li>
</ul>
<p>
	更にこれらのバージョンやタイプによって<strong>廃止されり、使ってはいけない要素・属性</strong>があります。
</p>
<div class="tbl">
	<table>
		<tr><th class="nowrap">非推奨要素・属性</th><td>「XHTML 1.0 Strict」および「XHTML 1.1」で廃止された要素・属性のため「XHTML 1.0 Tranditional」、「XHTML 1.0 Frameset」での使用が推奨されていない要素・属性。</td></tr>
		<tr><th class="nowrap">CSS推奨要素・属性</th><td>非推奨でも廃止されてもいませんが、文書構造と視覚表現分離のためにCSSで代替した方がよい要素・属性。</td></tr>
		<tr><th class="nowrap">W3C非公認要素・属性</th><td>ブラウザが独自に拡張した要素およびその属性のため、一部のブラウザでしか動作しないため、使用しない方がよい要素・属性。</td></tr>
	</table>
</div>
<p>
	これらの要素・属性をどうするかルールがないと、「DTDでb要素やi要素が定義されているから使っていいのでは？」
	「DTDで定義されていても、装飾目的でテキストを太字や斜体にするときは、スタイルシートを使用すべきだよ。」
	といったように、各人によってマークアップに対する考え方が異なるため現場の混乱を招いてしまいます。
</p>
<p>
	そのため、DTDごとに<span class="em">使ってよい要素・属性、使ってはいけない要素・属性の代替方法を、明確にルール化</span>しておくと、作業効率がアップします。
	それでは、<strong>「要素」</strong>と<strong>「属性」</strong>に分けて2回にわたってXHTMLでマークアップする際に使用してよい要素・属性のまとめをご紹介します。
</p>]]>
        <![CDATA[<hr />
<h3>XHTMLの<ins>文書宣言と</ins>要素に関するガイドライン</h3>
<p>
	『XHTMLの<ins>文書宣言と</ins>要素に関するガイドライン』を1枚の表にまとめてみました。
	「使用の可否」を見れば、どのDTDで使用してよいかが分かるようになっています。
</p>
<div class="tbl">
	<table>
		<tr><th>使用の可否</th><th>説明</th></tr>
		<tr><td>○</td><td>全てのDTDで使用可</td></tr>
		<tr><td>×</td><td>全てのDTDで使用不可</td></tr>
		<tr><td>T</td><td>「XHTML 1.0 Tranditional」で使用可</td></tr>
		<tr><td>F</td><td>「XHTML 1.0 Frameset」で使用可</td></tr>
	</table>
</div>
<p>
	アリンコWeb標準では、<span class="em">どのDTDを採用してもあまりコーディングの差異がないように、非推奨要素、CSS推奨要素、W3C非公認要素（embed要素を除く）は使用せず、それぞれ適切な代替方法をとっています。</span>
</p>
<p>
	例えば、b要素やi要素などの視覚効果に関する要素は、DTDで定義されていても、CSSで代替するなどのルールを設けており、各DTDにおける大きな違いは下記の2点にとどまっています。
</p>
<ul>
	<li>「XHTML 1.0 Tranditional」と「XHTML 1.0 Frameset」の違い<br />
		→　フレームが使用できるか否か。</li>
	<li>「XHTML 1.0 Tranditional」と「XHTML 1.0 Strict」および「XHTML 1.1」の違い<br />
		→　applet要素とiframe要素が使用できるか否か。</li>
</ul>
<p>
	【追記】一部、記事の内容に誤りがあったため、下記2点を修正・追記しました。
</p>
<div class="indent">
	<ol>
		<li>厳密にはXML宣言とDOCTYPE宣言は「XHTMLの要素」ではないため、要素一覧から外し、「XHTMLの文書宣言」としました。</li>
		<li>XML宣言省略可能な文字コードが「UTF-8」のみとなっていましたが、「UTF-16」の場合、またHTTPレスポンスヘッダーのContent-typeのcharsetに文字コードが設定されている場合も省略可に訂正しました。</li>
	</ol>
	<p>
		フィードバックをくださった方々、ありがとうございました。
	</p>
</div>
<div class="section">
	<div class="tbl">
		<table>
			<caption>≪文書宣言に関するガイドライン≫</caption>
			<thead>
				<tr>
					<th class="nowrap">タグ</th>
					<th class="nowrap">説明</th>
					<th class="nowrap">使用の可否</th>
					<th class="nowrap">代替方法</th>
					<th class="nowrap">補足</th>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<th class="nowrap">タグ</th>
					<th class="nowrap">説明</th>
					<th class="nowrap">使用の可否</th>
					<th class="nowrap">代替方法</th>
					<th class="nowrap">補足</th>
				</tr>
			</tfoot>
			<tbody>
				<!-- 宣言 -->
				<tr><th colspan="5">宣言</th></tr>
				<tr><td class="nowrap"><code>&lt;? xml ?&gt;</code></td><td>XML宣言</td><td>○</td><td><del>文字コードが「UTF-8」の場合のみ省略可。</del><ins>文字コードが「UTF-8」、「UTF-16」の場合、HTTPレスポンスヘッダーのContent-typeのcharsetに文字コードが設定されている場合のみ省略可。</ins></td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;!DOCTYPE&gt;</code></td><td>文書型定義（DTD）</td><td>○</td><td>　</td><td>　</td></tr>
			</tbody>
		</table>
	</div>
	<div class="tbl">
		<table>
			<caption>≪XHTMLの要素に関するガイドライン≫</caption>
			<thead>
				<tr>
					<th class="nowrap">要素名</th>
					<th class="nowrap">説明</th>
					<th class="nowrap">使用の可否</th>
					<th class="nowrap">代替方法</th>
					<th class="nowrap">補足</th>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<th class="nowrap">要素名</th>
					<th class="nowrap">説明</th>
					<th class="nowrap">使用の可否</th>
					<th class="nowrap">代替方法</th>
					<th class="nowrap">補足</th>
				</tr>
			</tfoot>
			<tbody>
				<!-- 文書構造 -->
				<tr><th colspan="5">文書構造</th></tr>
				<tr><td class="nowrap"><code>&lt;html&gt;～&lt;/html&gt;</code></td><td>文書ルート</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;head&gt;～&lt;/head&gt;</code></td><td>文書のヘッダ情報</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;title&gt;～&lt;/title&gt;</code></td><td>文書の文書タイトル</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;meta /&gt;</code></td><td>文書のメタ情報</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;link /&gt;</code></td><td>文書の関連ファイル</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;base /&gt;</code></td><td>文書の基準URL</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;body&gt;～&lt;/body&gt;</code></td><td>文書の本文</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;div&gt;～&lt;/div&gt;</code></td><td>ブロック要素のグループ化</td><td>○</td><td>　</td><td>　</td></tr>

				<!-- 段落 -->
				<tr><th colspan="5">段落</th></tr>
				<tr><td class="nowrap"><code>&lt;p&gt;～&lt;/p&gt;</code></td><td>段落</td><td>○</td><td>　</td><td>　</td></tr>

				<!-- 見出し -->
				<tr><th colspan="5">見出し</th></tr>
				<tr><td class="nowrap"><code>&lt;h1&gt;～&lt;/h1&gt;<br />&lt;h2&gt;～&lt;/h2&gt;<br />&lt;h3&gt;～&lt;/h3&gt;<br />&lt;h4&gt;～&lt;/h4&gt;<br />&lt;h5&gt;～&lt;/h5&gt;<br />&lt;h6&gt;～&lt;/h6&gt;</code></td><td>見出し</td><td>○</td><td>　</td><td>　</td></tr>

				<!-- 見出し -->
				<tr><th colspan="5">センタリング</th></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;center&gt;～&lt;/center&gt;</code></td><td>要素およびテキストの中央揃え</td><td>×</td><td>CSSで代替<br /><code>margin-left:auto;<br />margin-right:auto;<br />text-align:center;</code></td><td>　</td></tr>

				<!-- リスト -->
				<tr><th colspan="5">リスト</th></tr>
				<tr><td class="nowrap"><code>&lt;ul&gt;～&lt;/ul&gt;</code></td><td>箇条書きリスト</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;ol&gt;～&lt;/ol&gt;</code></td><td>番号付きリスト</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;li&gt;～&lt;/li&gt;</code></td><td>リストの項目</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;dl&gt;～&lt;/dl&gt;</code></td><td>定義リスト</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;dt&gt;～&lt;/dt&gt;</code></td><td>定義リストの項目</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;dd&gt;～&lt;/dd&gt;</code></td><td>定義リストの項目の内容</td><td>○</td><td>　</td><td>　</td></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;menu&gt;～&lt;/menu&gt;</code></td><td>箇条書きリスト</td><td>×</td><td>ul要素で代替</td><td>非推奨要素</td></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;dir&gt;～&lt;/dir&gt;</code></td><td>箇条書きリスト</td><td>×</td><td>ul要素で代替</td><td>非推奨要素</td></tr>

				<!-- 連絡先 -->
				<tr><th colspan="5">リスト</th></tr>
				<tr><td class="nowrap"><code>&lt;address&gt;～&lt;/address&gt;</code></td><td>メールアドレス、コピーライト表記など</td><td>○</td><td>　</td><td>　</td></tr>

				<!-- 水平線 -->
				<tr><th colspan="5">水平線</th></tr>
				<tr><td class="nowrap"><code>&lt;hr /&gt;</code></td><td>ブロック要素の区切り線</td><td>○</td><td>　</td><td>　</td></tr>

				<!-- 整形済みテキスト -->
				<tr><th colspan="5">整形済みテキスト</th></tr>
				<tr><td class="nowrap"><code>&lt;pre&gt;～&lt;/pre&gt;</code></td><td>整形済みテキスト</td><td>○</td><td>　</td><td>　</td></tr>

				<!-- ハイパーテキスト -->
				<tr><th colspan="5">ハイパーテキスト</th></tr>
				<tr><td class="nowrap"><code>&lt;a&gt;～&lt;/a&gt;</code></td><td>アンカー、リンク</td><td>○</td><td>　</td><td>　</td></tr>

				<!-- 引用 -->
				<tr><th colspan="5">引用</th></tr>
				<tr><td class="nowrap"><code>&lt;blockquote&gt;～&lt;/blockquote&gt;</code></td><td>ブロックレベルの引用</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;q&gt;～&lt;/q&gt;</code></td><td>インラインレベルの引用</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;cite&gt;～&lt;/cite&gt;</code></td><td>引用元</td><td>○</td><td>　</td><td>　</td></tr>

				<!-- 編集 -->
				<tr><th colspan="5">編集</th></tr>
				<tr><td class="nowrap"><code>&lt;del&gt;～&lt;/del&gt;</code></td><td>削除した文章であることを示す</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;ins&gt;～&lt;/ins&gt;</code></td><td>追加した文章であることを示す</td><td>○</td><td>　</td><td>　</td></tr>

				<!-- インライン要素 -->
				<tr><th colspan="5">インライン要素</th></tr>
				<tr><td class="nowrap"><code>&lt;span&gt;～&lt;/span&gt;</code></td><td>インライン要素のグループ化</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;bdo&gt;～&lt;/bdo&gt;</code></td><td>テキストの表記方法</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;br /&gt;</code></td><td>強制改行</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;em&gt;～&lt;/em&gt;</code></td><td>強調</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;strong&gt;～&lt;/strong&gt;</code></td><td>論理的な強調</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;dfn&gt;～&lt;/dfn&gt;</code></td><td>定義語</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;abbr&gt;～&lt;/abbr&gt;</code></td><td>省略語（単語の先頭の頭文字を組合せて、そのまま頭文字を発音する省略語 ex. XHTML、PHP）</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;acronym&gt;～&lt;/acronym&gt;</code></td><td>頭字語（単語の先頭の頭文字を組合せてつづり読みにし、ひとつの単語として発音する省略語 ex. Ajax、NASA）</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;sub&gt;～&lt;/sub&gt;</code></td><td>下付き文字</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;sup&gt;～&lt;/sup&gt;</code></td><td>上付き文字</td><td>○</td><td>　</td><td>　</td></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;i&gt;～&lt;/i&gt;</code></td><td>斜体にする</td><td>×</td><td>CSSで代替<br /><code>font-style:italic;</code></td><td>CSS推奨要素</td></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;b&gt;～&lt;/b&gt;</code></td><td>太字にする</td><td>×</td><td>CSSで代替<br /><code>font-weight:bold;</code></td><td>CSS推奨要素</td></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;big&gt;～&lt;/big&gt;</code></td><td>文字を大きくする</td><td>×</td><td>CSSで代替<br /><code>font-size:larger;</code></td><td>CSS推奨要素</td></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;small&gt;～&lt;/small&gt;</code></td><td>文字を小さくする</td><td>×</td><td>CSSで代替<br /><code>font-size:smaller;</code></td><td>CSS推奨要素</td></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;tt&gt;～/tt&gt;</code></td><td>等幅フォントにする</td><td>×</td><td>CSSで代替<br /><code>font-family:monospace;</code></td><td>CSS推奨要素</td></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;basefont /&gt;</code></td><td>基準フォントサイズ</td><td>×</td><td>CSSで代替（body要素のfont-sizeプロパティ）</td><td>非推奨要素</td></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;font&gt;～&lt;/font&gt;</code></td><td>フォント</td><td>×</td><td>CSSで代替（fontプロパティ）</td><td>非推奨要素</td></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;s&gt;～&lt;/s&gt;<br />&lt;strike&gt;～&lt;/strike&gt;</code></td><td>取消線</td><td>×</td><td>CSSで代替<br /><code>text-decoration:line-through;</code></td><td>非推奨要素</td></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;u&gt;～&lt;/u&gt;</code></td><td>下線</td><td>×</td><td>CSSで代替<br /><code>text-decoration:line-through;</code></td><td>非推奨要素</td></tr>

				<!-- プログラム -->
				<tr><th colspan="5">プログラム</th></tr>
				<tr><td class="nowrap"><code>&lt;code&gt;～&lt;/code&gt;</code></td><td>スクリプトのソースコード</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;var&gt;～&lt;/var&gt;</code></td><td>プログラムの変数、引数</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;samp&gt;～&lt;/samp&gt;</code></td><td>スクリプトの出力結果のサンプルテキスト</td><td>○</td><td>　</td><td></td></tr>
				<tr><td class="nowrap"><code>&lt;kbd&gt;～&lt;/kbd&gt;</code></td><td>キーボードの入力テキスト</td><td>○</td><td>　</td><td>　</td></tr>

				<!-- オブジェクト -->
				<tr><th colspan="5">オブジェクト</th></tr>
				<tr><td class="nowrap"><code>&lt;object&gt;～&lt;/object&gt;</code></td><td>オブジェクトの埋め込み</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;param /&gt;</code></td><td>オブジェクトに渡すパラメータ</td><td>○</td><td>　</td><td>　</td></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;applet&gt;～&lt;/applet&gt;</code></td><td>JavaアプレットのWebページ埋め込み</td><td>TF</td><td>XHTML 1.0 Strict、XHTML 1.1の場合は、object要素で代替</td><td>非推奨要素</td></tr>

				<!-- クライアントサイド イメージマップ -->
				<tr><th colspan="5">クライアントサイド イメージマップ</th></tr>
				<tr><td class="nowrap"><code>&lt;map&gt;～&lt;/map&gt;</code></td><td>イメージマップの定義</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;area /&gt;</code></td><td>イメージマップの領域</td><td>○</td><td>　</td><td>　</td></tr>

				<!-- 画像 -->
				<tr><th colspan="5">画像</th></tr>
				<tr><td class="nowrap"><code>&lt;img /&gt;</code></td><td>画像の埋め込み</td><td>○</td><td>　</td><td>　</td></tr>

				<!-- フォーム -->
				<tr><th colspan="5">フォーム</th></tr>
				<tr><td class="nowrap"><code>&lt;form&gt;～&lt;/form&gt;</code></td><td>フォームの定義</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;label&gt;～&lt;/label&gt;</code></td><td>ラベル</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;input /&gt;</code></td><td>入力要素</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;select&gt;～&lt;/select&gt;</code></td><td>プルダウンメニュー</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;optgroup&gt;～&lt;/optgroup&gt;</code></td><td>プルダウンメニューの選択肢のグループ化</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;option&gt;～&lt;/option&gt;</code></td><td>プルダウンメニューの選択肢の</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;textarea&gt;～&lt;/textarea&gt;</code></td><td>複数行テキスト入力欄</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;fieldset&gt;～&lt;/fieldset&gt;</code></td><td>フォーム要素のグループ化</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;legend&gt;～&lt;/legend&gt;</code></td><td>フォーム要素のグループのタイトル</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;button&gt;～&lt;/button&gt;</code></td><td>汎用ボタン</td><td>○</td><td>　</td><td>　</td></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;isindex /&gt;</code></td><td>キーワード検索入力欄</td><td>×</td><td>form要素とinput要素で代替</td><td>非推奨要素</td></tr>

				<!-- 表（テーブル） -->
				<tr><th colspan="5">表（テーブル）</th></tr>
				<tr><td class="nowrap"><code>&lt;table&gt;～&lt;/table&gt;</code></td><td>表の定義</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;caption&gt;～&lt;/caption&gt;</code></td><td>表のタイトル</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;colgroup&gt;～&lt;/colgroup&gt;</code></td><td>表の行の構造的なグループ化</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;col /&gt;</code></td><td>表の行の非構造的なグループ化</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;thead&gt;～&lt;/thead&gt;</code></td><td>表のヘッダ部</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;tfoot&gt;～&lt;/tfoot&gt;</code></td><td>表のフッタ部</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;tbody&gt;～&lt;/tbody&gt;</code></td><td>表の本体</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;tr&gt;～&lt;/tr&gt;</code></td><td>行グループ</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;th&gt;～&lt;/th&gt;</code></td><td>見出しセル</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;td&gt;～&lt;/td&gt;</code></td><td>データセル</td><td>○</td><td>　</td><td>　</td></tr>

				<!-- スクリプト／スタイルシート -->
				<tr><th colspan="5">スクリプト／スタイルシート</th></tr>
				<tr><td class="nowrap"><code>&lt;script&gt;～&lt;/script&gt;</code></td><td>外部スクリプトファイルの読み込み、スクリプトの記述</td><td>○</td><td>　</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;noscript&gt;～&lt;/noscript&gt;</code></td><td>スクリプト無効ユーザ向け代替テキスト</td><td>○</td><td>body要素内のみ記述可</td><td>　</td></tr>
				<tr><td class="nowrap"><code>&lt;style&gt;～&lt;/style&gt;</code></td><td>外部スタイルシートの読み込み、スタイルシートの記述</td><td>○</td><td>　</td><td>　</td></tr>

				<!-- フレーム -->
				<tr><th colspan="5">フレーム</th></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;frameset&gt;～&lt;/frameset&gt;</code></td><td>フレームの分割方法の定義</td><td>F</td><td>XHTML 1.0 Framesetのみ使用可</td><td>　</td></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;frame /&gt;</code></td><td>frameset要素で分割した各フレームの定義</td><td>F</td><td>XHTML 1.0 Framesetのみ使用可</td><td>　</td></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;noframes&gt;～&lt;/noframes&gt;</code></td><td>フレーム未対応ユーザ向け代替テキスト</td><td>F</td><td>XHTML 1.0 Framesetのみ使用可</td><td>　</td></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;iframe&gt;～&lt;/iframe&gt;</code></td><td>インラインフレーム</td><td>TF</td><td>XHTML 1.0 Strict、XHTML 1.1の場合は、object要素で代替</td><td>非推奨要素</td></tr>

				<!-- W3C非公認要素 -->
				<tr><th colspan="5">W3C非公認要素</th></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;bgsound /&gt;</code></td><td>BGMの埋め込み</td><td>×</td><td>object要素＋embed要素で代替</td><td>W3C非公認要素</td></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;blink&gt;～&lt;/blink&gt;</code></td><td>テキスト点滅</td><td>×</td><td>JavaScriptで代替</td><td>W3C非公認要素</td></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;embed&gt;～&lt;/embed&gt;</code></td><td>オブジェクトの埋め込み</td><td>○</td><td>object要素と併用（単独使用不可）</td><td>W3C非公認要素</td></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;layer&gt;～&lt;/layer&gt;<br />&lt;ilayer&gt;～&lt;/ilayer&gt;<br />&lt;nolayer&gt;～&lt;/nolayer&gt;</code></td><td>絶対・相対位置にレイヤ表示</td><td>×</td><td>代替方法なし</td><td>W3C非公認要素</td></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;marquee&gt;～&lt;/marquee&gt;</code></td><td>テキストを流す</td><td>×</td><td>JavaScriptで代替</td><td>W3C非公認要素</td></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;nobr&gt;～&lt;/nobr&gt;</code></td><td>改行禁止</td><td>×</td><td>CSSで代替<br /><code>white-space:nowrap;</code></td><td>W3C非公認要素</td></tr>
				<tr class="rec"><td class="nowrap"><code>&lt;wbr /&gt;</code></td><td>nobr要素内の改行候補位置</td><td>×</td><td>代替方法なし</td><td>W3C非公認要素</td></tr>
			</tbody>
		</table>
	</div>
</div>
<div class="section">
	<p>
		次回は、「XHTMLの<strong>属性</strong>の関するガイドライン」です。
	</p>
</div>]]>
    </content>
<feedburner:origLink>http://labs.anthill.jp/2008/05/webxhtml12.html</feedburner:origLink></entry>

</feed>
