<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>AS blind side</title>
    <link rel="alternate" type="text/html" href="http://www.c-geru.com/as_blind_side/" />
    <link rel="self" type="application/atom+xml" href="http://www.c-geru.com/as_blind_side/atom.xml" />
    <id>tag:www.c-geru.com,2009-11-07:/as_blind_side//2</id>
    <updated>2012-01-27T17:32:53Z</updated>
    <subtitle>ActionScriptの疑問、気づいたことなど個人的な備忘録と、同じ疑問を持ったFlashユーザーのために。</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.26</generator>

<entry>
    <title>iPhone開発用の証明書を再作成</title>
    <link rel="alternate" type="text/html" href="http://www.c-geru.com/as_blind_side/2012/01/iphone.html" />
    <id>tag:www.c-geru.com,2012:/as_blind_side//2.62</id>

    <published>2012-01-27T15:30:16Z</published>
    <updated>2012-01-27T17:32:53Z</updated>

    <summary>Flash BuilderでAIR for iOSのテストしようとしたら、p12...</summary>
    <author>
        <name>c-geru</name>
        
    </author>
    
        <category term="iPhone" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="AIR" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="AIR for iOS" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.c-geru.com/as_blind_side/">
        <![CDATA[Flash BuilderでAIR for iOSのテストしようとしたら、p12の証明書ファイルがドコにあるのかわからず...。<div><br /></div><div>で、下記の対処で解決。</div><div><br /></div><div><ol><li>キーチェーンアクセスを起動。</li><li>キーチェーン；ログイン、分類；自分の証明書を選択。</li><li>iPhone Developer証明書の中にある秘密鍵を選択。</li><li>ファイル＞書き出す</li></ol></div><div><br /></div><div>で、.p12のファイルが作れます。これを読み込ませてOK。</div><div>Xcodeだと一回設定してそのままなので、ちょっと焦りました。</div><div><br /></div><div>自分用メモとして。</div><div><br /></div>]]>
        
    </content>
</entry>

<entry>
    <title>QuickBox2Dの衝突判定とビット単位の論理積</title>
    <link rel="alternate" type="text/html" href="http://www.c-geru.com/as_blind_side/2011/12/quickbox2d.html" />
    <id>tag:www.c-geru.com,2011:/as_blind_side//2.61</id>

    <published>2011-12-03T17:58:04Z</published>
    <updated>2011-12-03T19:15:01Z</updated>

    <summary>今更ながら周りの影響で、QucikBox2Dをいじってます。@alumican_...</summary>
    <author>
        <name>c-geru</name>
        
    </author>
    
        <category term="AS3.0" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="QuickBox2D" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="演算子" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.c-geru.com/as_blind_side/">
        <![CDATA[<div>今更ながら周りの影響で、QucikBox2Dをいじってます。<a href="https://twitter.com/#!/alumican_net">@alumican_net</a> さんが書かれたブログがわかりやすいので拝見してますが、<a href="http://blog.alumican.net/2009/07/05_024440">『 QuickBox2DやBox2DFlashAS3での衝突判定をグループ分け 』</a>という記事で以下のような記述がありました。</div><div><br /></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div>自分と何かが衝突するかどうかは、自分のmaskBitsと相手のcategoryBitsの論理積をとって計算できる。結果が0なら衝突しない、0以外なら衝突する。</div></blockquote><div><br /></div><div>普段あまり使わないので「論理積ってなに？」って状態だったんで調べてみると、大重美幸さんの<a href="http://oshige.com/flash/as3note/2007/05/25.html">ActionScript3.0入門ノート</a>にわかりやすい解説がありました。</div><div><br /></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; font-size: 12px; line-height: 18px; ">ビット単位の論理和では値を２進数に換算して各ビットごとに比較し、どちらかが1ならば1にします。たとえば、6（２進数で110）と5（２進数で101）のビット単位の論理和は7（111）になります。同様にビット単位の論理積では両方が1のときに1にし一方が0ならば0にします。6と5のビット単位の論理積は4（100）になります。<br />２進数における桁のシフトは２のn階乗で変化します。次のサンプルで使われているrgbToHex()はRGBの各色の値から0xFFFFFFの形式の16進数に変換する関数です。</span></div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; font-size: 12px; line-height: 18px; "><br /></span></div></blockquote><font class="Apple-style-span" face="'trebuchet ms', verdana, helvetica, arial, sans-serif" size="2"><span class="Apple-style-span" style="line-height: 18px;">なるほど！ということで、実際に計算してみました。</span></font><div><font class="Apple-style-span" face="'trebuchet ms', verdana, helvetica, arial, sans-serif" size="2"><span class="Apple-style-span" style="line-height: 18px;"><br /></span></font></div><div><font class="Apple-style-span" face="'trebuchet ms', verdana, helvetica, arial, sans-serif" size="2"><span class="Apple-style-span" style="line-height: 18px; ">・</span></font><span class="Apple-style-span" style="color: rgb(255, 48, 48); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">●</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">と</span><span class="Apple-style-span" style="color: rgb(48, 144, 48); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">▲</span></div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">maskBits:0x0007（0111） &amp; &nbsp;categoryBits:0x0004（0100） &gt;&gt; 4（0100）：衝突する</span></div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; "><br /></span></div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">・</span><span class="Apple-style-span" style="color: rgb(255, 48, 48); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">●</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">と</span><span class="Apple-style-span" style="color: rgb(48, 48, 255); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">■</span></div><div><span class="Apple-style-span" style="color: rgb(48, 48, 255); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; "><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; white-space: normal; ">maskBits:0x0007（0111） &amp; &nbsp;categoryBits:0x0008（1</span></span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">0</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">00） &gt;&gt; 0（0000）：衝突しない</span></div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; "><br /></span></div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; "><span class="Apple-style-span" style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; font-size: 13px; line-height: normal; "><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">・</span><span class="Apple-style-span" style="color: rgb(255, 48, 48); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">●</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">と</span></span></span><span class="Apple-style-span" style="color: rgb(255, 48, 48); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">●</span></div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">maskBits:0x0007（0111） &amp; &nbsp;categoryBits:0x0002（0010） &gt;&gt; 2（0010）：衝突する</span></div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; "><br /></span></div><div><font class="Apple-style-span" face="'trebuchet ms', verdana, helvetica, arial, sans-serif" size="2"><span class="Apple-style-span" style="line-height: 18px; ">・</span></font><span class="Apple-style-span" style="color: rgb(48, 144, 48); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">▲</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">と</span><span class="Apple-style-span" style="color: rgb(255, 48, 48); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">●</span></div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">maskBits:0x0007（0111） &amp; &nbsp;categoryBits:</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">&nbsp;0x0002</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">（</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">0010</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">） &gt;&gt; 2（</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">0010</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">）：衝突する</span></div><div><span class="Apple-style-span" style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; font-size: 13px; line-height: normal; "></span><div><font class="Apple-style-span" face="'trebuchet ms', verdana, helvetica, arial, sans-serif" size="2"><span class="Apple-style-span" style="line-height: 18px;"><br /></span></font></div><div style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; line-height: normal; font-size: 13px; "><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">・</span><span class="Apple-style-span" style="color: rgb(48, 144, 48); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">▲</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">と</span><span class="Apple-style-span" style="color: rgb(48, 48, 255); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">■</span></div><div style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; line-height: normal; font-size: 13px; "><span class="Apple-style-span" style="color: rgb(48, 48, 255); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; "><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; white-space: normal; ">maskBits:0x0007（0111） &amp; &nbsp;categoryBits:0x0008（1</span></span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">0</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">00） &gt;&gt; 0（0000）：衝突しない</span></div><div style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; line-height: normal; font-size: 13px; "><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; "><br /></span></div><div style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; line-height: normal; font-size: 13px; "><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; "><span class="Apple-style-span" style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; font-size: 13px; line-height: normal; "><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">・</span></span></span><span class="Apple-style-span" style="color: rgb(48, 144, 48); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">▲</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; "><span class="Apple-style-span" style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; font-size: 13px; line-height: normal; "><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">と</span></span></span><span class="Apple-style-span" style="color: rgb(48, 144, 48); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">▲</span></div><div style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; line-height: normal; font-size: 13px; "><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">maskBits:0x0007（0111） &amp; &nbsp;categoryBits:</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">&nbsp;0x0004</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">（</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">0100</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">） &gt;&gt; 4（</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">0100</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">）：衝突する</span></div><div><font class="Apple-style-span" face="'trebuchet ms', verdana, helvetica, arial, sans-serif" size="2"><span class="Apple-style-span" style="line-height: 18px;"><br /></span></font></div></div><div><span class="Apple-style-span" style="color: rgb(48, 48, 255); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">・■</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">と</span><span class="Apple-style-span" style="color: rgb(255, 48, 48); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">●</span><div style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; line-height: normal; font-size: 13px; "><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">maskBits:0x0001（0001） &amp; &nbsp;categoryBits:</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">&nbsp;0x0002</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">（</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">0010</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">） &gt;&gt;&nbsp;</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">0</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">（</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">0000</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">）：</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">衝突しない</span></div><div><span class="Apple-style-span" style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; font-size: 13px; line-height: normal; "></span><div style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; line-height: normal; font-size: 13px; "><font class="Apple-style-span" face="'trebuchet ms', verdana, helvetica, arial, sans-serif" size="2"><span class="Apple-style-span" style="line-height: 18px; "><br /></span></font></div><div style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; line-height: normal; font-size: 13px; "><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">・</span><span class="Apple-style-span" style="color: rgb(48, 48, 255); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">■</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">と</span><span class="Apple-style-span" style="color: rgb(48, 144, 48); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">▲</span></div><div style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; line-height: normal; font-size: 13px; "><span class="Apple-style-span" style="color: rgb(48, 48, 255); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; "><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; white-space: normal; ">maskBits:</span></span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">&nbsp;0x0001</span><span class="Apple-style-span" style="color: rgb(48, 48, 255); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; "><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; white-space: normal; ">（</span></span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">0001</span><span class="Apple-style-span" style="color: rgb(48, 48, 255); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; "><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; white-space: normal; ">） &amp; &nbsp;categoryBits:</span></span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">&nbsp;0x0004</span><span class="Apple-style-span" style="color: rgb(48, 48, 255); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; "><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; white-space: normal; ">（</span></span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">0100</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">） &gt;&gt; 0（0000）：衝突しない</span></div><div style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; line-height: normal; font-size: 13px; "><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; "><br /></span></div><div style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; line-height: normal; font-size: 13px; "><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; "><span class="Apple-style-span" style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; font-size: 13px; line-height: normal; "><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">・</span></span></span><span class="Apple-style-span" style="color: rgb(48, 48, 255); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">■</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; "><span class="Apple-style-span" style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; font-size: 13px; line-height: normal; "><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">と</span></span></span><span class="Apple-style-span" style="color: rgb(48, 48, 255); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">■</span></div><div style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; line-height: normal; font-size: 13px; "><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">maskBits:</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">&nbsp;0x0001</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">（</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">0001</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">） &amp; &nbsp;categoryBits:</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">&nbsp;</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">0x0008</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">（</span><span class="Apple-style-span" style="color: rgb(48, 48, 255); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; "><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; white-space: normal; ">1</span></span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">0</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">00</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">）</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">&nbsp;&gt;&gt; 0（0000）：衝突しない</span></div></div><div><font class="Apple-style-span" face="'trebuchet ms', verdana, helvetica, arial, sans-serif" size="2"><span class="Apple-style-span" style="line-height: 18px;"><br /></span></font></div></div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">ふむふむ。確かに先の引用通り「</span>結果（論理積）が0なら衝突しない、0以外なら衝突する。<span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">」になっています。</span></div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; "><br /></span></div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">そこで</span><span class="Apple-style-span" style="color: rgb(255, 48, 48); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">●</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">を categoryBits:0x0001, maskBits:0x0003 に変更してみました。すると・・・</span></div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; "><br /></span></div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; "><span class="Apple-style-span" style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; font-size: 13px; line-height: normal; "><div><font class="Apple-style-span" face="'trebuchet ms', verdana, helvetica, arial, sans-serif" size="2"><span class="Apple-style-span" style="line-height: 18px; ">・</span></font><span class="Apple-style-span" style="color: rgb(255, 48, 48); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">●</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">と</span><span class="Apple-style-span" style="color: rgb(48, 144, 48); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">▲</span></div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">maskBits:0x0003（0011） &amp; &nbsp;categoryBits:0x0004（0100） &gt;&gt; 0（0000）：衝突しない</span></div></span></span></div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; "><br /></span></div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; "><span class="Apple-style-span" style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; font-size: 13px; line-height: normal; "><div><font class="Apple-style-span" face="'trebuchet ms', verdana, helvetica, arial, sans-serif" size="2"><span class="Apple-style-span" style="line-height: 18px; ">・</span></font><span class="Apple-style-span" style="color: rgb(48, 144, 48); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">▲</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">と</span><span class="Apple-style-span" style="color: rgb(255, 48, 48); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">●</span></div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">maskBits:0x0007（0111） &amp; &nbsp;categoryBits:</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">&nbsp;0x0001</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">（</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">0001</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">） &gt;&gt; 1（</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">0001</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">）：衝突する</span></div><div><span class="Apple-style-span" style="font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; font-size: 13px; line-height: normal; "></span></div></span></span></div><div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; "><font class="Apple-style-span" size="2"><br /></font></span></div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; "><font class="Apple-style-span" size="2">と、基準を変えて計算すると違う結果になってしましました。</font></span></div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; "><font class="Apple-style-span" size="2">そこで色々調べてみたら、<a href="http://www.box2d.org/manual.html#d0e845">QucikBox2Dのユーザーマニュアル</a>に次のように書いてありました。</font></span></div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; "><font class="Apple-style-span" size="2"><br /></font></span></div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div><p class="MsoNormal" style="margin-top: 0in; margin-right: 0in; margin-bottom: 10pt; margin-left: 0in; line-height: 17px; font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 0, 0); ">Here is the rule for a collision to occur:</p><div style="border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(89, 89, 89); border-right-color: rgb(89, 89, 89); border-bottom-color: rgb(89, 89, 89); border-left-color: rgb(89, 89, 89); border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding-top: 1pt; padding-right: 4pt; padding-bottom: 1pt; padding-left: 4pt; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(242, 242, 242); margin-left: 0.25in; margin-right: 0.25in; color: rgb(0, 0, 0); font-family: Osaka; font-size: medium; "><p class="CodeBlockCxSpFirst" style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 12pt; text-align: justify; page-break-after: avoid; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(242, 242, 242); border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0in; padding-right: 0in; padding-bottom: 0in; padding-left: 0in; font-size: 10pt; font-family: Consolas; background-position: initial initial; background-repeat: initial initial; ">uint16 catA = fixtureA.filter.categoryBits;</p><p class="CodeBlockCxSpMiddle" style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 12pt; text-align: justify; page-break-after: avoid; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(242, 242, 242); border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0in; padding-right: 0in; padding-bottom: 0in; padding-left: 0in; font-size: 10pt; font-family: Consolas; background-position: initial initial; background-repeat: initial initial; ">uint16 maskA = fixtureA.filter.maskBits;</p><p class="CodeBlockCxSpMiddle" style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 12pt; text-align: justify; page-break-after: avoid; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(242, 242, 242); border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0in; padding-right: 0in; padding-bottom: 0in; padding-left: 0in; font-size: 10pt; font-family: Consolas; background-position: initial initial; background-repeat: initial initial; ">uint16 catB = fixtureB.filter.categoryBits;</p><p class="CodeBlockCxSpMiddle" style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 12pt; text-align: justify; page-break-after: avoid; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(242, 242, 242); border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0in; padding-right: 0in; padding-bottom: 0in; padding-left: 0in; font-size: 10pt; font-family: Consolas; background-position: initial initial; background-repeat: initial initial; ">uint16 maskB = fixtureB.filter.maskBits;</p><p class="CodeBlockCxSpMiddle" style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 12pt; text-align: justify; page-break-after: avoid; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(242, 242, 242); border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0in; padding-right: 0in; padding-bottom: 0in; padding-left: 0in; font-size: 10pt; font-family: Consolas; background-position: initial initial; background-repeat: initial initial; ">&nbsp;</p><p class="CodeBlockCxSpMiddle" style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 12pt; text-align: justify; page-break-after: avoid; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(242, 242, 242); border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0in; padding-right: 0in; padding-bottom: 0in; padding-left: 0in; font-size: 10pt; font-family: Consolas; background-position: initial initial; background-repeat: initial initial; ">if ((catA &amp; maskB) != 0 &amp;&amp; (catB &amp; maskA) != 0)</p><p class="CodeBlockCxSpMiddle" style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 12pt; text-align: justify; page-break-after: avoid; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(242, 242, 242); border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0in; padding-right: 0in; padding-bottom: 0in; padding-left: 0in; font-size: 10pt; font-family: Consolas; background-position: initial initial; background-repeat: initial initial; ">{</p><p class="CodeBlockCxSpMiddle" style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 12pt; text-align: justify; page-break-after: avoid; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(242, 242, 242); border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0in; padding-right: 0in; padding-bottom: 0in; padding-left: 0in; font-size: 10pt; font-family: Consolas; background-position: initial initial; background-repeat: initial initial; ">&nbsp; // fixtures can collide</p><p class="CodeBlockCxSpLast" style="margin-top: 0in; margin-right: 0in; margin-bottom: 12pt; margin-left: 0in; text-align: justify; page-break-after: avoid; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(242, 242, 242); border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0in; padding-right: 0in; padding-bottom: 0in; padding-left: 0in; font-size: 10pt; font-family: Consolas; background-position: initial initial; background-repeat: initial initial; ">}</p></div></div></div></blockquote><div><div><br /></div><div><br /></div><div>つまりAとBを比較する時に<span class="Apple-style-span" style="color: rgb(255, 37, 0); font-family: 'Hiragino Kaku Gothic Pro'; font-size: 12px; ">「それぞれを基準に計算した結果が、どちらも0でない場合に衝突する」</span>ということなんんですね。上に書いた<span class="Apple-style-span" style="color: rgb(255, 48, 48); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">●</span><span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, helvetica, arial, sans-serif; line-height: 18px; font-size: small; ">と</span><span class="Apple-style-span" style="color: rgb(48, 144, 48); font-family: monospace; font-size: 12px; line-height: 15px; white-space: pre-wrap; ">▲</span>の場合とも合致しますね。納得。</div><div><br /></div><div>以下のサイトを参考にしました。感謝。</div><div><br /></div><div><div><ul><li><a href="http://blog.alumican.net/2009/07/05_024440">blog.alumican.net『 QuickBox2DやBox2DFlashAS3での衝突判定をグループ分け 』</a></li></ul><ul><li><a href="http://oshige.com/flash/as3note/2007/05/25.html">2.5 演算子 (ActionScript3.0入門ノート)</a></li></ul></div></div><br /><br /></div>]]>
        
    </content>
</entry>

<entry>
    <title>NetStreamで使用するflvの相対位置</title>
    <link rel="alternate" type="text/html" href="http://www.c-geru.com/as_blind_side/2011/10/netstreamflv.html" />
    <id>tag:www.c-geru.com,2011:/as_blind_side//2.60</id>

    <published>2011-10-20T17:50:07Z</published>
    <updated>2011-10-20T17:58:03Z</updated>

    <summary>NetStreamを使ってるswfをHTMLと別階層に配置することになって、fl...</summary>
    <author>
        <name>c-geru</name>
        
    </author>
    
        <category term="AS3.0" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="NetStream" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.c-geru.com/as_blind_side/">
        <![CDATA[<div>NetStreamを使ってるswfをHTMLと別階層に配置することになって、flvが読めなくなって混乱。改めてヘルプを見ると、<span class="Apple-style-span" style="color: rgb(255, 37, 0); font-family: 'Hiragino Kaku Gothic ProN'; "><span style="font: 13.0px Arial">flv</span>は<span style="font: 13.0px Arial">HTML</span>でなく<span style="font: 13.0px Arial">swf</span>からの相対パス</span>になるってことなのね。以下引用。</div><div><br /></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><table cellpadding="0" cellspacing="0" border="0" style="background-color: white; font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; color: rgb(0, 0, 0); "><tbody><tr><td style="font-size: 13px; "><p><b>ローカルファイルの再生</b></p><p>メディアファイルの場所。引数には、String、<code style="font-family: 'Lucida Console', 'Courier New', Courier, monospace; font-size: 12px; ">URLRequest.url</code>&nbsp;プロパティ、またはこのどちらかを参照する変数を使用できます。アプリケーションセキュリティサンドボックス外にある&nbsp;<span>Flash Player および</span>&nbsp;AIR コンテンツの場合、SWF ファイルまたはサブディレクトリと同じディレクトリに保存されているローカルビデオファイルを再生できます。ただし、上位レベルのディレクトリに移動することはできません。</p><p>アプリケーションセキュリティサンドボックス内の AIR コンテンツの場合、メディアファイルに指定するパスは、SWF ファイルのディレクトリに相対します。ただし、SWF ファイルのディレクトリより上位に移動することはできません。AIR でパスを相対パスとして処理するため、完全なパスは指定しないでください。</p></td></tr></tbody></table></div></blockquote><div><br /></div><div>「参照するパスの起点はHTML」って考えが染みついていると、普段HTMLとswfは同階層に置くことが多いので、ちょっと混乱しました（笑）。ヘルプの該当箇所は<a href="http://help.adobe.com/ja_JP/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#play()">こちら</a>から。</div><br />]]>
        
    </content>
</entry>

<entry>
    <title>iTunesのデータ移行</title>
    <link rel="alternate" type="text/html" href="http://www.c-geru.com/as_blind_side/2011/09/itunes.html" />
    <id>tag:www.c-geru.com,2011:/as_blind_side//2.59</id>

    <published>2011-09-23T12:55:10Z</published>
    <updated>2011-09-23T14:30:19Z</updated>

    <summary>そろそろiTunes用に使ってたPowerBook G4 の容量がやばくなってい...</summary>
    <author>
        <name>c-geru</name>
        
    </author>
    
        <category term="iTunes" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="ipad" label="iPad" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="iphone" label="iPhone" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="itunes" label="iTunes" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="データ移行" label="データ移行" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="ja" xml:base="http://www.c-geru.com/as_blind_side/">
        <![CDATA[そろそろiTunes用に使ってたPowerBook G4 の容量がやばくなっていたのと、春にMacBook Pro(2011)を導入したので、それまでメインで使っていたMacBook Por(2008)にiTinesのデータを移行しました。<div><br /></div><div>毎回移行を行う際に色々調べることになるんで、自分用にメモ。開発そのものとは直接関係ないんですが、まあiPhone/iPad開発で必ず使うことになるので。</div><div><br /></div><div><br /></div><div><ul><li>移行元：PowerBook G4 OSX10.5.8,iTunes10.4.1,音楽データは外付けHDDに保存。</li><li>移行先；MacBook Por(2008) OSX10.6.8,iTunes10.4.1</li></ul></div><div><br /></div><div><ol><li>移行元のiTunesで<b>ファイル</b>＞<b>ライブラリ</b>＞<b>ライブラリを整理...</b>を開き、<b>ファイルを統合</b>にチェックを入れてＯＫボタンを押す。</li><li><b>ユーザ/ミュージック/iTunesフォルダ</b>を移行先マシンの同じ場所にコピー（上書き）</li><li>移行元のiTunesで、<b>Store</b>＞<b>このコンピュータの認証を解除...</b>を実行。</li><li>移行元のiTunesを終了。</li><li>外付けHDDを移行先マシンに接続。</li><li>移行先でiTunesを起動。</li><li>ここで「iTunes Library.itlが最新でない」とアラートが出てしまったため、一度iTunesを終了して、移行元の<b>ユーザ/ミュージック/iTunesフォルダ</b>から<b>iTunes Library.itl</b>を移行先マシンの同じ場所にコピー（上書き）。直前まで移行元のiTunesを使っていたため、情報がずれてしまったらしい（汗。</li><li>移行先のiTunesを起動。iTunesがGuniusの情報を作り直してるらしく、それが終わると移行完了。</li></ol></div><div><br /></div><div>で、問題なく使えています。移行元データは音楽は外付けHDDに入っていたものの、何故かアプリは内蔵HDDにあって、これは次に移行の時にまた面倒だな〜と思って調べていたら、ありました。アプリも外付けHDDに移動する方法が。</div><div><br /></div><div><ol><li>iTunesで<b>ファイル</b>＞<b>ライブラリ</b>＞<b>ライブラリを整理...</b>を開き、<b>"iTunes"フォルダ内のファイルを整理し直す</b> にチェックを入れてＯＫボタンを押す。</li><li>iTunesで<b>ファイル</b>＞<b>ライブラリ</b>＞<b>ライブラリを整理...</b>を開き、<b>ファイルを統合</b>にチェックを入れてＯＫボタンを押す。</li></ol></div><div><br /></div><div>これでアプリのデータも全て、外付けHDDに移動しました。内蔵HDDにはオリジナルファイルが残るので、これを全て消して作業完了。最初に気づいていれば、移行元マシンで先にやっておけば、ネットワーク越しのデータコピー分の時間が無駄にならなかったのに...( ´ ▽ ` )ﾉ。</div><div><br /></div><div>これで今後はよりカンタンにデータ移行ができそうです。外付けHDDは、Finderで見ると59.32/137.29GBなので、しばらくは余裕でしょう。</div><div><br /></div><div>※実際の移行作業は、自己責任でお願いします。</div><div><br /></div>]]>
        
    </content>
</entry>

<entry>
    <title>東京ひよこの会（第2回勉強会）みんなで共有ファイルのDL</title>
    <link rel="alternate" type="text/html" href="http://www.c-geru.com/as_blind_side/2011/07/2dl.html" />
    <id>tag:www.c-geru.com,2011:/as_blind_side//2.58</id>

    <published>2011-07-19T04:13:12Z</published>
    <updated>2011-07-19T04:21:21Z</updated>

    <summary>先日開催した東京ひよこの第二回勉強会。遅くなりましたが、みんなで持ち寄ったファイ...</summary>
    <author>
        <name>c-geru</name>
        
    </author>
    
        <category term="東京ひよこ" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.c-geru.com/as_blind_side/">
        <![CDATA[先日開催した<a href="http://www.c-geru.com/as_blind_side/2011/07/2.html">東京ひよこの第二回勉強会</a>。遅くなりましたが、みんなで持ち寄ったファイルのDLの準備ができました。こ<a href="http://www.c-geru.com/tokyopiyo/tokyopiyo_110709.zip">こからダウンロード</a>できます。ひろゆきさん（<a href="https://twitter.com/#!/ProjectNya">@ProjectNya</a>）さんの作ってくださった<a href="http://www.project-nya.jp/modules/weblog/details.php?blog_id=1461">みんなのレポートページ</a>とと合わせてご覧ください。<div><span class="Apple-style-span" style="font-family: 'trebuchet ms', arial, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; "><br /></span></div><div><span class="Apple-style-span" style="font-family: 'trebuchet ms', arial, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; ">参加者は勿論、惜しくも参加できなかった方も「どんな会だったのか」を感じていただけるといいかもです。<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br /></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">みなさん続々とブログ等に感想、解説など書いて下さってます。是非、Twitterでハッシュタグ<a href="https://twitter.com/#search?q=%23tokyopiyo" style="text-decoration: underline; outline-style: none; outline-width: initial; outline-color: initial; color: rgb(61, 109, 174); ">#tokyopiyo</a>をチェック！</div><div><br /></div></span></div>]]>
        
    </content>
</entry>

<entry>
    <title>iPhoneでGoogle Maps を表示する</title>
    <link rel="alternate" type="text/html" href="http://www.c-geru.com/as_blind_side/2011/07/iphonegoogle-maps.html" />
    <id>tag:www.c-geru.com,2011:/as_blind_side//2.57</id>

    <published>2011-07-14T18:12:23Z</published>
    <updated>2011-07-14T18:19:21Z</updated>

    <summary>iPhoneでGPS関連を調べる必要があってググっていたら、Google cod...</summary>
    <author>
        <name>c-geru</name>
        
    </author>
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.c-geru.com/as_blind_side/">
        <![CDATA[<div>iPhoneでGPS関連を調べる必要があってググっていたら、Google codeで<a href="http://code.google.com/intl/ja/apis/maps/articles/tutorial-iphone.html">Google Maps APIを使ってiPhoneに表示させるための解説ページ</a>を見つけました。</div><div><br /></div><div>ただこのサンプル、<a href="http://code.google.com/apis/maps/documentation/javascript/examples/map-geolocaton-iphone.html">使ってあるURLが404</a>になってしまいます（笑）。そのURL部分は<a href="http://code.google.com/intl/ja-JP/apis/maps/documentation/javascript/examples/map-simple.html">こちら</a>に書き換えれば大丈夫。問題なく動作しました（Xcode 3.2.6/OSX10.6.8）。</div><br />一応、メモとして。<br /><br />]]>
        
    </content>
</entry>

<entry>
    <title>東京ひよこの会（第2回勉強会）</title>
    <link rel="alternate" type="text/html" href="http://www.c-geru.com/as_blind_side/2011/07/2.html" />
    <id>tag:www.c-geru.com,2011:/as_blind_side//2.56</id>

    <published>2011-07-13T17:01:38Z</published>
    <updated>2011-07-13T18:00:08Z</updated>

    <summary>7/9に東京ひよこの第二回勉強会を開催しました。内容については、@kenji_c...</summary>
    <author>
        <name>c-geru</name>
        
    </author>
    
        <category term="その他" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="東京ひよこ" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.c-geru.com/as_blind_side/">
        <![CDATA[<div>7/9に<a href="http://atnd.org/events/17348">東京ひよこの第二回勉強会</a>を開催しました。内容については、<a href="http://www.clown5.com/c5log/2011/07/14/tokyopiyo_report2/">@kenji_clown5さんの力作レポ</a>があるので、そちらをご覧いただくとして、運営面から書いてみます。</div><div><br /></div><div>時間は13:30〜18:00の設定で、参加者15名。5名発表毎に15分休憩挟んでの3セット。前回より人数も少ないし、時間通りにいけるかな・・・と思ったら、終了が18:40で40押しでした。</div><div><br /></div><div>参加全員が発表することと、ネタによってはそこから話が膨らんでいくので、単純に時間を計れない難しさもあります。その点は<a href="https://twitter.com/#!/ProjectNya">ひろゆきさ</a>んからも「全員発表でなくてもいいのでは？そうすれば、更に議論を深める時間も取れる」という意見があったんですが、私個人としては、参加＝発表というラインは堅持したいなあと・・・。単に聞くだけならセミナーもたくさんあるし、発表自体が勉強且つ事前準備という意味合いもあるし。</div><div><br /></div><div>今回もおやつの呼びかけに、みなさん持参していただき、たくさんのおやつを会場協力いただいた会社さんにお礼として置いていくことができました。ありがとうございます。ただ進行としてしゃべっていると、ゆっくり食べられないのが個人的に残念です(T_T)。</div><div><br /></div><div>で、19:00から懇親会。遅めの設定だったのですが、幹事のみ遅刻（笑）。座敷だったんですが、ちょっと狭かったので席の移動がままならない感じで、それぞれが全員と話して回るってことができなかったのが残念でした。この辺はなかなか難しいですね。広くても仕切りがなくてうるさいのも困るし、椅子席の方が移動しやすいのかな〜と思ったり。</div><div><br /></div><div>フリーランスになって以降、宴席の機会が激減しているので（笑）、その辺は経験豊富な宴会幹事さんにご教授いただきたいところですね。</div><div><br /></div><div>・・・と、ざっと全体の雑感です。今回も盛況でつつがなく終了してほっとしました。運営面や懇親会、次回のお題など、参加した方、これから参加してみたい方も含めて、いろいろご意見いただけるとウレシイです。</div><div><br /></div><div>ではみなさま、次は第三回目で！</div><div><br /></div><div><br /></div><div>[追記]どなたかがいってましたけど、持参ノートのMac率がとても高かったです（笑）。</div><div><br /></div><br /><br />]]>
        
    </content>
</entry>

<entry>
    <title>XMLから取り出したエレメントの親への参照</title>
    <link rel="alternate" type="text/html" href="http://www.c-geru.com/as_blind_side/2011/06/xml-2.html" />
    <id>tag:www.c-geru.com,2011:/as_blind_side//2.55</id>

    <published>2011-06-19T19:38:15Z</published>
    <updated>2011-06-19T20:00:14Z</updated>

    <summary>XMLをいじっていて不思議な現象が。下記のようなXMLを定義します。var xm...</summary>
    <author>
        <name>c-geru</name>
        
    </author>
    
        <category term="AS3.0" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="XML" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.c-geru.com/as_blind_side/">
        <![CDATA[XMLをいじっていて不思議な現象が。下記のようなXMLを定義します。<div><br /></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>var xml:XML =&nbsp;</div><div>&lt;itemlist&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>&lt;itemGroup name="X"&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">		</span>&lt;itemGroup name="XX"&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">			</span>&lt;itemGroup name="XXX"&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">				</span>&lt;item name="XXX001" /&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">				</span>&lt;item name="XXX002" /&gt;<span class="Apple-tab-span" style="white-space:pre">			</span></div><div><span class="Apple-tab-span" style="white-space:pre">				</span>&lt;item name="XXX003" /&gt;<span class="Apple-tab-span" style="white-space:pre">			</span></div><div><span class="Apple-tab-span" style="white-space:pre">				</span>&lt;item name="XXX004" /&gt;<span class="Apple-tab-span" style="white-space:pre">			</span></div><div><span class="Apple-tab-span" style="white-space:pre">				</span>&lt;item name="XXX005" /&gt;<span class="Apple-tab-span" style="white-space:pre">			</span></div><div><span class="Apple-tab-span" style="white-space:pre">			</span>&lt;/itemGroup&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">		</span>&lt;/itemGroup&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">		</span>&lt;item name="X-001" /&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">		</span>&lt;item name="X-002" /&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>&lt;/itemGroup&gt;</div><div>&lt;/itemlist&gt;;</div></div></blockquote><br /><div>この中のitemエレメントで@name="XX001"のデータの親を参照すると、下記のようになります。これは問題なし。</div><div><br /></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>trace(xml..item.(@name=="XXX001").parent());</div></div><div><br /></div><div><div>----</div><div>&lt;itemGroup name="XXX"&gt;</div><div>&nbsp;&nbsp;&lt;item name="XXX001"/&gt;</div><div>&nbsp;&nbsp;&lt;item name="XXX002"/&gt;</div><div>&nbsp;&nbsp;&lt;item name="XXX003"/&gt;</div><div>&nbsp;&nbsp;&lt;item name="XXX004"/&gt;</div><div>&nbsp;&nbsp;&lt;item name="XXX005"/&gt;</div><div>&lt;/itemGroup&gt;</div></div><div><br /></div></blockquote><br /><div>次に同じ条件でitemエレメントを検索して、それを別XMLの子として追加します。</div><div><br /></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>var xmlList:XMLList = xml..item.(@name=="XXX001");</div><div>var xml2:XML = new XML("&lt;top&gt;&lt;/top&gt;")</div><div>for each (var item:XML in xmlList) {</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>xml2.appendChild(item);</div><div>}</div></div><div><br /></div></blockquote>xml2に対して、itemエレメントで@name="XX001"のデータの親を参照すると、下記のようになります。これも問題なし。<br /><div><br /></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>trace(xml2..item.(@name=="XXX001").parent());</div></div><div><br /></div><div><div>----</div><div>&lt;top&gt;</div><div>&nbsp;&nbsp;&lt;item name="XXX001"/&gt;</div><div>&lt;/top&gt;</div></div><div><br /></div></blockquote>この後に、元々のXML(xml)に対して、同じく親を参照すると・・・<div><br /></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div>trace(xml..item.(@name=="XXX001").parent());</div><div><br /></div><div><div>----</div><div>&lt;top&gt;</div><div>&nbsp;&nbsp;&lt;item name="XXX001"/&gt;</div><div>&lt;/top&gt;</div></div><div><br /></div></blockquote><div>と、別XMLの親を参照してしまいます。該当エレメントを別XMLに追加してしまうと、元XMLの該当エレメントの参照も変わってしまうようなのです。</div><div><br /></div><div>これってどういうことなんでしょうね？？？もっとも別XMLにしたいなら、XML.copy()で複製を作れって話ではあるんですけけど、ちょっと納得いかない感じです。</div><div><br /></div>]]>
        
    </content>
</entry>

<entry>
    <title>外部ファイル読み込みでswf／flvのファイルパスの違い</title>
    <link rel="alternate" type="text/html" href="http://www.c-geru.com/as_blind_side/2011/06/swfflv.html" />
    <id>tag:www.c-geru.com,2011:/as_blind_side//2.54</id>

    <published>2011-06-15T07:12:05Z</published>
    <updated>2011-06-15T10:03:03Z</updated>

    <summary>某所から「flvが再生できないので見て欲しい」と連絡があって（私が作ったものでは...</summary>
    <author>
        <name>c-geru</name>
        
    </author>
    
        <category term="AS3.0" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="flv" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.c-geru.com/as_blind_side/">
        <![CDATA[<div>某所から「flvが再生できないので見て欲しい」と連絡があって（私が作ったものではない）、flaファイルを見たらコンポーネントにflvをリンクしているだけ。</div><div><br /></div><div>いろいろ調べてみたら、flvのファイルパスの起点は、swfが貼ってあるHTMLではなく、swfになるらしい。いつのバージョンからだったか、外部読み込みのパスがswfからHTMLになったのは覚えていたけど、flvのパスがまた別だとは知らなかった。</div><div><br /></div><div>※ちなみにコンポーネントのスキンはswfなのでHTML起点だけど、パブリッシュ設定でswfの出力先をサブフォルダにすると同じ場所に書き出されてしまう。この辺りは「ちょっとなあ」と思う。</div><div><br /></div><div>フツーにHTMLとswfが同階層にあれば何もする必要はないし、サーバ絡みのコンテンツだとflv自体が別サーバだったりすることもあるからか、今まで問題に遭遇したことがなかったです。</div><div><br /></div><div>う〜ん、わかっているようで気づいてないことがいろいろあるなあ。</div><div><br /></div><div>下記サイトのお世話になりました。感謝。</div><div><br /></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Osaka; font-size: medium; "><pre style="word-wrap: break-word; white-space: pre-wrap; "><ul><li><a href="http://lab.komadoya.com/blog/2009/04/flv-flash.php">FLASHでflv形式の動画を再生する(入門編) - 小窓屋めがね</a></li><li><a href="http://ziddy.japan.zdnet.com/qa6745872.html?order=DESC&amp;by=datetime">教えて！Ziddyちゃん - コンポーネントのswfを別階層に設置したい</a></li><li><a href="http://homepage3.nifty.com/fs/sozai/setti2.html">Flash素材の設置方法</a></li><li><a href="http://www.crystal-creation.com/web-appli/technical-information/html/sample/embed-video.htm">動画をページに埋め込む方法 - HTML解説</a></li></ul></pre></span></div><br /><br />]]>
        
    </content>
</entry>

<entry>
    <title>親エレメント名を一括で取得</title>
    <link rel="alternate" type="text/html" href="http://www.c-geru.com/as_blind_side/2011/06/post-13.html" />
    <id>tag:www.c-geru.com,2011:/as_blind_side//2.53</id>

    <published>2011-06-14T18:03:41Z</published>
    <updated>2011-06-14T18:11:44Z</updated>

    <summary>文字通り、特定のエレメントから遡って、全ての親エレメント名を取得するための関数を...</summary>
    <author>
        <name>c-geru</name>
        
    </author>
    
        <category term="AS3.0" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="XML" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.c-geru.com/as_blind_side/">
        <![CDATA[文字通り、特定のエレメントから遡って、全ての親エレメント名を取得するための関数を書きました。XMLは下層に向かっての処理はいろいろあるけど、上層に向かっての処理は少ない気がする。前提として、XMLは上から下に向かって使うものなのか？ いや、そんなことないよね。単に階層化されたデータな訳だから。<div><br /></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div><div>//---------------------------</div><div>//　親ノード名取得（再帰）</div><div>//---------------------------</div><div>function getParentName_xml(xml:XML,array:Array):void</div><div>{</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>if (xml.parent() != undefined)</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>{</div><div><span class="Apple-tab-span" style="white-space:pre">		</span>array.unshift(xml.parent().name());</div><div><span class="Apple-tab-span" style="white-space:pre">		</span>getParentName_xml(xml.parent(),array);</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>}</div><div>}</div></div></div></blockquote><br /><div><a href="http://www.c-geru.com/as_blind_side/2011/06/xml-1.html">前回の件</a>みたいに単なる見落としの可能性もあるので、もっと簡便な方法を知ってる方は教えてください。</div>]]>
        
    </content>
</entry>

<entry>
    <title>XMLから特定のエレメントを抽出（文字列で指定）</title>
    <link rel="alternate" type="text/html" href="http://www.c-geru.com/as_blind_side/2011/06/xml-1.html" />
    <id>tag:www.c-geru.com,2011:/as_blind_side//2.52</id>

    <published>2011-06-14T17:44:14Z</published>
    <updated>2011-06-14T17:58:25Z</updated>

    <summary>XMLをいじってて、XMLオブジェクトのすべての子孫（子、孫、ひ孫など）から特定...</summary>
    <author>
        <name>c-geru</name>
        
    </author>
    
        <category term="AS3.0" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="XML" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.c-geru.com/as_blind_side/">
        <![CDATA[<div>XMLをいじってて、<span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; ">XMLオブジェクトのすべての子孫（子、孫、ひ孫など）から特定のエレメントを抽出するには、<a href="http://help.adobe.com/ja_JP/FlashPlatform/reference/actionscript/3/operators.html#descendant_accessor">descendant accessor（..）</a>を使って</span></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; "><br /></span></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; ">var resultList:XMLList = xml..aa;</span></div></blockquote><font class="Apple-style-span" color="#000000" face="Tahoma, Verdana, Arial, Helvetica, sans-serif"><div><font class="Apple-style-span" color="#000000" face="Tahoma, Verdana, Arial, Helvetica, sans-serif"><br /></font></div>と出来るのですが、このaaが文字列の場合にはどうすればいいか？</font><div><font class="Apple-style-span" color="#000000" face="Tahoma, Verdana, Arial, Helvetica, sans-serif"><br /></font></div><div><font class="Apple-style-span" color="#000000" face="Tahoma, Verdana, Arial, Helvetica, sans-serif">何かメソッドがあるはずだと探しまくって発見したのが、<a href="http://help.adobe.com/ja_JP/FlashPlatform/reference/actionscript/3/XML.html#descendants()">XML.descendants()</a>でした。</font><div><div><br /></div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; ">var resultList:XMLList = xml.descendants("aa");</span></div></blockquote><font class="Apple-style-span" color="#000000" face="Tahoma, Verdana, Arial, Helvetica, sans-serif"><br /></font><div><font class="Apple-style-span" color="#000000" face="Tahoma, Verdana, Arial, Helvetica, sans-serif">しかし散々探したあげく、見つけた場所が</font><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; "><a href="http://help.adobe.com/ja_JP/FlashPlatform/reference/actionscript/3/operators.html#descendant_accessor" style="text-decoration: underline; ">descendant accessor（..）</a>のヘルプにある関連項目からのリンクだったという・・・。灯台下暗しというけれど、ヘルプの見方に問題がありありです。うう...(T_T)。</span></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; "><br /></span></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; "><br /></span></div></div>]]>
        
    </content>
</entry>

<entry>
    <title>Xcode 4 と Xcode 3 との併用</title>
    <link rel="alternate" type="text/html" href="http://www.c-geru.com/as_blind_side/2011/05/xcode-4-xcode-3.html" />
    <id>tag:www.c-geru.com,2011:/as_blind_side//2.51</id>

    <published>2011-05-18T13:23:28Z</published>
    <updated>2011-05-18T14:13:36Z</updated>

    <summary>Xcode 4 をインストールしてみたらなんと英語版。「なんだー」と思っていたら...</summary>
    <author>
        <name>c-geru</name>
        
    </author>
    
        <category term="iPhone" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.c-geru.com/as_blind_side/">
        <![CDATA[<div>Xcode 4 をインストールしてみたらなんと英語版。「なんだー」と思っていたら、Xcode 3 との併用も可能らしいので、Xcode 3 を再びインストール。手順については下記を参考にさせていただきました。感謝。</div><div><br /></div><div><ul><li><a href="http://serennz.sakura.ne.jp/sb/log/eid198.html">SimpleBoxes | Xcode 4 の導入と Xcode 3 との併用</a></li></ul></div><br />で、インストールしてXcode 3 で以前作ったモノを開いてみたら、プロジェクトに含まれるコードのほとんどが赤字（存在しない）状態で、かつ左上はBase SDK Missingに...。<div><br /></div><div>調べてみたら、プロジェクト＞プロジェクト設定の編集で「一般」を選択して「パス」欄を見ると、Xcodeのルートディレクトリが起点になっているようです。なので・・・</div><div><br /></div><div><br /></div><div><ol><li>プロジェクトファイル一式をXcode3のルートディレクトリに移動。</li><li>プロジェクト＞プロジェクト設定の編集で「一般」を選択して、「すべての構成のベースSDK」を「Latest iOS (iOS 4.3)」に変更。</li><li>プロジェクト＞プロジェクト設定の編集で「ビルド」を選択して、「iOS Deployment Target」など必要な項目を設定する。</li><li>プロジェクト＞アクティブSDKを設定＞Simulator に切替。</li></ol><div><br /></div></div><div>と設定し、やっとiOSシミュレータで起動するようになりました。やれやれ。</div><div>インストールばかりやってないで、いい加減まともなアプリを1本つくらないと...(^^;。</div><div><br /></div><div>Base SDK Missingについては、過去の記事<a href="http://www.c-geru.com/as_blind_side/2011/03/xcodebase-sdk-missing.html">「XcodeのBase SDK Missing」</a>もご参照下さい。</div>]]>
        
    </content>
</entry>

<entry>
    <title>外接円を描いてみた</title>
    <link rel="alternate" type="text/html" href="http://www.c-geru.com/as_blind_side/2011/05/post-12.html" />
    <id>tag:www.c-geru.com,2011:/as_blind_side//2.50</id>

    <published>2011-05-12T18:58:09Z</published>
    <updated>2011-05-12T19:21:32Z</updated>

    <summary>ここのところ必要に迫られて、いろいろ図形の描画をしました。で、前回のカスタム線に...</summary>
    <author>
        <name>c-geru</name>
        
    </author>
    
        <category term="AS3.0" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Graphics" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="図形" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.c-geru.com/as_blind_side/">
        <![CDATA[<div>ここのところ必要に迫られて、いろいろ図形の描画をしました。で、前回のカスタム線に続いて、今度は外接円を描きました。サンプルは<a href="http://www.c-geru.com/_2tone/circumcenter/">こちら</a>。</div><div><br /></div><div>円の公式（r*r = (x - a)*&nbsp;(x - a)+(x -b)*(x -b)）と3点の座標から連立方程式を作って、解いただけです。...と書くと簡単そうですけど、ASの式にするのに結構手間がかかりました。数学苦手だし（笑）。スクリプトはこんな感じです。</div><div><br /></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>//3点から円を描く</div><div>function drawCircleFromPoint()</div><div>{</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>//任意の3点から円の半径、中心点を求める</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>//（3点の座標と円の公式の連立方程式）</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>var A:Number = Math.pow(point1.x,2) - Math.pow(point0.x,2) + Math.pow(point1.y,2) - Math.pow(point0.y,2);</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>var B:Number = point1.y - point0.y;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>var C:Number = Math.pow(point2.x,2) - Math.pow(point0.x,2) + Math.pow(point2.y,2) - Math.pow(point0.y,2);</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>var D:Number = point2.y - point0.y;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>var E:Number = point1.x - point0.x;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>var F:Number = point2.x - point0.x;</div><div><br /></div><div><span class="Apple-tab-span" style="white-space:pre">	</span>var b:Number = (F*A - E*C)/(B*F - D*E)/2;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>var a:Number = (C - 2*b*D)/(2*F);</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>var r:Number = Math.sqrt(Math.pow(point0.x - a,2) + Math.pow(point0.y - b,2));</div><div><br /></div><div><span class="Apple-tab-span" style="white-space:pre">	</span>//求めた円を描画</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>var sp_gr:Graphics = sp.graphics;</div><div><br /></div><div><span class="Apple-tab-span" style="white-space:pre">	</span>sp_gr.clear();</div><div><br /></div><div><span class="Apple-tab-span" style="white-space:pre">	</span>//円;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>sp_gr.lineStyle(1,0x00FF00,1);</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>sp_gr.drawCircle(a,b,r);</div><div><br /></div><div><span class="Apple-tab-span" style="white-space:pre">	</span>//中心点;</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>sp_gr.moveTo(a-3,b-3);</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>sp_gr.lineTo(a+3,b+3);</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>sp_gr.moveTo(a-3,b+3);</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>sp_gr.lineTo(a+3,b-3);</div><div>}</div></div><div><br /></div></blockquote>※point0,point1,point2はそれぞれ円のmcを指します（<a href="http://www.c-geru.com/_2tone/circumcenter/">サンプル参照</a>）。<br /><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><br /></div></blockquote>いざ書こうとすると意外と面倒なのでメモとして。あんまり用途がないかもしれませんけど...。<br /><div><br /></div><div><br /></div><div><br /></div><br /><br />]]>
        
    </content>
</entry>

<entry>
    <title>Arrayの落とし穴(2) - ゼロの配列</title>
    <link rel="alternate" type="text/html" href="http://www.c-geru.com/as_blind_side/2011/05/array.html" />
    <id>tag:www.c-geru.com,2011:/as_blind_side//2.49</id>

    <published>2011-05-11T11:41:35Z</published>
    <updated>2011-05-11T16:58:37Z</updated>

    <summary>普段あまり使わないのだけれど、Arrayは・・・var array:Array ...</summary>
    <author>
        <name>c-geru</name>
        
    </author>
    
        <category term="AS3.0" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Array" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.c-geru.com/as_blind_side/">
        <![CDATA[普段あまり使わないのだけれど、Arrayは・・・<div><br /></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>var array:Array = new Array(0,2)</div></div></blockquote><div><br /></div>とやっても生成できます。で、たまたま横着してこの方式で・・・<div><br /></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div>array = new Array(0)</div></blockquote><div><br /></div>とやって、array[0] == 0 になると思ったら、要素ゼロの配列になってしまい、しばらく「何でだろうな？？」とはまってしまいました。<a href="http://adobe.ly/kUK9wv">ヘルプ通り</a>の仕様なんですけどね。<div><br /></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>var array:Array = new Array(0,2)</div><div>trace(array,array.length) &gt;&gt; 0,2 2</div><div>array = new Array(0)</div><div>trace(array,array.length) &gt;&gt; &nbsp;0</div></div></blockquote><div><br /></div>まあこんなコトで躓くこともないと思いますが、自分ではまたやりかねないのでメモ。<div>素直にこうすれば、何の問題も起きないんですけどねｗ。</div><div><br /></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>array = [0]</div><div>trace(array,array.length) &gt;&gt; 0 1</div></div></blockquote><br /><div><div><br /></div><div>[追記]2011.5.11</div><div><a href="http://www.fumiononaka.com/">野中さん</a>から情報いただきました。初期化は[]を使う方が速いらしいです。</div><div><br /></div><div><ul><li><a href="http://f-site.org/articles/2011/01/26034724.html">F-site&nbsp;[AS3] 配列を初期化するには</a></li></ul><div><div><div><div><br /></div></div></div></div></div></div>]]>
        
    </content>
</entry>

<entry>
    <title>いろんな線を描くクラスを作ってみた</title>
    <link rel="alternate" type="text/html" href="http://www.c-geru.com/as_blind_side/2011/05/post-11.html" />
    <id>tag:www.c-geru.com,2011:/as_blind_side//2.48</id>

    <published>2011-05-09T17:16:50Z</published>
    <updated>2011-05-12T19:20:52Z</updated>

    <summary>GraphicsでmoveTo,lineToで線を描く時に、Flash上でできる...</summary>
    <author>
        <name>c-geru</name>
        
    </author>
    
        <category term="AS3.0" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Graphics" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="図形" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://www.c-geru.com/as_blind_side/">
        <![CDATA[<div>GraphicsでmoveTo,lineToで線を描く時に、Flash上でできる破線、点線などの描画が出来ない。みんなどうしてるのか・・・と調べると、結局自作するしかないようなので、CustomLine用のクラスを書いてみました。点線、破線、波線、二重線に対応してます。サンプルは<a href="http://www.c-geru.com/_2tone/customline/">こちら</a>。</div><div><br /></div><div>こういうのって汎用ライブラリはないのかな〜。役に立つようなら<a href="http://wonderfl.net/">wonderfl</a>にでも投稿してみようかしらん。でももうあるかな？</div><div><br /></div><div>この手のいいライブラリがあったら教えて下さい。</div><div><br /></div><br /><br />]]>
        
    </content>
</entry>

</feed>

