<?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>nariyu-no-memo-cho</title>
	<atom:link href="http://blog.nariyu.jp/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.nariyu.jp</link>
	<description></description>
	<lastBuildDate>Wed, 21 Mar 2012 16:57:11 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>【田縣神社】豊年祭に行ってきた【ちんこ祭り】</title>
		<link>http://blog.nariyu.jp/2012/03/chinko2012/</link>
		<comments>http://blog.nariyu.jp/2012/03/chinko2012/#comments</comments>
		<pubDate>Tue, 20 Mar 2012 17:49:17 +0000</pubDate>
		<dc:creator>nariyu</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://blog.nariyu.jp/?p=103</guid>
		<description><![CDATA[毎年楽しみにしているのになぜか必ず直前で忘れてしまい今まで参加できなかった愛知県小牧市にある田縣神社のちんk豊年祭に行ってきました。 ちんこ祭r豊年祭は五穀繁栄と子孫繁栄を願って毎年3月15日に行われる祭事です。 外国人 [...]]]></description>
			<content:encoded><![CDATA[<p>毎年楽しみにしているのになぜか必ず直前で忘れてしまい今まで参加できなかった愛知県小牧市にある田縣神社の<del>ちんk</del>豊年祭に行ってきました。</p>
<p><del>ちんこ祭r</del>豊年祭は五穀繁栄と子孫繁栄を願って毎年3月15日に行われる祭事です。</p>
<p>外国人と女性グループがなぜか多いこのお祭り、SODファンとしては初めて参加するのになぜか既視感のある不思議なお祭りです。</p>
<p>何点か写真を撮ってきたのでご紹介↓</p>
<p><span id="more-103"></span></p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/e9f463c86e4411e1989612313815112c_7.jpg" alt="" title="e9f463c86e4411e1989612313815112c_7" width="612" height="612" class="size-full wp-image-113" /><br />
いきなりすみません。現地でもらったパンフレット。<br />
いやがおうにも期待が高まります。</p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2155-150x150.jpg" alt="" title="DSC_2155" width="150" height="150" class="size-thumbnail wp-image-116" /></p>
<p><span style="font-size: 1.2em"><strong>どん！</strong></span></p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2156-300x198.jpg" alt="" title="DSC_2156" width="300" height="198" class="size-medium wp-image-117" /></p>
<p><span style="font-size: 2em"><strong>どん！</strong></span></p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2157-1024x678.jpg" alt="" title="DSC_2157" width="940" height="622" class="size-large wp-image-118" /></p>
<p><span style="font-size: 3em"><strong>どん！</strong></span></p>
<p>そしてひときわ立派なちんこ↓</p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_21541-1024x498.jpg" alt="" title="DSC_2154" width="940" height="457" class="alignnone size-large wp-image-126" /></p>
<p>田縣神社は境内にあるあらゆるものがちんこです。</p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2172-1024x498.jpg" alt="" title="DSC_2172" width="940" height="457" class="alignnone size-large wp-image-125" /></p>
<p>なんていうんだろ。寄付した人の名前が記されたアレ。</p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2193-1024x498.jpg" alt="" title="DSC_2193" width="940" height="457" class="alignnone size-large wp-image-134" /></p>
<p>ちんこ。</p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2239-1024x498.jpg" alt="" title="DSC_2239" width="940" height="457" class="alignnone size-large wp-image-140" /></p>
<p>りっぱなちんこ。</p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2182-1024x498.jpg" alt="" title="DSC_2182" width="940" height="457" class="alignnone size-large wp-image-135" /></p>
<p>まんちん。</p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2237-1024x498.jpg" alt="" title="DSC_2237" width="940" height="457" class="alignnone size-large wp-image-139" /></p>
<p>ちんこに見えるものはとりあえず奉納してあります。<br />
ここまでくるとちん・・こ？って頭をひねりたくなるような。<br />
想像力が試されます。</p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2180-1024x532.jpg" alt="" title="DSC_2180" width="940" height="488" class="alignnone size-large wp-image-128" /></p>
<p>境内の祠にある。ちんこ。</p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2176-1024x498.jpg" alt="" title="DSC_2176" width="940" height="457" class="alignnone size-large wp-image-130" /></p>
<p>「玉さすり　賽銭入れて　珍となす」</p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2173-1024x498.jpg" alt="" title="DSC_2173" width="940" height="457" class="alignnone size-large wp-image-129" /></p>
<p>さする。</p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_22141-1024x501.jpg" alt="" title="DSC_2214" width="940" height="459" class="alignnone size-large wp-image-133" /></p>
<p>さする。</p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2196-1024x498.jpg" alt="" title="DSC_2196" width="940" height="457" class="alignnone size-large wp-image-136" /></p>
<p>奉納されたちんこたち。</p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2217-1024x507.jpg" alt="" title="DSC_2217" width="940" height="465" class="alignnone size-large wp-image-137" /></p>
<p>絵馬もちんこ。</p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2227-1024x498.jpg" alt="" title="DSC_2227" width="940" height="457" class="alignnone size-large wp-image-138" /></p>
<p>ジャラジャラする鐘もちんこ。</p>
<p>そして、いろいろ境内を観察していると場内放送で神輿行列の案内が。<br />
案内も外国人に配慮してすべてのアナウンスが日本語と英語の一組でされていました。</p>
<p>どうやらとなりの神社から神輿行列が出発して田縣神社に奉納されるらしいです。</p>
<p>アナウンスを聞いて人がどんどん集まってきます。増える増える見物人。</p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2309-1024x498.jpg" alt="" title="DSC_2309" width="940" height="457" class="alignnone size-large wp-image-141" /></p>
<p>ちんこ待ちの人びと。</p>
<p>そしてポジション取りして待つこと1時間強、、、</p>
<p>ついに神輿行列がやってきました。</p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2321-678x1024.jpg" alt="" title="DSC_2321" width="678" height="1024" class="alignnone size-large wp-image-144" /></p>
<p>まずやってきたのは大きな<del>ちんk</del>お鼻の天狗さん。</p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2332-678x1024.jpg" alt="" title="DSC_2332" width="678" height="1024" class="alignnone size-large wp-image-145" /></p>
<p>春画的リアリティの旗。</p>
<p>そして続いて巫女の行列です。</p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2349-678x1024.jpg" alt="" title="DSC_2349" width="678" height="1024" class="alignnone size-large wp-image-146" /></p>
<p>美人すぎる巫女（with ちんこ）。</p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2345-678x1024.jpg" alt="" title="DSC_2345" width="678" height="1024" class="alignnone size-large wp-image-147" /></p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2358-678x1024.jpg" alt="" title="DSC_2358" width="678" height="1024" class="alignnone size-large wp-image-148" /></p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2360-678x1024.jpg" alt="" title="DSC_2360" width="678" height="1024" class="alignnone size-large wp-image-149" /></p>
<p>そしてついにやってきた、神輿！</p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2369-1024x678.jpg" alt="" title="DSC_2369" width="940" height="622" class="alignnone size-large wp-image-150" /></p>
<p><strong style="font-size: 1.2em">わっしょい！</strong></p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2378-1024x678.jpg" alt="" title="DSC_2378" width="940" height="622" class="alignnone size-large wp-image-151" /></p>
<p><strong style="font-size: 1.2em">わっしょい！</strong></p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2380-1024x678.jpg" alt="" title="DSC_2380" width="940" height="622" class="alignnone size-large wp-image-152" /></p>
<p><strong style="font-size: 1.2em">わっしょい！</strong></p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2385-1024x678.jpg" alt="" title="DSC_2385" width="940" height="622" class="alignnone size-large wp-image-153" /></p>
<p><strong style="font-size: 1.2em">わっしょい！</strong></p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2389-1024x678.jpg" alt="" title="DSC_2389" width="940" height="622" class="alignnone size-large wp-image-154" /></p>
<p><strong style="font-size: 1.2em">わっしょい！</strong></p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2395-1024x678.jpg" alt="" title="DSC_2395" width="940" height="622" class="alignnone size-large wp-image-155" /></p>
<p><strong style="font-size: 1.2em">わっしょい！</strong></p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2402-1024x678.jpg" alt="" title="DSC_2402" width="940" height="622" class="alignnone size-large wp-image-156" /></p>
<p><strong style="font-size: 1.2em">わっしょい！</strong></p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2411-1024x678.jpg" alt="" title="DSC_2411" width="940" height="622" class="alignnone size-large wp-image-157" /></p>
<p><strong style="font-size: 1.2em">わっしょい！</strong></p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2415-1024x678.jpg" alt="" title="DSC_2415" width="940" height="622" class="alignnone size-large wp-image-159" /></p>
<p><strong style="font-size: 1.2em">わっしょい！</strong></p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_24171-1024x678.jpg" alt="" title="DSC_2417" width="940" height="622" class="alignnone size-large wp-image-172" /></p>
<p>納まるとき一段と大きく沸き上がる歓声。</p>
<p>「入る？入る？・・入ったー！！」</p>
<p>毎年新しい檜を削りだして造られる神輿はすごい迫力でした。</p>
<h3>おまけ</h3>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2427-678x1024.jpg" alt="" title="DSC_2427" width="678" height="1024" class="align none size-large wp-image-161" /></p>
<p>子宝に恵まれる<del>ペニバn</del>アイテムを付けられ写真を撮られまくる子ども。</p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_22211-1024x498.jpg" alt="" title="DSC_2221" width="940" height="457" class="align none size-large wp-image-163" /></p>
<p>祭りの名物のひとつ、ばなちん。（玉なし 300円、玉付き 400円）</p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2247-1024x498.jpg" alt="" title="DSC_2247" width="940" height="457" class="align none size-large wp-image-164" /></p>
<p>いたるところにばなちんを咥えて記念写真を撮る女の子がいっぱい。</p>
<p>自分はばなちん食べながら歩くのはやめて、ちんこ飴をたくさん買ってきました。</p>
<p>そして、最後は絶滅が危ぶまれる餅投げで終了ー。</p>
<p><img src="http://blog.nariyu.jp/wp-content/uploads/2012/03/DSC_2429-1024x498.jpg" alt="" title="DSC_2429" width="940" height="457" class="alignnone size-large wp-image-165" /></p>
<p>デカい外国人になぎ倒されながらなんとかふたつキャッチしました。</p>
<p>ちなみにお隣りの犬山市にある大縣神社の<del>まんk</del>豊年祭が対になっていて数年前は<del>まんちん</del>合同で催されたそうです。</p>
<p>おしまい。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nariyu.jp/2012/03/chinko2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[AS3][AIR] AIR for Android の nativePath の取得</title>
		<link>http://blog.nariyu.jp/2012/01/get-nativepath-from-air-for-android/</link>
		<comments>http://blog.nariyu.jp/2012/01/get-nativepath-from-air-for-android/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 19:41:52 +0000</pubDate>
		<dc:creator>nariyu</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://blog.nariyu.jp/?p=17</guid>
		<description><![CDATA[ActionScript 3.0 と Adobe AIR のお話しです。 ハマりどころなのでメモしておきますね。 AIR for Android でネイティブパスを取得する場合、 File.applicationStor [...]]]></description>
			<content:encoded><![CDATA[<p>ActionScript 3.0 と Adobe AIR のお話しです。<br />
ハマりどころなのでメモしておきますね。</p>
<p>AIR for Android でネイティブパスを取得する場合、 <code><strong>File.applicationStorageDirectory</strong></code> （プライベート記憶領域）と、 <code><strong>File.applicationDirectory</strong></code> （アプリケーションディレクトリ）で取得する方法を変える必要があるよってお話しです。</p>
<p><span id="more-17"></span></p>
<p>※ AIR 3.1 のお話しです。</p>
<h3>以下ちょっと長いので読むのが面倒な人は、、</h3>
<p>これだけ覚えておきましょう。</p>
<p>AIR for Android は アプリケーションディレクトリ（<code>File#applicationDirectory</code>）のファイルは「<code>/android_asset/ほにゃらら</code>」で、プライベート記憶領域（<code>File#applicationStorageDirectory</code>）のファイルは「<code>File.applicationStorageDirectory.resolvePath(ほにゃらら).nativePath</code>」になります。</p>
<p>URL にする場合は、それぞれ「<code>file:///android_asset/ほにゃらら</code></code>」と「<code>new File(File.applicationStorageDirectory.resolvePath(ほにゃらら).nativePath).url</code>」で取得できます。</p>
<p>以下は原因とかちょっと詳しい解説です。特に必要なければ読まなくてOK。</p>
<h3>File.applicationStorageDirectory （プライベート記憶領域）</h3>
<p><code>File.applicationStorageDirectory</code> のファイルは nativePath プロパティの値でネイティブパスが取得できます。</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>File<span style="color: #000066; font-weight: bold;">.</span>applicationStorageDirectory<span style="color: #000066; font-weight: bold;">.</span>resolvePath<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;example.html&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>nativePath<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>上のコードでは Android のプライベート記憶領域である「<code>/data/data/air.[アプリケーションID].debug/[アプリケーションID].debug/Local Store/example.html</code>」が取得できます。（デバッグ実行の場合）</p>
<h3>File.applicationDirectory （アプリケーションディレクトリ）</h3>
<p><code>File.applicationDirectory</code> の場合、なんと Android では <strong><code>nativePath</code> プロパティの値が正しく取得できません</strong>。</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>File<span style="color: #000066; font-weight: bold;">.</span>applicationDirectory<span style="color: #000066; font-weight: bold;">.</span>resolvePath<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;example.html&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>nativePath<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>上のコードは ""（空文字）になってしまいます。（<code>null</code> ではないです。）</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>File<span style="color: #000066; font-weight: bold;">.</span>applicationDirectory<span style="color: #000066; font-weight: bold;">.</span>nativePath<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>も同じです。<br />
※ AIR for iOS の場合は正しく取得できます。</p>
<ul>
<li>File.applicationDirectory.nativePath</li>
<li>File.applicationDirectory.resolvePath("example.html").nativePath</li>
</ul>
<p>どちらもKARA!</p>
<p>公式のドキュメントを見てもどこにも書いてないです。書いてあるかもしれないけど見つけられなかったです。</p>
<p>どうやら、<code>File.applicationDirectory</code> の場合のみ、<code>nativePath</code> プロパティの値を正しく取得することができないようです。<br />
エラーにもならないのでハマります。</p>
<p>※ <code>.resolvePath("example.html")</code> までは正常に処理されます。</p>
<h3>URL への変換</h3>
<p><code>StageWebView#loadURL(url:String)</code> にローカルの HTML ファイルを読み込ませるようなとき、<code><strong>File.applicationDirectory</strong></code> の場合は、</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">url</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;file:///android_asset/&quot;</span> <span style="color: #000066; font-weight: bold;">+</span> <span style="color: #990000;">&quot;example.html&quot;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>として、</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #990000;">&quot;file:///android_asset/example.html&quot;</span></pre></div></div>

<p>のような URL を作成します。</p>
<p><code><strong>File.applicationStorageDirectory</strong></code> の場合は、</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">url</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #0033ff; font-weight: bold;">new</span> File<span style="color: #000000;">&#40;</span>File<span style="color: #000066; font-weight: bold;">.</span>applicationStorageDirectory<span style="color: #000066; font-weight: bold;">.</span>resolvePath<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;example.html&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>nativePath<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">url</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>とすることで</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #990000;">&quot;file:///data/data/air.[アプリケーションID].debug/[アプリケーションID].debug/Local Store/example.html&quot;</span></pre></div></div>

<p>のような URL が作成できます。これを StageWebView 等に読み込ませれば OK。</p>
<h3>まとめ</h3>
<p>まとめると次のようなコードになります。</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #009900; font-style: italic;">// ↓ このファイルを取得したい！</span>
<span style="color: #6699cc; font-weight: bold;">var</span> fileName<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;example.html&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #009900; font-style: italic;">// 取得する URL 文字列</span>
<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">url</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #009900; font-style: italic;">// File.applicationStorageDirectory の中のファイルなら...</span>
<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#91;</span>applicationStoregeDirectory の場合<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #004993;">url</span> = <span style="color: #0033ff; font-weight: bold;">new</span> File<span style="color: #000000;">&#40;</span>File<span style="color: #000066; font-weight: bold;">.</span>applicationStorageDirectory<span style="color: #000066; font-weight: bold;">.</span>resolvePath<span style="color: #000000;">&#40;</span>fileName<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>nativePath<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">url</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #009900; font-style: italic;">// File.applicationDirectory の中のファイルなら...</span>
<span style="color: #0033ff; font-weight: bold;">else</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #009900; font-style: italic;">// Android 端末なら...</span>
    <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>isAndroid<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        <span style="color: #004993;">url</span> = <span style="color: #990000;">&quot;file:///android_asset/&quot;</span> <span style="color: #000066; font-weight: bold;">+</span> fileName<span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #009900; font-style: italic;">// Android 端末以外なら...</span>
    <span style="color: #0033ff; font-weight: bold;">else</span>
    <span style="color: #000000;">&#123;</span>
        <span style="color: #004993;">url</span> = <span style="color: #0033ff; font-weight: bold;">new</span> File<span style="color: #000000;">&#40;</span>File<span style="color: #000066; font-weight: bold;">.</span>applicationDirectory<span style="color: #000066; font-weight: bold;">.</span>resolvePath<span style="color: #000000;">&#40;</span>fileName<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>nativePath<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">url</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #009900; font-style: italic;">// StageWebView に読み込ませてしまえ</span>
<span style="color: #6699cc; font-weight: bold;">var</span> webView<span style="color: #000066; font-weight: bold;">:</span>StageWebView = <span style="color: #0033ff; font-weight: bold;">new</span> StageWebView<span style="color: #000066; font-weight: bold;">;</span>
webView<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stage</span> = <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">;</span>
webView<span style="color: #000066; font-weight: bold;">.</span>viewport = <span style="color: #004993;">rect</span><span style="color: #000066; font-weight: bold;">;</span>
webView<span style="color: #000066; font-weight: bold;">.</span>loadURL<span style="color: #000000;">&#40;</span><span style="color: #004993;">url</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<h3>もうひとつまとめ</h3>
<h4>File.applicationDirectory</h4>
<div class="table-wrapper">
<pre><code>File.applicationDirectory.url</code>
    → <code><strong>"app:/"</strong></code>

<code>File.applicationDirectory.nativePath</code>
    → <code><strong>""</strong></code>（空文字）

<code>File.applicationDirectory.resolvePath("example.html").url</code>
    → <code><strong>"app:/example.html"</strong></code>

<code>File.applicationDirectory.resolvePath("example.html").nativePath</code>
    → <code><strong>""</strong></code>（空文字）

<code>"file:///android_asset/example.html"</code>
    → <code><strong>"file:///android_asset/example.html"</strong></code></pre>
</div>
<h4>File.applicationStorageDirectory</h4>
<div class="table-wrapper">
<pre><code>File.applicationStorageDirectory.url</code>
    → <code><strong>app-storage:/</strong></code>

<code>File.applicationStorageDirectory.nativePath</code>
    → <code><strong>/data/data/air.[アプリケーションID].debug/[アプリケーションID].debug/Local Store</strong></code>

<code>File.applicationStorageDirectory.resolvePath("example.html").url</code>
    → <code><strong>app-storage:/example.html</strong></code>

<code>File.applicationStorageDirectory.resolvePath("example.html").nativePath</code>
    → <code><strong>/data/data/air.[アプリケーションID].debug/[アプリケーションID].debug/Local Store/example.html</strong></code>

<code>new File(File.applicationStorageDirectory.resolvePath("example.html").nativePath).url</code>
    → <code><strong>file:///data/data/air.[アプリケーションID].debug/[アプリケーションID].debug/Local%20Store/example.html</strong></code></pre>
</div>
<p>さて、なんでこんな面倒なことになってんでしょう？</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nariyu.jp/2012/01/get-nativepath-from-air-for-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>こんちは</title>
		<link>http://blog.nariyu.jp/2012/01/hello-world/</link>
		<comments>http://blog.nariyu.jp/2012/01/hello-world/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 13:06:23 +0000</pubDate>
		<dc:creator>nariyu</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://blog.nariyu.jp/?p=1</guid>
		<description><![CDATA[またブログでもはじめてみようかと。 前のブログはなかったことにしようかと。]]></description>
			<content:encoded><![CDATA[<p>またブログでもはじめてみようかと。<br />
前のブログはなかったことにしようかと。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nariyu.jp/2012/01/hello-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

