<?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>HYPERDASH BLOG++ &#187; ActionScript</title>
	<atom:link href="http://blog.hyperdash.com/category/dev/actionscript/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.hyperdash.com</link>
	<description>Digital, Design and Dev by HYPERDASH, MIDWARE from Tokyo Japan</description>
	<lastBuildDate>Mon, 01 Jun 2009 20:50:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>FlashDevelop 3.0.0 RC5でエディタのフォント変更</title>
		<link>http://blog.hyperdash.com/159</link>
		<comments>http://blog.hyperdash.com/159#comments</comments>
		<pubDate>Mon, 01 Jun 2009 20:50:18 +0000</pubDate>
		<dc:creator>HYPERDASH</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Dev]]></category>
		<category><![CDATA[FlashDevelop]]></category>

		<guid isPermaLink="false">http://blog.hyperdash.com/?p=159</guid>
		<description><![CDATA[いつの間にかRC4が出てて、そろそろ入れようかと思ったら、RC5がリリースされていました。
インストールをして、エディタのフォントを変更しようと思ったら、Program SettingsにUI Editor Fontが見 [...]]]></description>
			<content:encoded><![CDATA[<p>いつの間にかRC4が出てて、そろそろ入れようかと思ったら、RC5がリリースされていました。<br />
インストールをして、エディタのフォントを変更しようと思ったら、Program SettingsにUI Editor Fontが見当たらないし、以前のようにScintillaNET.xmlに記述してみても変わらないので、いろいろGooglingしてみたけれど有益な情報が見つからず。<br />
設定に絡んでそうなファイルを1つずつみていったら、どうやら\FlashDevelop\Settings\Languages以下の各言語ごとのXMLファイルのuse-stylesってノードで設定をする模様。<br />
font=&#8221;Courier New&#8221;をfont=&#8221;Meiryo&#8221;に書き換えて、無事エディタのフォント変更ができました。<br />
この辺りの設定はProgram Settingsからできた方がいい気が…。and ちょこちょこ設定周りの変更が入りつつ、頻繁なアップデートがあると、最新の状態を保ちつつ、設定を引き継ぐって作業に時間を取られることがだんだんとストレスになってきますね。。。<br />
便利なツールを提供してもらっているので、基本感謝しなければいけないんですけども。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hyperdash.com/159/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>addCommand内での参照</title>
		<link>http://blog.hyperdash.com/56</link>
		<comments>http://blog.hyperdash.com/56#comments</comments>
		<pubDate>Sat, 24 Jan 2009 09:31:58 +0000</pubDate>
		<dc:creator>HYPERDASH</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Progression]]></category>

		<guid isPermaLink="false">http://blog.hyperdash.com/?p=56</guid>
		<description><![CDATA[ProgressionのaddCommand内で、下記コードのように、AddChildする_mcのnewを同じaddCommand内のFuncコマンドで行うと、AddChildコマンド実行時の_mcがnullとなりエラー [...]]]></description>
			<content:encoded><![CDATA[<p>ProgressionのaddCommand内で、下記コードのように、AddChildする_mcのnewを同じaddCommand内のFuncコマンドで行うと、AddChildコマンド実行時の_mcがnullとなりエラーになってしまう。</p>
<div class="igBar"><span id="lactionscript-3"><a href="#" onclick="javascript:showPlainTxt('actionscript-3'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="actionscript-3">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009933; font-weight: bold;">private</span> <span style="color: #009933; font-weight: bold;">var</span> _mc:<span style="color: #0099CC;">MovieClip</span>;</div>
</li>
<li style="font-weight: bold;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009933; font-weight: bold;">private</span> <span style="color: #009933; font-weight: bold;">function</span> _init<span style="color: #333333;">&#40;</span><span style="color: #333333;">&#41;</span>:<span style="color: #009933; font-weight: bold;">void</span></div>
</li>
<li style="font-weight: bold;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #333333;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; _mc = <span style="color: #009933; font-weight: bold;">new</span> <span style="color: #0099CC;">MovieClip</span><span style="color: #333333;">&#40;</span><span style="color: #333333;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #333333;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009933; font-weight: bold;">protected</span> <span style="color: #009933; font-weight: bold;">override</span> <span style="color: #009933; font-weight: bold;">function</span> _onCastAdded<span style="color: #333333;">&#40;</span><span style="color: #333333;">&#41;</span>:<span style="color: #009933; font-weight: bold;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #333333;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; addCommand</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #333333;">&#40;</span></div>
</li>
<li style="font-weight: bold;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009933; font-weight: bold;">new</span> <span style="color: #0099CC;">Func</span><span style="color: #333333;">&#40;</span> _init <span style="color: #333333;">&#41;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009933; font-weight: bold;">new</span> <span style="color: #0099CC;">AddChild</span><span style="color: #333333;">&#40;</span> <span style="color: #0099CC;">this</span>, _mc <span style="color: #333333;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #333333;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #333333;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>タイミング的な問題なのか、スコープの問題なのか、いろいろ条件を変えて試してみたけど上手くいかずハマっていたので、Twitterで聞いてみたところ、『addCommand内の参照は、addCommandする時点の参照になる』と教えてもらうことができた。<br />
なるほど。<br />
addCommandした時点にnullなので、addCommand内のFuncコマンド内でnewしても、nullだった頃の_mcが参照されているということの模様。<br />
タイムマシン的。</p>
<p>次のように書き換えて解決。<br />
_onCastAdded時に_initメソッドでインスタンス化、_onCastRemoved時に（例えば）_finalメソッドで明示的にnullにしてメモリリークしないように気をつけようと思ったので、初期化処理から配置まで一連の流れをひとつのaddCommandに書けたらスッキリするのになぁと思いつつなのだけど。</p>
<div class="igBar"><span id="lactionscript-4"><a href="#" onclick="javascript:showPlainTxt('actionscript-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="actionscript-4">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009933; font-weight: bold;">private</span> <span style="color: #009933; font-weight: bold;">var</span> _mc:<span style="color: #0099CC;">MovieClip</span>;</div>
</li>
<li style="font-weight: bold;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009933; font-weight: bold;">private</span> <span style="color: #009933; font-weight: bold;">function</span> _init<span style="color: #333333;">&#40;</span><span style="color: #333333;">&#41;</span>:<span style="color: #009933; font-weight: bold;">void</span></div>
</li>
<li style="font-weight: bold;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #333333;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; _mc = <span style="color: #009933; font-weight: bold;">new</span> <span style="color: #0099CC;">MovieClip</span><span style="color: #333333;">&#40;</span><span style="color: #333333;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #333333;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009933; font-weight: bold;">protected</span> <span style="color: #009933; font-weight: bold;">override</span> <span style="color: #009933; font-weight: bold;">function</span> _onCastAdded<span style="color: #333333;">&#40;</span><span style="color: #333333;">&#41;</span>:<span style="color: #009933; font-weight: bold;">void</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #333333;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; _init<span style="color: #333333;">&#40;</span><span style="color: #333333;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; addCommand<span style="color: #333333;">&#40;</span> <span style="color: #009933; font-weight: bold;">new</span> <span style="color: #0099CC;">AddChild</span><span style="color: #333333;">&#40;</span> <span style="color: #0099CC;">this</span>, _mc <span style="color: #333333;">&#41;</span> <span style="color: #333333;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#444466;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #333333;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>ところで、解決方法を模索しているとき、Commandクラスにscopeというプロパティを見つけた。<br />
ASDocではtimeOutのコメントがコピペされていたｗ<br />
ソースを辿っていくと、Functionクラスのapplyメソッド第一引数に渡されているので、コマンドを別オブジェクトで実行できそう？<br />
コマンド伝播ができない場合に有効だったりしないかな？？<br />
時間があるときに検証してみたいと思う。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hyperdash.com/56/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
