<?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/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>RuputerFan &#187; Progression</title>
	<atom:link href="http://sygnas.jp/tag/progression/feed/" rel="self" type="application/rss+xml" />
	<link>http://sygnas.jp</link>
	<description>萌え産業とFlashの覚え書きサイト</description>
	<lastBuildDate>Sat, 04 Sep 2010 14:01:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://sygnas.jp/tag/progression/feed/" />
		<item>
		<title>FlashCS4 + Progression4でAdobeAIRアプリ</title>
		<link>http://sygnas.jp/2010/07/04/flashcs4_progression_air/</link>
		<comments>http://sygnas.jp/2010/07/04/flashcs4_progression_air/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 19:46:11 +0000</pubDate>
		<dc:creator>ダダ</dc:creator>
				<category><![CDATA[PC・デジタル]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Progression]]></category>

		<guid isPermaLink="false">http://sygnas.jp/?p=650</guid>
		<description><![CDATA[作ろうとしたらProgressionプロジェクトの新規作成のところで何故かAdobeAIRが選べない。
おかしいなーと思いつつAdobe Flash Support Centerから
Adobe Flash CS4 Pr [...]]]></description>
			<content:encoded><![CDATA[<p>作ろうとしたらProgressionプロジェクトの新規作成のところで何故かAdobeAIRが選べない。</p>
<p>おかしいなーと思いつつAdobe Flash Support Centerから<br />
<a href="http://www.adobe.com/support/flash/downloads.html#flashCS4"><strong>Adobe Flash CS4 Professional Update (10.0.2)　05/13/2009 </strong></a><br />
を落としてきてインストールしたら選べるようになりました。</p>
<p>あれ？前に作ったのってマシン環境新しくする前だったっけ？</p>
]]></content:encoded>
			<wfw:commentRss>http://sygnas.jp/2010/07/04/flashcs4_progression_air/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://sygnas.jp/2010/07/04/flashcs4_progression_air/" />
	</item>
		<item>
		<title>Progressionのコマンドで分岐</title>
		<link>http://sygnas.jp/2010/03/06/progression4command/</link>
		<comments>http://sygnas.jp/2010/03/06/progression4command/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 15:28:10 +0000</pubDate>
		<dc:creator>ダダ</dc:creator>
				<category><![CDATA[PC・デジタル]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Progression]]></category>

		<guid isPermaLink="false">http://sygnas.jp/?p=477</guid>
		<description><![CDATA[コマンドリストを実行している時、
途中のコマンドの結果によって分岐させたい時の方法。

var hogeCommand:HogeCommand = new HogeCommand();
var serial:Serial [...]]]></description>
			<content:encoded><![CDATA[<p>コマンドリストを実行している時、<br />
途中のコマンドの結果によって分岐させたい時の方法。</p>
<pre class="brush:as3">
var hogeCommand:HogeCommand = new HogeCommand();
var serial:SerialList = new SerialList();

serial.addCommand( hogeCommand );

serial.addCommand( new Func( function():void {
	// コマンドの結果で分岐
	if ( hogeCommand.value ) {
		serial.insertCommand( new Trace("コマンドを挟む"));
	}
}));

serial.execute();
</pre>
<p>HogeCommandクラスの実行結果を受け取りたいので<br />
インスタンスを先に作っておきます。</p>
<pre class="brush:as3; first-line:1">
var hogeCommand:HogeCommand = new HogeCommand();
</pre>
<p>今回のキモ「insertCommand」です。<br />
これにより動的にコマンドを挿入させることができます。</p>
<pre class="brush:as3; first-line:6">
	// コマンドの結果で分岐
	if ( hogeCommand.value ) {
		serial.insertCommand( new Trace("コマンドを挟む"));
	}
</pre>
<p>このやり方については<a href="http://www.northprint.net/2008/11/post-83.html">Is It So Easy?さんが詳しく書かれています。</a><br />
<a href="http://level0.kayac.com/2009/06/progressioncommandlistcommand.php">this.parentで挿入することも出来るんですねー。</a></p>
<table  border="0" cellpadding="5">
<tr>
<td valign="top"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4861006678/ruputerfan-22/ref=nosim/" target="_blank"><img src="http://ecx.images-amazon.com/images/I/41khsbMBb8L._SL160_.jpg" border="0" alt="[改訂版]ActionScript3.0プログラミング入門 for Adobe Flash CS4/CS3" /></a></td>
<td valign="top"><font size="-1"><a href="http://www.amazon.co.jp/%E6%94%B9%E8%A8%82%E7%89%88-ActionScript3-0%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0%E5%85%A5%E9%96%80-Adobe-Flash-CS4/dp/4861006678%3FSubscriptionId%3D15SMZCTB9V8NGR2TW082%26tag%3Druputerfan-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D4861006678" target="_blank">[改訂版]ActionScript3.0プログラミング入門 for Adobe Flash CS4/CS3</a><img src='http://www.assoc-amazon.jp/e/ir?t=ruputerfan-22&#038;l=ur2&#038;o=9' width='1' height='1' border='0' alt='' /></p>
<p>ビー・エヌ・エヌ新社  2009-07-23<br />売り上げランキング : 79902</p>
<p><a href="http://www.amazon.co.jp/%E6%94%B9%E8%A8%82%E7%89%88-ActionScript3-0%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0%E5%85%A5%E9%96%80-Adobe-Flash-CS4/dp/4861006678%3FSubscriptionId%3D15SMZCTB9V8NGR2TW082%26tag%3Druputerfan-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D4861006678" target="_blank">Amazonで詳しく見る</a></font> <font size="-2">by <a href="http://www.goodpic.com/mt/aws/index.html" >G-Tools</a></font></td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://sygnas.jp/2010/03/06/progression4command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://sygnas.jp/2010/03/06/progression4command/" />
	</item>
		<item>
		<title>Progression4のリソース系で謎のエラー</title>
		<link>http://sygnas.jp/2010/03/02/progression4error/</link>
		<comments>http://sygnas.jp/2010/03/02/progression4error/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 20:17:09 +0000</pubDate>
		<dc:creator>ダダ</dc:creator>
				<category><![CDATA[PC・デジタル]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Progression]]></category>

		<guid isPermaLink="false">http://sygnas.jp/?p=458</guid>
		<description><![CDATA[いったい何がキッカケだったのかまったくわからないけど、ある日突然出てきたエラー。

Resource.as、行 44
1004: 名前空間が見つからないか、コンパイル時定数ではありません。
progression_int [...]]]></description>
			<content:encoded><![CDATA[<p>いったい何がキッカケだったのかまったくわからないけど、ある日突然出てきたエラー。</p>
<blockquote><p>
Resource.as、行 44<br />
1004: 名前空間が見つからないか、コンパイル時定数ではありません。<br />
progression_internal static const $collection:IdGroupCollection = new IdGroupCollection();
</p></blockquote>
<p>いろいろ試して、音声ファイルがリンケージされていると発生することがわかりました。<br />
下記のようにごく一般的なファイルを普通にリンケージしただけえす。</p>
<blockquote><p>
ファイル：testse.wav<br />
クラス：testse<br />
基本クラス：flash.media.Sound
</p></blockquote>
<p>「最初のフレームに書き出し」のチェックを外すとエラーは出ません。</p>
<p>しかし上記チェックを外すわけにもいかず色々試していたら、<br />
Index.asに下記の行を追加したらエラーが出なくなりました。</p>
<pre class="brush:as3">
function hogehoge():void {
	getResourceById("hoge").data;
}
</pre>
<p>この関数はどこからも呼ばれませんが、記述しておくだけで良いようです。</p>
<p>バグなのか仕様なのかはわかりませんが、<a href="http://forum.progression.jp/index.php?topic=309.0">公式のフォーラムに報告しておきました。</a></p>
<table  border="0" cellpadding="5">
<tr>
<td valign="top"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/488337646X/ruputerfan-22/ref=nosim/" target="_blank"><img src="http://ecx.images-amazon.com/images/I/41NXXyu0FeL._SL160_.jpg" border="0" alt="ActionScript 3.0 エラーアーカイブス コンパイルエラー・コンパイラ警告・ランタイムエラーの解法" /></a></td>
<td valign="top"><font size="-1"><a href="http://www.amazon.co.jp/ActionScript-%E3%82%A8%E3%83%A9%E3%83%BC%E3%82%A2%E3%83%BC%E3%82%AB%E3%82%A4%E3%83%96%E3%82%B9-%E3%82%B3%E3%83%B3%E3%83%91%E3%82%A4%E3%83%AB%E3%82%A8%E3%83%A9%E3%83%BC%E3%83%BB%E3%82%B3%E3%83%B3%E3%83%91%E3%82%A4%E3%83%A9%E8%AD%A6%E5%91%8A%E3%83%BB%E3%83%A9%E3%83%B3%E3%82%BF%E3%82%A4%E3%83%A0%E3%82%A8%E3%83%A9%E3%83%BC%E3%81%AE%E8%A7%A3%E6%B3%95-%E5%8A%A0%E8%8C%82%E9%9B%84%E4%BA%AE-%E6%A0%AA%E5%BC%8F%E4%BC%9A%E7%A4%BE%E3%83%AD%E3%82%AF%E3%83%8A%E3%83%8A/dp/488337646X%3FSubscriptionId%3D15SMZCTB9V8NGR2TW082%26tag%3Druputerfan-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D488337646X" target="_blank">ActionScript 3.0 エラーアーカイブス コンパイルエラー・コンパイラ警告・ランタイムエラーの解法</a><img src='http://www.assoc-amazon.jp/e/ir?t=ruputerfan-22&#038;l=ur2&#038;o=9' width='1' height='1' border='0' alt='' /><br />大重美幸 </p>
<p>ソシム  2009-09-09<br />売り上げランキング : 83197<br />おすすめ平均  <img src="http://g-images.amazon.com/images/G/01/detail/stars-5-0.gif" /></p>
<p><a href="http://www.amazon.co.jp/ActionScript-%E3%82%A8%E3%83%A9%E3%83%BC%E3%82%A2%E3%83%BC%E3%82%AB%E3%82%A4%E3%83%96%E3%82%B9-%E3%82%B3%E3%83%B3%E3%83%91%E3%82%A4%E3%83%AB%E3%82%A8%E3%83%A9%E3%83%BC%E3%83%BB%E3%82%B3%E3%83%B3%E3%83%91%E3%82%A4%E3%83%A9%E8%AD%A6%E5%91%8A%E3%83%BB%E3%83%A9%E3%83%B3%E3%82%BF%E3%82%A4%E3%83%A0%E3%82%A8%E3%83%A9%E3%83%BC%E3%81%AE%E8%A7%A3%E6%B3%95-%E5%8A%A0%E8%8C%82%E9%9B%84%E4%BA%AE-%E6%A0%AA%E5%BC%8F%E4%BC%9A%E7%A4%BE%E3%83%AD%E3%82%AF%E3%83%8A%E3%83%8A/dp/488337646X%3FSubscriptionId%3D15SMZCTB9V8NGR2TW082%26tag%3Druputerfan-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D488337646X" target="_blank">Amazonで詳しく見る</a></font> <font size="-2">by <a href="http://www.goodpic.com/mt/aws/index.html" >G-Tools</a></font></td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://sygnas.jp/2010/03/02/progression4error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://sygnas.jp/2010/03/02/progression4error/" />
	</item>
		<item>
		<title>Progressionで複数ファイルをまとめて読む</title>
		<link>http://sygnas.jp/2010/02/21/progressionloaderlist/</link>
		<comments>http://sygnas.jp/2010/02/21/progressionloaderlist/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 22:32:36 +0000</pubDate>
		<dc:creator>ダダ</dc:creator>
				<category><![CDATA[PC・デジタル]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Progression]]></category>

		<guid isPermaLink="false">http://sygnas.jp/?p=431</guid>
		<description><![CDATA[Progressionのリソースキャッシュと、複数ファイル読み込みの組み合わせが
便利すぎて思わず漏らしてしまいそうです（ﾁｮﾛﾘ）。あっ。
外部画像を読み込んで一覧表示させるものを作ってまして、
各サムネイル内で読み込 [...]]]></description>
			<content:encoded><![CDATA[<p>Progressionのリソースキャッシュと、複数ファイル読み込みの組み合わせが<br />
便利すぎて思わず漏らしてしまいそうです（ﾁｮﾛﾘ）。あっ。</p>
<p>外部画像を読み込んで一覧表示させるものを作ってまして、<br />
各サムネイル内で読み込むようにしてたんですが、<br />
最初にまとめて読むように変更しました。</p>
<p>というのも、リソースキャッシュのおかげで<br />
画像の流用がすごく簡単に行えるようになったからです。</p>
<h4><a href="http://sygnas.jp/2010/02/13/progression4resourc/">Progression4で外部ファイルの使い回しを簡単に 》 RuputerFan</a></h4>
<p>リソースキャッシュについては以前かいたこの日記を参照。</p>
<p><span id="more-431"></span></p>
<p>複数ファイルの読み込みにはProgressionが<a href="http://asdoc.progression.jp/4.0/jp/progression/commands/lists/LoaderList.html">LoaderList</a>というクラスを用意しています。</p>
<pre class="brush:as3">
// 読み込む画像一覧
var list:Array = [
	{id:"img_a", url:a.jpg"},
	{id:"img_b", url:b.jpg"},
	{id:"img_c", url:c.jpg"},
];
// 複数ファイル読み込み管理
var loadList:LoaderList = new LoaderList();

// 読み込み開始
loadList.onStart = function():void {
	trace( "まとめて読んじゃうわよ！" );
}
// 読み込み中
loadList.onProgress = function():void {
	trace( this.percent,"%" );
}
// 読み込み完了
loadList.onComplete = function():void{
	trace( "終わったわよ！" );
};
// まとめて読み込み指定
for ( var i:int = 0; i &lt; list.length; i++ ) {
	loadList.addCommand(
		new LoadBitmapData( new URLRequest(list[i].url), {
			cacheAsResource:true, context:new LoaderContext(true),
			resGroup:"images", resId:list[i].id
		} )
	);
}
// 読み込み開始
loadList.execute();
</pre>
<p>こんな感じにまとめて読み込みます。<br />
読み込みにはLoadBitmapData、LoadSound、LoadSWF、LoadURLなどが使えます。</p>
<h3>あるとないとの違い</h3>
<p>普通は画像一覧を作る場合、<br />
個々のローダークラスに完了後の処理を書きます。</p>
<pre class="brush:as3">
var bmpLoad1:LoadBitmapData( new URLRequest("a.jpg") );
bmpLoad1.addEventListener( LoadBitmapData.ExecuteEvent, onComplete );

var loadList:LoaderList = new LoaderList();
loadList.addCommand( bmpLoad1 );
</pre>
<p>しかしリソースキャッシュ機構を組み合わせることで、<br />
個々の終了後の処理は不要になります。<br />
resIdパラメータを指定すれば後からその名前で呼び出せるからです。</p>
<pre class="brush:as3">
	loadList.addCommand(
		new LoadBitmapData( new URLRequest(list[i].url), {
			cacheAsResource:true, context:new LoaderContext(true),
			resGroup:"images", resId:list[i].id
		} )
	);
</pre>
<pre class="brush:as3">
var bmp:Bitmap = new Bitmap( getResourceById("img_a").data );
</pre>
<p>複数ファイルのロード管理は<a href="http://casalib.org/">CASA Lib</a>でも同様のものがありますが、<br />
ProgressionのLoaderListを使う利点はリソースキャッシュにあると思います。</p>
<h3>要望というか</h3>
<p>LoaderListに要望を出すとしたら並列読み込みのサポートでしょうか。</p>
<p>順次読み込みのほうが回線を圧迫せずにすみますが、<br />
大量にファイルがある場合にやっぱり遅いんですよね。</p>
<p>並列指定も出来ると嬉しいなと。</p>
<p>突然カップヌードルが食べたくなったので貼ってみる。意味はありません。</p>
<table  border="0" cellpadding="5">
<tr>
<td valign="top"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/B001D7J924/ruputerfan-22/ref=nosim/" target="_blank"><img src="http://ecx.images-amazon.com/images/I/41ompohWgbL._SL160_.jpg" border="0" alt="カップヌードル" /></a></td>
<td valign="top"><font size="-1"><a href="http://www.amazon.co.jp/%E3%82%AB%E3%83%83%E3%83%97%E3%83%8C%E3%83%BC%E3%83%89%E3%83%AB/dp/B001D7J924%3FSubscriptionId%3D15SMZCTB9V8NGR2TW082%26tag%3Druputerfan-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB001D7J924" target="_blank">カップヌードル</a><img src='http://www.assoc-amazon.jp/e/ir?t=ruputerfan-22&#038;l=ur2&#038;o=9' width='1' height='1' border='0' alt='' /></p>
<p>売り上げランキング : 71860<br />おすすめ平均  <img src="http://g-images.amazon.com/images/G/01/detail/stars-4-0.gif" /></p>
<p><a href="http://www.amazon.co.jp/%E3%82%AB%E3%83%83%E3%83%97%E3%83%8C%E3%83%BC%E3%83%89%E3%83%AB/dp/B001D7J924%3FSubscriptionId%3D15SMZCTB9V8NGR2TW082%26tag%3Druputerfan-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB001D7J924" target="_blank">Amazonで詳しく見る</a></font> <font size="-2">by <a href="http://www.goodpic.com/mt/aws/index.html" >G-Tools</a></font></td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://sygnas.jp/2010/02/21/progressionloaderlist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://sygnas.jp/2010/02/21/progressionloaderlist/" />
	</item>
		<item>
		<title>ProgressionのURLアンカー遷移を無効にする</title>
		<link>http://sygnas.jp/2010/02/20/progressionurl/</link>
		<comments>http://sygnas.jp/2010/02/20/progressionurl/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 18:22:51 +0000</pubDate>
		<dc:creator>ダダ</dc:creator>
				<category><![CDATA[PC・デジタル]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Progression]]></category>

		<guid isPermaLink="false">http://sygnas.jp/?p=427</guid>
		<description><![CDATA[Progressionが備えているURLアンカー（URLの後の「#～」）によるページ遷移は
フルFlashサイトを作る際にはとても便利で素晴らしいのですが、
ブログパーツやメニューのみFlashにしている場合は誤動作の原 [...]]]></description>
			<content:encoded><![CDATA[<p>Progressionが備えているURLアンカー（URLの後の「#～」）によるページ遷移は<br />
フルFlashサイトを作る際にはとても便利で素晴らしいのですが、<br />
ブログパーツやメニューのみFlashにしている場合は誤動作の原因になる場合もあります。</p>
<p>今日まさにそれでハマっていたので対処法をメモっておきます。</p>
<p>ドキュメントクラス「Index.as」内の下記の箇所を書き換えれば<br />
無効にすることができます。</p>
<pre class="brush:as3">
protected override function atReady():void {
//	manager.sync = true;
	manager.sync = false;

//	manager.goto( manager.syncedSceneId );
	manager.goto( new SceneId('/index') );
}
</pre>
<p><strong>manager.sync</strong>というプロパティが関係するらしいので「false」にします。</p>
<p><strong>manager.syncedSceneId</strong>もURLアンカーによる場所が格納されているぽいので、<br />
移動先も強制的に「/index」にしてしまいます。</p>
<p>もっとエレガントな方法もありそうですが、とりあえずこれで対処できました。</p>
<table  border="0" cellpadding="5">
<tr>
<td valign="top"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/B001RCU29Y/ruputerfan-22/ref=nosim/" target="_blank"><img src="http://ecx.images-amazon.com/images/I/51Cllp3z9ZL._SL160_.jpg" border="0" alt="リトルアンカー(限定版)" /></a></td>
<td valign="top"><font size="-1"><a href="http://www.amazon.co.jp/D3-Publisher-658032-%E3%83%AA%E3%83%88%E3%83%AB%E3%82%A2%E3%83%B3%E3%82%AB%E3%83%BC-%E9%99%90%E5%AE%9A%E7%89%88/dp/B001RCU29Y%3FSubscriptionId%3D15SMZCTB9V8NGR2TW082%26tag%3Druputerfan-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB001RCU29Y" target="_blank">リトルアンカー(限定版)</a><img src='http://www.assoc-amazon.jp/e/ir?t=ruputerfan-22&#038;l=ur2&#038;o=9' width='1' height='1' border='0' alt='' /></p>
<p>D3PUBLISHER  2009-04-23<br />売り上げランキング : 7802<br />おすすめ平均  <img src="http://g-images.amazon.com/images/G/01/detail/stars-3-5.gif" /></p>
<p><a href="http://www.amazon.co.jp/D3-Publisher-658032-%E3%83%AA%E3%83%88%E3%83%AB%E3%82%A2%E3%83%B3%E3%82%AB%E3%83%BC-%E9%99%90%E5%AE%9A%E7%89%88/dp/B001RCU29Y%3FSubscriptionId%3D15SMZCTB9V8NGR2TW082%26tag%3Druputerfan-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB001RCU29Y" target="_blank">Amazonで詳しく見る</a></font> <font size="-2">by <a href="http://www.goodpic.com/mt/aws/index.html" >G-Tools</a></font></td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://sygnas.jp/2010/02/20/progressionurl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://sygnas.jp/2010/02/20/progressionurl/" />
	</item>
		<item>
		<title>Progression4で外部ファイルの使い回しを簡単に</title>
		<link>http://sygnas.jp/2010/02/13/progression4resourc/</link>
		<comments>http://sygnas.jp/2010/02/13/progression4resourc/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 19:29:50 +0000</pubDate>
		<dc:creator>ダダ</dc:creator>
				<category><![CDATA[PC・デジタル]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Progression]]></category>

		<guid isPermaLink="false">http://sygnas.jp/?p=396</guid>
		<description><![CDATA[Progression4から搭載されたResource関連がとても便利なのでメモ。
これまでも外部ファイル（swf、画像、mp3など）を読み込んで使い回す
ということは出来ましたが、それなりに手間がかかりました。
Pro [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://progression.jp/ja/download/prerelease/">Progression4</a>から搭載されたResource関連がとても便利なのでメモ。</p>
<p>これまでも外部ファイル（swf、画像、mp3など）を読み込んで使い回す<br />
ということは出来ましたが、それなりに手間がかかりました。</p>
<p>Progression4からはそれらを管理するResource系のクラスが登場し、<br />
かなりシンプルになったようです。</p>
<p><a href="http://blog.inasiantime.com/?p=276">michinoko blog</a>さんで書かれていたことを参考に書いてみました。</p>
<p><span id="more-396"></span></p>
<pre class="brush:as3">
package{
import flash.display.Bitmap;
import flash.display.Sprite;
import flash.net.URLRequest;
import flash.system.LoaderContext;
import jp.progression.commands.lists.SerialList;
import jp.progression.commands.Func;
import jp.progression.commands.net.LoadBitmapData;
import jp.progression.data.getResourceById;

public class MyLoadImage extends Sprite{

	public var _id:String;		// リソース格納ID

	/*********************
	 * 外部画像読み込み
	 */
	public function MyLoadImage( url:String, group:String, id:String ){
		_id = id;

		var serial:SerialList = new SerialList();

		// 画像読み込んでキャッシュに格納
		serial.addCommand( new LoadBitmapData( new URLRequest(url), {
			cacheAsResource:true, context:new LoaderContext(true),
			resGroup:group, resId:id
		}));

		// 貼り付け
		serial.addCommand( new Func( attachBitmap ));

		serial.execute();
	}

	/*********************
	 * 画像貼り付け
	 */
	protected function attachBitmap():void {
		// リソースからid指定で画像を取り出す
		var bmp:Bitmap = new Bitmap( getResourceById(_id).data );
		// 貼り付け
		this.addChild( bmp );
	}
}
}
</pre>
<p>こんな感じでSpriteのサブクラスを作っておいて下記のように呼び出します。<br />
※動作確認してません。</p>
<pre class="brush:as3">
var loadImage:MyLoadImage = new MyLoadImage( "hoge.jpg", "images", "image0" );
this.addChild( loadImage );
</pre>
<p>例えばこのSpriteをクリックした時に、<br />
idを取得して画像を再利用するなんてことも簡単にできますね。</p>
<pre class="brush:as3">
protected function onImageClick( e:MouseEvent ):void{
	var id:String = e.currentTarget._id;
	var bmpdata:BitmapData = getResourceById(id).data;

	～取り出したBitmapDataを再利用～
}
</pre>
<p>Progressionのこういった便利ライブラリはとても重宝しています。<br />
開発者の方々に心から感謝！！！</p>
<ul>
<li><a href="http://level0.kayac.com/2009/10/progression4_resource.php">Progression4の新機能Resourceを試してみる | エントリー | _level0.KAYAC</a></li>
<li><a href="http://blog.inasiantime.com/?p=276">michinoko blog ? getResourceByIdとgetResourcesByGroup</a></li>
<li><a href="http://oshige.com/flash/as3study/2009/10/loaderlistgroup.html">LoadBitmapDataのgroupプロパティ &#8211; ActionScript3学習ノート</a></li>
</ul>
<h3>Progression4のバージョンに注意</h3>
<p>上記サンプルでは「resGroup」、「resId」でグループ、IDを指定していますが、<br />
これらは<strong>「4.0.1 Public Beta 1.3」から使えるようになります</strong>。</p>
<p>自分は1.2だったのでハマりましたｗ</p>
<p>1.3からはWebConfig()の引数も変わったので注意が必要です。<br />
自分はIndex.asで下記のように指定しています。</p>
<pre class="brush:as3">
// 1.2の場合
super( "index", IndexScene,
	new WebConfig( false, false, false ) );
↓
// 1.3の場合
super( "index", IndexScene,
	new WebConfig( "basicLibraryLicense", false, false, false ) );
</pre>
<table  border="0" cellpadding="5">
<tr>
<td valign="top"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4881666940/ruputerfan-22/ref=nosim/" target="_blank"><img src="http://ecx.images-amazon.com/images/I/41cN9vfNSZL._SL160_.jpg" border="0" alt="Adobe Flash CS4 詳細!ActionScript3.0入門ノート[完全改訂版](CD-ROM付)" /></a></td>
<td valign="top"><font size="-1"><a href="http://www.amazon.co.jp/Adobe-Flash-ActionScript3-0%E5%85%A5%E9%96%80%E3%83%8E%E3%83%BC%E3%83%88-%E5%AE%8C%E5%85%A8%E6%94%B9%E8%A8%82%E7%89%88-CD-ROM%E4%BB%98/dp/4881666940%3FSubscriptionId%3D15SMZCTB9V8NGR2TW082%26tag%3Druputerfan-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D4881666940" target="_blank">Adobe Flash CS4 詳細!ActionScript3.0入門ノート[完全改訂版](CD-ROM付)</a><img src='http://www.assoc-amazon.jp/e/ir?t=ruputerfan-22&#038;l=ur2&#038;o=9' width='1' height='1' border='0' alt='' /></p>
<p>ソーテック社  2009-08-01<br />売り上げランキング : 9363<br />おすすめ平均  <img src="http://g-images.amazon.com/images/G/01/detail/stars-4-5.gif" /></p>
<p><a href="http://www.amazon.co.jp/Adobe-Flash-ActionScript3-0%E5%85%A5%E9%96%80%E3%83%8E%E3%83%BC%E3%83%88-%E5%AE%8C%E5%85%A8%E6%94%B9%E8%A8%82%E7%89%88-CD-ROM%E4%BB%98/dp/4881666940%3FSubscriptionId%3D15SMZCTB9V8NGR2TW082%26tag%3Druputerfan-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D4881666940" target="_blank">Amazonで詳しく見る</a></font> <font size="-2">by <a href="http://www.goodpic.com/mt/aws/index.html" >G-Tools</a></font></td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://sygnas.jp/2010/02/13/progression4resourc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://sygnas.jp/2010/02/13/progression4resourc/" />
	</item>
		<item>
		<title>Progression：カスタムコマンドを使おう(2)</title>
		<link>http://sygnas.jp/2010/02/03/progression%ef%bc%9a%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%82%92%e4%bd%bf%e3%81%8a%e3%81%862-2/</link>
		<comments>http://sygnas.jp/2010/02/03/progression%ef%bc%9a%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%82%92%e4%bd%bf%e3%81%8a%e3%81%862-2/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 20:22:58 +0000</pubDate>
		<dc:creator>ダダ</dc:creator>
				<category><![CDATA[PC・デジタル]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Progression]]></category>

		<guid isPermaLink="false">http://sygnas.jp/?p=277</guid>
		<description><![CDATA[今回は簡単なカスタムコマンドを作ってみます。




var attributes = {};
var flashvars = {};
var params = {};
swfobject.embedSWF("http: [...]]]></description>
			<content:encoded><![CDATA[<p>今回は簡単なカスタムコマンドを作ってみます。</p>
<div class="imgBox">
<div id="flashCustomCommand2_100203_2"></div>
</div>
<p><script language="JavaScript" type="text/javascript">
var attributes = {};
var flashvars = {};
var params = {};
swfobject.embedSWF("http://sygnas.jp/content/flash/customcommand2/sample_hokuto.swf?update=20090831_2059", "flashCustomCommand2_100203_2", "400", "300", "9.0.45","", flashvars, params, attributes);
</script></p>
<p><span id="more-277"></span></p>
<h3>カスタムコマンドのテンプレートをコピーする</h3>
<p>プロジェクトを作成すると「templates」フォルダに様々なテンプレートが作成されます。<br />
「src」フォルダに「MyCommand.as」を複製し、名前を「HokutoCommand.as」に変更します。</p>
<p>※本当は「classes」などのフォルダを作ってまとめたほうが良いのですが割愛します。</p>
<div class="pie-gallery">
<div class="pie-item">
<div class="pie-img-wrapper"><img src="http://lh5.ggpht.com/_TVHmE_WLwoo/S2iGuDtck5I/AAAAAAAAD5Q/pBU48hKRTzI/DProgressionTestsrc%2020100203%2050930.jpg" alt="DProgressionTestsrc 20100203 50930.jpg" class="pie-img"/></div>
</div>
</div>
<p>中身はこんな感じになっています（余計なコメントは消しています。）</p>
<pre class="brush:as3">
package {
	import jp.progression.casts.*;
	import jp.progression.commands.display.*;
	import jp.progression.commands.lists.*;
	import jp.progression.commands.net.*;
	import jp.progression.commands.tweens.*;
	import jp.progression.commands.*;
	import jp.progression.data.*;
	import jp.progression.events.*;
	import jp.progression.scenes.*;

	public class MyCommand extends Command {

		public function MyCommand( initObject:Object = null ) {
			super( _execute, _interrupt, initObject );
		}

		private function _execute():void {
			executeComplete();
		}

		private function _interrupt():void {
		}

		public override function clone():Command {
			return new MyCommand( this );
		}
	}
}
</pre>
<h3>カスタムコマンドを記述する</h3>
<p>それでは北斗百烈拳ならぬ、北斗十烈拳を繰り出すコマンドに書き換えます。<br />
「MyCommand」になっている箇所を「HokutoCommand」に書き換えたり、いろいろ。</p>
<pre class="brush:as3">
package {
	import flash.display.DisplayObjectContainer;
	import flash.display.MovieClip;
	import jp.progression.commands.*;
	import jp.progression.commands.lists.SerialList;

	public class HokutoCommand extends Command {

		private var $myStage:DisplayObjectContainer;

		/*******************************
		 * コンストラクタ
		 * @param	myStage		「あた！」の配置先
		 */
		public function HokutoCommand( myStage:DisplayObjectContainer, initObject:Object = null ) {
			super( _execute, _interrupt, initObject );
			$myStage = myStage;
		}

		/*******************************
		 * 処理実行
		 */
		private function _execute():void {

			// 直列実行コマンド
			var serialList:SerialList = new SerialList();

			// 「あた！」を配置して 0.2秒待つをくり返す
			serialList.addCommand( new Func( addAta ));
			serialList.addCommand( new Wait( 0.2 ));
			～略～
			serialList.addCommand( new Func( addAta ));
			serialList.addCommand( new Wait( 0.2 ));

			// カスタムコマンド終了関数
			serialList.addCommand( new Func( executeComplete ));

			// 終了処理
			serialList.addCommand( new Func( _endExec ));

			// 直列処理開始
			serialList.execute();
		}

		/*******************************
		 * 「あた！」を配置する関数
		 */
		private function addAta():void {

			// ata_mcをランダム位置に貼りつける
			var mc:MovieClip = new ata_mc();
			mc.x = (Math.random() * 300) + 50;
			mc.y = (Math.random() * 200) + 50;

			$myStage.addChild( mc );
		}

		/*******************************
		 * 終了処理
		 */
		private _endExec():void {
			$myStage = null;
		}

		/*******************************
		 * 処理中断
		 */
		private function _interrupt():void {
			// 中断時は終了と同じことをさせる
			_endExec();
		}

		/*******************************
		 * 複製
		 */
		public override function clone():Command {
			return new HokutoCommand( $myStage, this );
		}
	}
}
</pre>
<h3>ポイントの説明</h3>
<p>長く見えるかもしれませんがやってることはいたって単純。</p>
<pre class="brush:as3;first-line:15">
		/*******************************
		 * コンストラクタ
		 * @param	myStage		「あた！」の配置先
		 */
		public function HokutoCommand( myStage:DisplayObjectContainer, initObject:Object = null ) {
			super( _execute, _interrupt, initObject );
			$myStage = myStage;
		}
</pre>
<p>コンストラクタでは「あた！」を配置させる場所を保存しているだけです。<br />
initObjectと、super()は定型文と思ってそのままにしてください。</p>
<pre class="brush:as3;first-line:28">
			// 「あた！」を配置して 0.2秒待つをくり返す
			serialList.addCommand( new Func( addAta ));
			serialList.addCommand( new Wait( 0.2 ));
</pre>
<p>SerialListは直列処理を実現してくれるクラスです。<br />
Funcクラスは関数を実行するためだけのものです。Commandクラスを継承しています。<br />
addAta()内で「あた！」を配置し、Waitクラスで0.2秒待機させています。</p>
<pre class="brush:as3;first-line:35">
			// カスタムコマンド終了関数
			serialList.addCommand( new Func( executeComplete ));
</pre>
<p>executeComplete()はとても大切な関数で、<br />
カスタムコマンドの処理が完了したことを上位オブジェクトに通知します。<br />
これを実行しないと上位オブジェクトは次の処理に移りません。</p>
<pre class="brush:as3;first-line:38">
			// 終了処理
			serialList.addCommand( new Func( _endExec ));
</pre>
<pre class="brush:as3;first-line:58">
		/*******************************
		 * 終了処理
		 */
		private _endExec():void {
			$myStage = null;
		}
</pre>
<p>executeComplete()で終了の通知は行きますが、<br />
その後は自分でキレイに掃除しなくてはいけません。<br />
やらなくても構いませんがメモリリークの原因になります。</p>
<p>_endExec()（名前は任意）は中断処理でも呼ばれます。<br />
コマンドが中断された際も掃除をしておかないとメモリリークの原因になります。</p>
<pre class="brush:as3;first-line:65">
		/*******************************
		 * 処理中断
		 */
		private function _interrupt():void {
			// 中断時は終了と同じことをさせる
			_endExec();
		}
</pre>
<p>clone()は同じパラメータを与えられたコマンドを複製しますが、<br />
まぁほとんど使うことはないと思います。<br />
コンストラクタと同じ関数名、引数を与えればよいです。</p>
<pre class="brush:as3;first-line:73">
		/*******************************
		 * 複製
		 */
		public override function clone():Command {
			return new HokutoCommand( $myStage, this );
		}
</pre>
<h3>カスタムコマンドで守るべきこと</h3>
<p>実際の処理を書く_execute()と、終了処理を書く_endExec()以外は<br />
ほとんどテンプレートのままで、クラス名にあわせてコンストラクタ名や<br />
引数が変わるくらいです。<br />
（上記２つの関数名は任意）</p>
<p>大切なことは、<strong>処理が終わったらexecuteComplete()を実行</strong>すること。</p>
<p><strong>その後に終了処理をする</strong>ということです。<br />
executeComplete()は終了を通知するだけの、いわばdispatchEvent()のようなものです。</p>
<h3>カスタムコマンドの呼び出しかた</h3>
<p>それでは実際にカスタムコマンドを使ってみましょう。<br />
「IndexScene.as」から呼び出します。</p>
<pre class="brush:as3">
～略～
		/*********************************
		 * ボタン押した
		 */
		private function _onClick( e:MouseEvent ):void {

			// 北斗十烈拳を実行した後、「終わった」を表示
			var serialList:SerialList = new SerialList();
			serialList.addCommand(
				new HokutoCommand( this.container ),
				new Func( _owatta )
			);
			serialList.execute();
		}

		/*********************************
		 * 終わったァ！
		 */
		private function _owatta():void {
			var owatta:MovieClip = new owatta_mc();
			owatta.x = 200;
			owatta.y = 150;

			this.container.addChild( owatta );
		}
～略～
</pre>
<p>めちゃくちゃシンプルです。<br />
カスタムコマンドを実行しているのはこの行だけ。<br />
「あた！」を配置する場所を指定しています。<br />
initObjectは不要です。</p>
<pre class="brush:as3;first-line:10">
				new HokutoCommand( this.container ),
</pre>
<h3>コンパイルしてみよう</h3>
<div class="imgBox">
<div id="flashCustomCommand2_100203_1"></div>
</div>
<p><script language="JavaScript" type="text/javascript">
var attributes = {};
var flashvars = {};
var params = {};
swfobject.embedSWF("http://sygnas.jp/content/flash/customcommand2/sample_hokuto.swf?update=20090831_2059", "flashCustomCommand2_100203_1", "400", "300", "9.0.45","", flashvars, params, attributes);
</script></p>
<p>「北斗十烈拳」をクリックすると始まります。</p>
<p>今回のソースファイルをアップしましたので、試してみたい方はどうぞ。<br />
※他の環境で動作するかはテストしてません。</p>
<ul>
<li><a href="http://sygnas.jp/content/flash/customcommand2/sample_hokuto.zip">カスタムコマンド「北斗十烈拳」をダウンロードする。</a></li>
</ul>
<table  border="0" cellpadding="5">
<tr>
<td valign="top"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4881666940/ruputerfan-22/ref=nosim/" target="_blank"><img src="http://ecx.images-amazon.com/images/I/41cN9vfNSZL._SL160_.jpg" border="0" alt="Adobe Flash CS4 詳細!ActionScript3.0入門ノート[完全改訂版](CD-ROM付)" /></a></td>
<td valign="top"><font size="-1"><a href="http://www.amazon.co.jp/Adobe-Flash-ActionScript3-0%E5%85%A5%E9%96%80%E3%83%8E%E3%83%BC%E3%83%88-%E5%AE%8C%E5%85%A8%E6%94%B9%E8%A8%82%E7%89%88-CD-ROM%E4%BB%98/dp/4881666940%3FSubscriptionId%3D15SMZCTB9V8NGR2TW082%26tag%3Druputerfan-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D4881666940" target="_blank">Adobe Flash CS4 詳細!ActionScript3.0入門ノート[完全改訂版](CD-ROM付)</a><img src='http://www.assoc-amazon.jp/e/ir?t=ruputerfan-22&#038;l=ur2&#038;o=9' width='1' height='1' border='0' alt='' /></p>
<p>ソーテック社  2009-08-01<br />売り上げランキング : 15546<br />おすすめ平均  <img src="http://g-images.amazon.com/images/G/01/detail/stars-4-5.gif" /></p>
<p><a href="http://www.amazon.co.jp/Adobe-Flash-ActionScript3-0%E5%85%A5%E9%96%80%E3%83%8E%E3%83%BC%E3%83%88-%E5%AE%8C%E5%85%A8%E6%94%B9%E8%A8%82%E7%89%88-CD-ROM%E4%BB%98/dp/4881666940%3FSubscriptionId%3D15SMZCTB9V8NGR2TW082%26tag%3Druputerfan-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D4881666940" target="_blank">Amazonで詳しく見る</a></font> <font size="-2">by <a href="http://www.goodpic.com/mt/aws/index.html" >G-Tools</a></font></td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://sygnas.jp/2010/02/03/progression%ef%bc%9a%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%82%92%e4%bd%bf%e3%81%8a%e3%81%862-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://sygnas.jp/2010/02/03/progression%ef%bc%9a%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%82%92%e4%bd%bf%e3%81%8a%e3%81%862-2/" />
	</item>
		<item>
		<title>Progression：カスタムコマンドを使おう(1)</title>
		<link>http://sygnas.jp/2010/02/02/progression%ef%bc%9a%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%82%92%e4%bd%bf%e3%81%8a%e3%81%861/</link>
		<comments>http://sygnas.jp/2010/02/02/progression%ef%bc%9a%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%82%92%e4%bd%bf%e3%81%8a%e3%81%861/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 19:46:04 +0000</pubDate>
		<dc:creator>ダダ</dc:creator>
				<category><![CDATA[PC・デジタル]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Progression]]></category>

		<guid isPermaLink="false">http://sygnas.jp/?p=270</guid>
		<description><![CDATA[僕の周りでもProgressionを使い始めている知人がいるのですが、
カスタムコマンドの作り方がよくわからないという人が多いようです。
僕も最初はよくわからなかったのですが、理解してみると
カスタムコマンド無しには制作 [...]]]></description>
			<content:encoded><![CDATA[<p>僕の周りでも<a href="http://progression.jp/ja/">Progression</a>を使い始めている知人がいるのですが、<br />
カスタムコマンドの作り方がよくわからないという人が多いようです。</p>
<p>僕も最初はよくわからなかったのですが、理解してみると<br />
<strong>カスタムコマンド無しには制作ができない</strong><br />
と思ってしまうくらいに便利なものです。</p>
<p>Progressionを使い始めて2ヶ月の身ですが<br />
（しかも本来Progressionを使う目的であるシーン管理とかは全く使っていないｗ）<br />
自分なりに理解していることを数回にわけてまとめてみようと思います。</p>
<p>なお本記事で扱うProgressionのバージョンは「<strong>4.0.1 Public Beta 1.3</strong>」です。</p>
<p>Progressionに興味があるけど最初の一歩が分からないという方は<br />
本家のチュートリアルをご覧になると良いと思います（Ver3対象ですが）。<br />
実に分かりやすく書かれていて、このチュートリアルがあったからこそ<br />
僕もProgressionに手を出すことが出来ました。</p>
<ul>
<li><a href="http://progression.jp/ja/download/prerelease/#download">Progression &#8211; Framework for Flash &gt; Progression 4 Public Beta</a></li>
<li><a href="http://progression.jp/ja/doc/">Progression &#8211; Framework for Flash &gt; ドキュメント</a></li>
</ul>
<p><span id="more-270"></span></p>
<h3>カスタムコマンドってなに？</h3>
<p>Progressionの魅力のひとつに「直列処理の簡単さ」が挙げられます。</p>
<p>直列処理について説明すると長くなるので<br />
本記事に限定した内容でものすごく簡単に説明すると、<br />
<strong>処理Ａが終わるのを待ってから処理Ｂを行う</strong><br />
というものです（だいぶ語弊がありますがｗ）。</p>
<p>例えば……</p>
<blockquote><p>
外部の画像Ａを読む<br />
→読み終わったらSpriteに貼りつける<br />
→貼ったらフェードインさせる<br />
→フェードイン完了したらマウスイベントに反応させる
</p></blockquote>
<p>これを普通に書くとaddEventListenerであちこちに飛び回ることになり、<br />
ソースの見通しが非常に悪くなります。</p>
<p>これらの処理をひとつのクラスとしてまとめたものを<br />
カスタムコマンドと言います。</p>
<p>次の記事では実際に簡単なカスタムコマンドを作ってみます。<br />
眠くなってきたので（現在深夜４時）今日はこのへんでｗ</p>
<table  border="0" cellpadding="5">
<tr>
<td valign="top"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/B002GCGJ1O/ruputerfan-22/ref=nosim/" target="_blank"><img src="http://ecx.images-amazon.com/images/I/512rkaSlQDL._SL160_.jpg" border="0" alt="Web Designing (ウェブデザイニング) 2009年 08月号 [雑誌]" /></a></td>
<td valign="top"><font size="-1"><a href="http://www.amazon.co.jp/Web-Designing-%E3%82%A6%E3%82%A7%E3%83%96%E3%83%87%E3%82%B6%E3%82%A4%E3%83%8B%E3%83%B3%E3%82%B0-2009%E5%B9%B4-08%E6%9C%88%E5%8F%B7/dp/B002GCGJ1O%3FSubscriptionId%3D15SMZCTB9V8NGR2TW082%26tag%3Druputerfan-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB002GCGJ1O" target="_blank">Web Designing (ウェブデザイニング) 2009年 08月号 [雑誌]</a><img src='http://www.assoc-amazon.jp/e/ir?t=ruputerfan-22&#038;l=ur2&#038;o=9' width='1' height='1' border='0' alt='' /></p>
<p>毎日コミュニケーションズ  2009-07-18<br />売り上げランキング : <br />おすすめ平均  <img src="http://g-images.amazon.com/images/G/01/detail/stars-4-0.gif" /></p>
<p><a href="http://www.amazon.co.jp/Web-Designing-%E3%82%A6%E3%82%A7%E3%83%96%E3%83%87%E3%82%B6%E3%82%A4%E3%83%8B%E3%83%B3%E3%82%B0-2009%E5%B9%B4-08%E6%9C%88%E5%8F%B7/dp/B002GCGJ1O%3FSubscriptionId%3D15SMZCTB9V8NGR2TW082%26tag%3Druputerfan-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB002GCGJ1O" target="_blank">Amazonで詳しく見る</a></font> <font size="-2">by <a href="http://www.goodpic.com/mt/aws/index.html" >G-Tools</a></font></td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://sygnas.jp/2010/02/02/progression%ef%bc%9a%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%82%92%e4%bd%bf%e3%81%8a%e3%81%861/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://sygnas.jp/2010/02/02/progression%ef%bc%9a%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%82%92%e4%bd%bf%e3%81%8a%e3%81%861/" />
	</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->