<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>unbland.org blog &#187; Flash (ActionScript)</title>
	<atom:link href="http://unbland.org/blog/category/flash-actionscript/feed" rel="self" type="application/rss+xml" />
	<link>http://unbland.org/blog</link>
	<description>発見の日々の備忘録。主に Web にまつまる技術ネタ。</description>
	<lastBuildDate>Wed, 18 Nov 2009 03:31:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SWFProfiler を複数クライアント対応化とバグ修正</title>
		<link>http://unbland.org/blog/2009/08/20/333.html</link>
		<comments>http://unbland.org/blog/2009/08/20/333.html#comments</comments>
		<pubDate>Thu, 20 Aug 2009 12:21:32 +0000</pubDate>
		<dc:creator>muta244@admin</dc:creator>
				<category><![CDATA[Flash (ActionScript)]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Swing]]></category>
		<category><![CDATA[SWFProfiler]]></category>

		<guid isPermaLink="false">http://unbland.org/blog/?p=333</guid>
		<description><![CDATA[SWFProfiler をアップデートしました。
リリースノート
・モニタリングする対象 SWF をリストから選択出来るように機能を追加しました。
・不要なデータが混ざるのを防ぐため、サーバー  クライアント間のデータの [...]]]></description>
			<content:encoded><![CDATA[<p>SWFProfiler をアップデートしました。</p>
<p><strong>リリースノート</strong></p>
<p>・モニタリングする対象 SWF をリストから選択出来るように機能を追加しました。<br />
・不要なデータが混ざるのを防ぐため、サーバー <-> クライアント間のデータのやり取りをリモーティングからメッセージングを使ったものに変更しました。<br />
・上記に伴い、サーバーを Jetty から自前サーバーに変更しました。<br />
・サンプリングがおかしかった所を修正しました。</p>
<p><strong>ダウンロード</strong></p>
<p><del datetime="2009-11-18T03:31:20+00:00"><a href="http://unbland.org/blog/wp-content/uploads/2009/08/SWFProfiler-0.0.3.zip" target="_blank">SWFProfiler.zip (Ver. 0.0.3)</a></del><br />
<a href="http://unbland.org/blog/wp-content/uploads/2009/08/SWFProfiler-0.0.4.zip" target="_blank">SWFProfiler.zip (Ver. 0.0.4)</a></p>
<p><strong>使い方</strong></p>
<p>・SWFProfiler.jar を実行します。<br />
・監視したい対象 SWF をブラウザ上でもローカル上でもいいので開きます。<br />
・リストから対象 SWF のファイル名を選択します。</p>
<p>以上の手順でプロファイリングが可能です。</p>
<p><strong>使用に関して</strong></p>
<p>・実行には JRE 1.6+ が必要です。<br />
・FlashPlayer はデバックバージョンを使用する必要があります。<br />
・SWF はデバッグリリースされている必要があります。</p>
<p><strong>ソースコード</strong></p>
<p><a href="http://bitbucket.org/muta244/swfprofiler/" target="_blank">http://bitbucket.org/muta244/swfprofiler/</a> で bitbucket にて管理しています。</p>
<p>今回のアップデートでだいぶ使えるものになったんじゃないかと思います。ただ、バグやおかしな点もまだまだあるかと思いますので、これからもマイペースに更新していきます。ご意見・ご要望はコメント欄、もしくは bitbucket にチケット登録をお願いします。</p>
]]></content:encoded>
			<wfw:commentRss>http://unbland.org/blog/2009/08/20/333.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SWFProfiler の機能追加・バグ修正をしました</title>
		<link>http://unbland.org/blog/2009/08/16/322.html</link>
		<comments>http://unbland.org/blog/2009/08/16/322.html#comments</comments>
		<pubDate>Sat, 15 Aug 2009 16:41:06 +0000</pubDate>
		<dc:creator>muta244@admin</dc:creator>
				<category><![CDATA[Flash (ActionScript)]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[SWFProfiler]]></category>
		<category><![CDATA[Swing]]></category>
		<category><![CDATA[Tool]]></category>

		<guid isPermaLink="false">http://unbland.org/blog/?p=322</guid>
		<description><![CDATA[
先日リリースした SWFProfiler ですが、みなさん動いてなかったかと思います（ですよね？）。なので、修正版をリリースしました。ついでにモニター結果のフィルタリング機能と、定期的にガベージコレクションを自動で行う [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://unbland.org/blog/wp-content/uploads/2009/08/SWFProfiler_Capture02.jpg" alt="SWFProfiler_Capture02" title="SWFProfiler_Capture02" width="500" height="435" class="alignnone size-full wp-image-323" /></p>
<p>先日リリースした SWFProfiler ですが、みなさん動いてなかったかと思います（ですよね？）。なので、修正版をリリースしました。ついでにモニター結果のフィルタリング機能と、定期的にガベージコレクションを自動で行う機能を追加しています。</p>
<p><strong>ダウンロード</strong></p>
<p><del datetime="2009-11-18T03:29:12+00:00"><a href="http://unbland.org/blog/wp-content/uploads/2009/08/SWFProfiler-0.0.2.zip" target="_blank">SWFProfiler.zip (Ver. 0.0.2)</a><br />
<strong>＊ リンク先を間違えていたので修正しました。（&#8217;09.08.16）</strong></del><br />
<a href="http://unbland.org/blog/wp-content/uploads/2009/08/SWFProfiler-0.0.4.zip" target="_blank">SWFProfiler.zip (Ver. 0.0.4)</a><br />
<strong>＊ バグ修正版。（&#8217;09.11.18）</strong></p>
<p>あと、ブラウザ版にしろ、ローカル版にしろ、Flash Player はデバッグ版がインストールされている必要があります。それと、SWF 自体もデバッグモードで書き出されている必要がありますので、この点だけご注意下さい。</p>
<p>不明な点やバグ報告などありましたら、ぜひコメント欄へお願いします！</p>
]]></content:encoded>
			<wfw:commentRss>http://unbland.org/blog/2009/08/16/322.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>SWFProfiler を試しに公開してみます</title>
		<link>http://unbland.org/blog/2009/08/13/314.html</link>
		<comments>http://unbland.org/blog/2009/08/13/314.html#comments</comments>
		<pubDate>Thu, 13 Aug 2009 13:52:14 +0000</pubDate>
		<dc:creator>muta244@admin</dc:creator>
				<category><![CDATA[Flash (ActionScript)]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[SWFProfiler]]></category>
		<category><![CDATA[Swing]]></category>
		<category><![CDATA[Tool]]></category>

		<guid isPermaLink="false">http://unbland.org/blog/?p=314</guid>
		<description><![CDATA[Flex Builder が無くてもデバッグ環境が必要だと思うので作りました。今の機能は Flex Builder プロファイラのライブオブジェクト相当のみです。Windows, Mac, Linux 全てで使用出来ます [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_313" class="wp-caption alignnone" style="width: 510px"><img src="http://unbland.org/blog/wp-content/uploads/2009/08/SWFProfilerCapture01.jpg" alt="SWFProfiler のキャプチャ画像" title="SWFProfilerCapture01" width="500" height="421" class="size-full wp-image-313" />
<p class="wp-caption-text">SWFProfiler のキャプチャ画像（nium さんの kujaku を勝手にプロファイリングw）</p>
</div>
<p>Flex Builder が無くてもデバッグ環境が必要だと思うので作りました。今の機能は Flex Builder プロファイラのライブオブジェクト相当のみです。Windows, Mac, Linux 全てで使用出来ますが、Swing で開発してるので <a href="http://java.com/ja/" target="_blank">JRE 1.6+</a> が必要です。</p>
<p><strong>ダウンロード</strong></p>
<p><del datetime="2009-08-16T05:13:41+00:00">SWFProfiler.zip (Ver. 0.0.1)</del></p>
<p>※ <strong>このバージョンは正しく動作しませんので、<a href="http://unbland.org/blog/2009/08/16/322.html">新しいバージョンをリリース</a>しました。そちらをお使い下さい。</strong></p>
<p><strong>使い方</strong></p>
<p>SWFProfiler.jar を起動した後、監視対象の SWF を開く（ブラウザ上でも可）と監視が始まります。現状では、複数の SWF を同時に開いているとおかしな事になるので、SWF は監視対象一つのみを開くようにして下さい。<a href="http://labs.anthill.jp/2009/03/flaprofiler_02.html" target="_blank">FlaProfiler</a> とほぼ同じです。</p>
<p><strong>今後の予定</strong></p>
<p>・複数の SWF 対応<br />
・モニター結果のフィルタリング機能<br />
・コンソール機能<br />
・メモリ使用状況のグラフ表示<br />
・国際化</p>
<p>あとは Mac で文字列なカラムでソートすると、何故かちらつくんですよね。Win だと大丈夫。Swing の問題だとは思うんだけど、対処法がないか模索中。</p>
<p>さて、どこまで出来るかな。</p>
]]></content:encoded>
			<wfw:commentRss>http://unbland.org/blog/2009/08/13/314.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>前回の四分木 (Quad Tree) の続き</title>
		<link>http://unbland.org/blog/2009/07/22/292.html</link>
		<comments>http://unbland.org/blog/2009/07/22/292.html#comments</comments>
		<pubDate>Wed, 22 Jul 2009 12:18:16 +0000</pubDate>
		<dc:creator>muta244@admin</dc:creator>
				<category><![CDATA[Flash (ActionScript)]]></category>
		<category><![CDATA[unbland as3 library]]></category>

		<guid isPermaLink="false">http://unbland.org/blog/?p=292</guid>
		<description><![CDATA[前回の四分木 (Quad Tree) の続き。
前回のデモは、衝突の可能性があるオブジェクト同士の関係を確認出来るものでしたが、今回は実際に接触しているかをチェックしています。こっちの方がイメージが湧き易いかな。
四分木 [...]]]></description>
			<content:encoded><![CDATA[<p>前回の<strong>四分木 (Quad Tree) </strong>の続き。</p>
<p>前回のデモは、衝突の可能性があるオブジェクト同士の関係を確認出来るものでしたが、今回は実際に接触しているかをチェックしています。こっちの方がイメージが湧き易いかな。</p>
<p><strong><a class="wpGallery mceItem" title="() の中のキーボードで色々と操作出来ます" rel="shadowbox[Mixed];width=640;height=360" href="http://unbland.org/blog/wp-content/uploads/2009/07/quadtree02.swf">四分木のデモ（※ 要 FlashPlayer 9）</a></strong></p>
<p>通常は灰色なオブジェクトが、他のオブジェクトに接触するとオレンジ色になります。</p>
<p>使い方はまたまた、今度・・・。</p>
]]></content:encoded>
			<wfw:commentRss>http://unbland.org/blog/2009/07/22/292.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>四分木で 2D の衝突判定を最適化</title>
		<link>http://unbland.org/blog/2009/07/21/274.html</link>
		<comments>http://unbland.org/blog/2009/07/21/274.html#comments</comments>
		<pubDate>Tue, 21 Jul 2009 14:27:10 +0000</pubDate>
		<dc:creator>muta244@admin</dc:creator>
				<category><![CDATA[Flash (ActionScript)]]></category>
		<category><![CDATA[unbland as3 library]]></category>

		<guid isPermaLink="false">http://unbland.org/blog/?p=274</guid>
		<description><![CDATA[今回は四分木 (Quad Tree) について。
オブジェクト同士の衝突判定を行う際、みなさんはどうしていますか？
一番最初に思い付く方法は衝突対象のオブジェクトを配列にでも入れて、総当たりで Sprite#hitTes [...]]]></description>
			<content:encoded><![CDATA[<p>今回は<strong>四分木 (Quad Tree) </strong>について。</p>
<p>オブジェクト同士の衝突判定を行う際、みなさんはどうしていますか？</p>
<p>一番最初に思い付く方法は衝突対象のオブジェクトを配列にでも入れて、総当たりで Sprite#hitTestObject() なんかで判定してしまおうという方法だと思います。この方法でも、対象のオブジェクト数が少なければ特に問題にはなりません。しかし対象のオブジェクト数が多かった場合、<strong>総当たりで計算を行うという方法では計算量が膨大</strong>になってしまい、とても現実的とは言えません。</p>
<p>Sprite#hitTestObject() などの衝突判定を行う前に、どうにか衝突の可能性があるオブジェクトを限定出来ないか？</p>
<p>そんな時には四分木を使えば計算量が減らせます。<br />
概念的には <strong><a href="http://yamasv.blog92.fc2.com/blog-entry-60.html">miscellaneous さんの「四分木」エントリー</a></strong>が参考になります。</p>
<p>四分木を構築する方法で一般的（？）なものは、空間全体をルートとし、2 x 2 の空間に分割しながらノードを構築するというもの。しかしながらこの方法、必ずしも計算量が減るわけではありません。なぜなら、<strong>衝突対象のオブジェクトを探すためにルートから該当部までノードをたどる必要があり、検索にもまた、計算コストが掛かってしまう</strong>からです。</p>
<p>じゃあ、どうすればいいのか？</p>
<p>その計算量を減らすため、四分木の構築方法は色々な方法が考え出されているようで、その中の一つに<strong>線形四分木</strong>というものがあります。概念的なものは、<strong><a href="http://marupeke296.com/COL_2D_No8_QuadTree.html">マルペケつくろードットコムさんの「その８ 4分木空間分割を最適化する！（理屈編）」</a></strong>がとても参考になります。このエントリーで書いてあることもほぼ受け売りです。</p>
<p>で、本題。今回自作ライブラリに線形四分木用のクラスを追加しました。これを使えば、<strong>四分木がどうこう考えなくても計算対象のオブジェクトを限定</strong>することが出来ます。その限定したオブジェクトに対して Sprite#hitTestObject() なんかを行えば、計算量も下がります。</p>
<p><strong><a class="wpGallery mceItem" title="() の中のキーボードで色々と操作出来ます" rel="shadowbox[Mixed];width=640;height=360" href="http://unbland.org/blog/wp-content/uploads/2009/07/quadtree01.swf">四分木のデモ（※ 要 FlashPlayer 9）</a></strong></p>
<p><strong>※ 描画部分は四分木とはまた別の部分なので最適化していません。あんまり円を増やしすぎると、総当たりに切り替えた時にかなり重くなりますので注意してください。</strong></p>
<p>デモはキーボードで各種操作を行え、四分木 <-> 総当たりの計算量比較が出来ます。オブジェクト同士を繋ぐ線は、衝突判定が必要なことを表しています。計算量がどれだけ減ったかを確認してみて下さい。</p>
<p>ソースは <strong><a href="http://bitbucket.org/muta244/unbland-as3-library/src/tip/examples/collision/src/classes/">Bitbucket に一式</a></strong>上げてますので、興味の有る方はどうぞ。<br />
使い方は後日、時間がある時にでも&#8230;。</p>
]]></content:encoded>
			<wfw:commentRss>http://unbland.org/blog/2009/07/21/274.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UITextArea クラスを作成</title>
		<link>http://unbland.org/blog/2009/05/24/270.html</link>
		<comments>http://unbland.org/blog/2009/05/24/270.html#comments</comments>
		<pubDate>Sun, 24 May 2009 05:04:21 +0000</pubDate>
		<dc:creator>muta244@admin</dc:creator>
				<category><![CDATA[Flash (ActionScript)]]></category>
		<category><![CDATA[unbland as3 library]]></category>

		<guid isPermaLink="false">http://unbland.org/blog/?p=270</guid>
		<description><![CDATA[前回の UITextField に引き続き、自作ライブラリに今度は UITextArea クラスを追加しました。
テキストエリアのデモ（※ 要 FlashPlayer 9）
前回の UITextField クラスのラッパ [...]]]></description>
			<content:encoded><![CDATA[<p>前回の UITextField に引き続き、自作ライブラリに今度は UITextArea クラスを追加しました。</p>
<p><a class="wpGallery mceItem" title="テキストエリア" rel="shadowbox[Mixed];width=460;height=260" href="http://unbland.org/blog/wp-content/uploads/2009/05/uitextarea.swf">テキストエリアのデモ（※ 要 FlashPlayer 9）</a></p>
<p>前回の UITextField クラスのラッパークラスで、スクロールが可能な UI を作成できます。</p>
<p>扱い方はサンプル [<a href="http://bitbucket.org/muta244/unbland-as3-library/src/ed0c709d5908/examples/ui/src/classes/UITextAreaDocument.as">ドキュメントコード</a> | <a href="http://bitbucket.org/muta244/unbland-as3-library/src/ed0c709d5908/examples/ui/src/classes/ui/TextArea.as">TextArea 実装コード</a> ] や <a href="http://unbland.org/library/as3/docs/org/unbland/ui/UITextArea.html">UITextArea の ASDoc</a> をご覧下さい。</p>
]]></content:encoded>
			<wfw:commentRss>http://unbland.org/blog/2009/05/24/270.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>自作ライブラリに UITextField クラスを追加</title>
		<link>http://unbland.org/blog/2009/05/19/263.html</link>
		<comments>http://unbland.org/blog/2009/05/19/263.html#comments</comments>
		<pubDate>Tue, 19 May 2009 14:08:52 +0000</pubDate>
		<dc:creator>muta244@admin</dc:creator>
				<category><![CDATA[Flash (ActionScript)]]></category>
		<category><![CDATA[unbland as3 library]]></category>

		<guid isPermaLink="false">http://unbland.org/blog/?p=263</guid>
		<description><![CDATA[自作ライブラリに UITextField クラスを追加しました。
テキストフィールドのデモ（※ 要 FlashPlayer 9）
このクラスを使用して、コンポーネントでいうところの TextInput と Label が [...]]]></description>
			<content:encoded><![CDATA[<p>自作ライブラリに UITextField クラスを追加しました。</p>
<p><a class="wpGallery mceItem" title="テキストフィールド" rel="shadowbox[Mixed];width=460;height=260" href="http://unbland.org/blog/wp-content/uploads/2009/05/uitextfield.swf">テキストフィールドのデモ（※ 要 FlashPlayer 9）</a></p>
<p>このクラスを使用して、コンポーネントでいうところの TextInput と Label が作成出来ます。標準コンポーネントでは、ダブルクリックやトリプルクリックした際のテキスト選択がおかしいですが、このクラスを使用して作成した UI では、内部で拡張したテキストフィールドを用いる事により、ダブルクリックで単語、トリプルクリックで段落を選択するように拡張されています。その他にもクリックやタブなどで最初にフォーカスが移った際にテキストを全選択する機能や、IME を制御する機能なども備えています。</p>
<p>詳しい扱い方はサンプル [<a href="http://bitbucket.org/muta244/unbland-as3-library/src/tip/examples/ui/src/UITextFieldDocument.as">ドキュメントコード</a> | <a href="http://bitbucket.org/muta244/unbland-as3-library/src/tip/examples/ui/src/ui/TextInput.as">TextInput 実装コード</a> | <a href="http://bitbucket.org/muta244/unbland-as3-library/src/tip/examples/ui/src/ui/Label.as">Label 実装コード</a> ] や <a href="http://unbland.org/library/as3/docs/org/unbland/ui/UITextField.html">UITextField の ASDoc</a> をご覧下さい。また、使ってみて変な所があれば、<a href="http://bitbucket.org/muta244/unbland-as3-library/issues/new/">Issue</a> にぜひ登録してください。</p>
]]></content:encoded>
			<wfw:commentRss>http://unbland.org/blog/2009/05/19/263.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ActionScript の最適化 Tips を wonderfl に投稿しました</title>
		<link>http://unbland.org/blog/2009/05/17/250.html</link>
		<comments>http://unbland.org/blog/2009/05/17/250.html#comments</comments>
		<pubDate>Sun, 17 May 2009 14:28:06 +0000</pubDate>
		<dc:creator>muta244@admin</dc:creator>
				<category><![CDATA[Flash (ActionScript)]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://unbland.org/blog/?p=250</guid>
		<description><![CDATA[ActionScript の最適化って色々なサイトに載っていますが、wonderfl にまとめて載っておくとコードと動きを同時に確認できるし、自分のためにも便利だと思って色々と投稿しました。コードへのリンクに個人的な私見 [...]]]></description>
			<content:encoded><![CDATA[<p>ActionScript の最適化って色々なサイトに載っていますが、wonderfl にまとめて載っておくとコードと動きを同時に確認できるし、自分のためにも便利だと思って色々と投稿しました。コードへのリンクに個人的な私見を加えてご紹介します。ただ、人によって意見が異なるかもしれないので、コードと動きを直接確認しておくことをお勧めします。この処理はおかしいんじゃないか？とかありましたらコメントください。</p>
<p><strong><a href="http://wonderfl.kayac.com/code/49f45692cecb031be5f851a5fb138c780896cf9b" target="_blank">変数名の長さによる処理速度の違い</a></strong></p>
<p>変数名の長さによる違いはありません。ですので変数名は、他の人が見やすい・自分が後で確認しても分かり易いような名前を付けておいた方が良いです。</p>
<p><strong><a href="http://wonderfl.kayac.com/code/1609eff6ec801f5674c69ef5178a8a72f5de6766" target="_blank">変数を参照する際の処理速度の違い</a></strong></p>
<p>上のコードでは _getPi <<< Math.PI <<< MyMath.PI = Main.PI < PI = _pi = ns::_pi = pi という結果で、ビルトインクラスのプロパティアクセスは若干重いので、ループ内で大量に参照する場合は変数に格納しておく方が良いです。また、getter アクセスの実態は関数ですので結構重いみたいです。MyMath.PI や Main.PI は、他の参照方法に比べると一階層下がるので若干重いですが、100 万回もループしての結果なので、あまり気にする必要はないんじゃないかと思います。ただ、注意事項が一つありますので「色々な整数化手段での処理速度の違い」も目を通しておいて下さい。</p>
<p><strong><a href="http://wonderfl.kayac.com/code/58b9fe83203fb49db603a1df15f39c6692219fdb" target="_blank">if &#8230; else と switch での処理速度の違い</a></strong></p>
<p>if &#8230; else 文は比較回数が少ない場合は軽いですが、比較回数が増えると switch 文の方が高速です。ただ、100 万回も処理させて数ミリ秒の違いですので、臨機応変に見やすい方を記述しておけば良いんじゃないかと思います。</p>
<p><strong><a href="http://wonderfl.kayac.com/code/2948ee85b515eec960753d311b1f9a6856d90474" target="_blank">色々な整数化手段での処理速度の違い</a></strong></p>
<p>Math.floor() が重いのは周知の事実。ただ、ローカル変数に格納したもので計算した場合は軽くなりそうなものの、逆に重くなるというのは以外だったと思います。これは先の「変数を参照する際の処理速度の違い」で Math.PI のようなプロパティを変数に格納しておく Tips と反して、ビルトインクラスのメソッドは逆に負担になりますので注意が必要です。そして本題の整数化では、n >> 0 などのビット演算で整数化する方が多いのですが、int(n) の方が高速だし見やすいのでお勧めです。</p>
<p><strong><a href="http://wonderfl.kayac.com/code/38488a88c1ecdfb66503b05c486106284bd1d39b" target="_blank">Array, Vector 走査時のイテレーション方法による処理速度の違い</a></strong></p>
<p>forEach は関数を実行するコストが掛かるのでやはり重いです。ただ、for each よりも for の方が高速なのは自分的にもビックリでした。倍速近い差が出るので、大量な処理の中で走査処理が必要な場合は for の方が良いかもしれません。もちろん、Array より Vector の方が高速です。</p>
<p><strong><a href="http://wonderfl.kayac.com/code/167a46753bdeff961d8a7c714df0b47c2aedda98" target="_blank">Array, Vector 走査時に加算を行う際の処理速度の違い</a></strong></p>
<p>これももちろん、Array より Vector の方が高速という結果に。ただ、Vector の長さを固定している方が高速になるかと思いきや、固定していなくても参照速度に差はないようです。</p>
<p><strong><a href="http://wonderfl.kayac.com/code/758263b96e8f2724f709020d1e561d43aad7d64a" target="_blank">オブジェクト生成による処理速度の違い</a></strong></p>
<p>new Object() より {}、new Array() より [] が高速というのは周知だと思います。あと、Vector の長さを指定すると最初に要素の初期化処理が入るようで、生成コストが高くなります。あとは Sprite の生成コストは当たり前のように高いです。独自クラスの生成は、処理が少なければ Object を生成するのとあまり変わりません。</p>
<p><strong><a href="http://wonderfl.kayac.com/code/6081e568795e00272a7da8c716e54341b478c009" target="_blank">サイン・コサインの取得方法による処理速度の違い</a></strong></p>
<p>予めサインテーブルを生成した後、ラジアンをテーブルのインデックスに変換して近似値を参照するというもの。かなりの高速化が期待できますが、取得できる値は近似値だという点に注意が必要です。3D での頂点処理などで大量のループ処理を行う際などに効果が期待できるかと思います。</p>
<p>今のところ試したコードはこんな感じです。これからも、他の最適化を思い付いたら wonderfl に投稿した後、ブログにエントリーしていきます。</p>
]]></content:encoded>
			<wfw:commentRss>http://unbland.org/blog/2009/05/17/250.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>今後の Flasher の身の振り方 &#8211; Scaleform GFx なんてどう？</title>
		<link>http://unbland.org/blog/2009/05/14/244.html</link>
		<comments>http://unbland.org/blog/2009/05/14/244.html#comments</comments>
		<pubDate>Thu, 14 May 2009 13:02:06 +0000</pubDate>
		<dc:creator>muta244@admin</dc:creator>
				<category><![CDATA[Flash (ActionScript)]]></category>

		<guid isPermaLink="false">http://unbland.org/blog/?p=244</guid>
		<description><![CDATA[今朝、メールチェックをしたら Scaleform の方からメールが来ていました。
ゲーム会社の人間でもないのにデベロッパー登録していたので、お叱りのメールかな？とビクビクしながらメールを開いてみたのですが内容は全然違った [...]]]></description>
			<content:encoded><![CDATA[<p>今朝、メールチェックをしたら <a href="https://www.scaleform.com/">Scaleform</a> の方からメールが来ていました。</p>
<p>ゲーム会社の人間でもないのにデベロッパー登録していたので、お叱りのメールかな？とビクビクしながらメールを開いてみたのですが内容は全然違ったもので、<a href="https://www.scaleform.com/products/gfx">Scaleform GFx</a> をゲーム業界だけでなく、Flash クリエイターと言われる人たちにも、ぜひ使ってみてほしいといったものでした。</p>
<p>Scaleform GFx について簡単に説明すると、Flash IDE と ActionScript 2.0 を用いて、ゲーム（PS3, XBox360, Wii, PC, PSP, PS2）用の UI などを制作出来るというものです。<a href="http://fladdict.net/blog/2009/05/scaleform.html">fladdict.net さんのエントリー</a>もご参考ください。</p>
<p>他の Flash を生業とされている方々の参考になればと思い、メールの内容を箇条掲載します。ブログへの掲載については快諾頂いてます。</p>
<p><strong>GFx についての内容</strong></p>
<ul>
<li>GFx の一般的なアプリケーションは 3D ゲーム内の 2D 表示部分。</li>
<li>主に、メニュー、テキスト表示、HUD などに使われている。</li>
<li>導入事例は国内では 20 ほど、海外に至っては 300 タイトル以上。</li>
<li>フルフラッシュのゲーム（あるいはゲームではないコンテンツ）をブラウザ以外のプラットフォームでプレイバックまたはプレイすることも可能。</li>
<li>現行の GFx3.0 で搭載された <a href="https://www.scaleform.com/products/clik">CLIK</a> では、海外の著名な Flasher である Grant Skinner 氏がゲーム用 UI のコンポーネントセットを作っている。</li>
<li>現在は AS2.0 のみの対応だが、将来的には AS3.0 への対応も視野に入っている（一年後くらいには？）。</li>
<li>海外ではゲーム業界とウェブ業界の垣根がなく人材の行き来が盛ん。</li>
<li>国内でも業界間での Flasher との垣根が取り払われて、相互の行き来が生じることでよりクリエイティブなものを産み出せれば。</li>
</ul>
<p><strong>国内での GFx 導入事例</strong></p>
<ul>
<li>「あいうえ・おーちゃん (Home Media)」WiiWare &#8211; 幼児用教育ゲームのフルフラッシュのコンテンツ。GFx2.2 で開発。</li>
<li>「NINJA BLADE (FromSoftware)」XBox360 &#8211; シネマティックアクションゲーム（映画を見ているようなアクションゲーム）。</li>
<li>「ガンダム無双2 (Bandai Namco/Developer Koei)」PS3/XBox360 &#8211; アクションゲーム。</li>
<li>「King of Fighters 12 (SNK Playmore)」アーケード &#8211; 格闘アクションゲーム。</li>
</ul>
<p><strong>海外での GFx 導入事例</strong></p>
<ul>
<li>「Crysis (Crytek)」PC &#8211; 一人称視点シューティングゲーム (FPS)。</li>
<li>「Crysis Warhead (Crytek)」PC &#8211; 一人称視点シューティングゲーム (FPS)。</li>
<li>「シヴィライゼーション レボリューション (Firaxis/2K games)」PS3/XBox360 &#8211; ターン制のシミュレーションゲーム。</li>
</ul>
<p>といった内容でした。</p>
<p>個人的には早く AS3.0 への対応が進めば嬉しい限りです。会社名義であれば試用目的でのデベロッパー登録も大丈夫との事でしたので、興味のある方はぜひ！</p>
]]></content:encoded>
			<wfw:commentRss>http://unbland.org/blog/2009/05/14/244.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>自作ライブラリのスクロールペインをバージョンアップ</title>
		<link>http://unbland.org/blog/2009/04/15/237.html</link>
		<comments>http://unbland.org/blog/2009/04/15/237.html#comments</comments>
		<pubDate>Wed, 15 Apr 2009 14:56:54 +0000</pubDate>
		<dc:creator>muta244@admin</dc:creator>
				<category><![CDATA[Flash (ActionScript)]]></category>
		<category><![CDATA[unbland as3 library]]></category>

		<guid isPermaLink="false">http://unbland.org/blog/?p=237</guid>
		<description><![CDATA[以前紹介したスクロールペインをホイール標準対応にしました。内部で JSModifier というクラスを使用することにより Mac のホイールにも標準対応しています。
今回のスクロールペインのデモ（※ 要 FlashPla [...]]]></description>
			<content:encoded><![CDATA[<p>以前紹介したスクロールペインをホイール標準対応にしました。内部で JSModifier というクラスを使用することにより Mac のホイールにも標準対応しています。</p>
<p><a class="wpGallery mceItem" title="今回のスクロールペイン" rel="shadowbox[Mixed];width=460;height=260" href="http://unbland.org/blog/wp-content/uploads/2009/04/uiscrollpaneexample02.swf">今回のスクロールペインのデモ（※ 要 FlashPlayer 9）</a></p>
<p>Firefox や Opera だと前回のものは、バーやコーナーをドラッグしたまま swf の領域外に持っていった状態でマウスボタンをリリースすると、領域内に戻っても引っ付いたままになってしまっていましたが、これも JSModifier クラスによって改善されています。前回のものも掲載しておきますので、両方を試してみて下さい。</p>
<p><a class="wpGallery mceItem" title="前回のスクロールペイン" rel="shadowbox[Mixed];width=460;height=260" href="http://unbland.org/blog/wp-content/uploads/2009/04/uiscrollpaneexample.swf">前回のスクロールペインのデモ（※ 要 FlashPlayer 9）</a></p>
<p>ちなみに JSModifier というクラスは何かというと、Mac のホイールを認識しない問題や、wmode を使用した際の不具合、その他ブラウザに起因する問題を JavaScript を用いて改善するクラスで、使い方は JSModifier.initialize(stage) するだけです。</p>
<p><a href="http://unbland.org/library/as3/docs/">ASDoc</a> をアップロードしてますので、どういった問題が改善されるかなどの詳しい情報は <a href="http://unbland.org/library/as3/docs/org/unbland/core/external/JSModifier.html">JSModifier の項</a>を参照して下さい。</p>
]]></content:encoded>
			<wfw:commentRss>http://unbland.org/blog/2009/04/15/237.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.555 seconds -->
