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

<channel>
	<title>ITASSIST</title>
	<atom:link href="http://www.itassist.info/modules/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.itassist.info/modules/blog</link>
	<description>SOHOゆいちのサイト</description>
	<lastBuildDate>Sun, 05 Jun 2011 21:59:07 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.itassist.info/modules/blog/feed" />
		<item>
		<title>wordpressでDB上のパスワードをプレーンテキストにする</title>
		<link>http://www.itassist.info/modules/blog/archives/533</link>
		<comments>http://www.itassist.info/modules/blog/archives/533#comments</comments>
		<pubDate>Sun, 05 Jun 2011 21:58:37 +0000</pubDate>
		<dc:creator>abe</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.itassist.info/modules/blog/?p=533</guid>
		<description><![CDATA[実運用するサイトではセキュリティ的に問題があるきがしますが
wordpressの管理画面などをばりばりカスタマイズしたりするときに、たまに、あった方が便利になったので調べてみました。
以外に簡単、プラグインファイルを作成・・・・・]]></description>
			<content:encoded><![CDATA[<p>実運用するサイトではセキュリティ的に問題があるきがしますが<br />
wordpressの管理画面などをばりばりカスタマイズしたりするときに、たまに、あった方が便利になったので調べてみました。</p>
<p>以外に簡単、プラグインファイルを作成して、（functions.phpでもいけるかも）<br />
以下のようにコードを書いてあげると、DB上のパスワードがプレーンテキストになります。</p>
<pre class="brush: plain;">function wp_hash_password($pass) {
    return $pass;
}

function hmd_check_password($check, $password, $hash, $user_id) {
    $userData = get_userdatabylogin($user_id);
    if($userData-&gt;user_pass == $password) {
        return true;
    } else {
        return false;
    }
}
add_filter('check_password', 'hmd_check_password');
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.itassist.info/modules/blog/archives/533/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.itassist.info/modules/blog/archives/533" />
	</item>
		<item>
		<title>wptouchのdefault以外のテンプレートを作成する方法</title>
		<link>http://www.itassist.info/modules/blog/archives/527</link>
		<comments>http://www.itassist.info/modules/blog/archives/527#comments</comments>
		<pubDate>Mon, 09 May 2011 19:38:16 +0000</pubDate>
		<dc:creator>abe</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[未分類]]></category>

		<guid isPermaLink="false">http://www.itassist.info/modules/blog/?p=527</guid>
		<description><![CDATA[ついでに、wptouchに独自のテンプレートを適用する方法
wptouchのプラグイン内を直接編集してもいいのだけれど、アップデートの時などに上書きされてしまうと危ないので、PC用のテーマのところにもう一つテーマを作って・・・・・]]></description>
			<content:encoded><![CDATA[<p>ついでに、wptouchに独自のテンプレートを適用する方法</p>
<p>wptouchのプラグイン内を直接編集してもいいのだけれど、アップデートの時などに上書きされてしまうと危ないので、PC用のテーマのところにもう一つテーマを作って利用するようにする方法。</p>
<p>独自にプラグインを作成しプラグインファイル内に、下記のように書いておき、「プラグイン名」のところに、PC用テーマを作成したフォルダ名を記入すると、そっちのテーマを読んでくれる。</p>
<pre class="brush: plain;">
if(!is_admin()){
    global $wptouch_plugin;

	function hip_iphone_get_stylesheet( $stylesheet ) {
		if (bnc_is_iphone()) {
			return &quot;プラグイン名&quot;;
		} else {
			return $stylesheet;
		}
	}
    add_filter( 'stylesheet', 'hip_iphone_get_stylesheet' , 20);

    function hip_iphone_get_template( $template ) {
    	if (bnc_is_iphone()) {
    	   return &quot;プラグイン名&quot;;
    	} else {
    	   return $template;
    	}
    }
    add_filter( 'template', &quot;hip_iphone_get_template&quot; , 20 );

    function hip_iphone_theme_root( $path ) {
    	if (bnc_is_iphone()) {
    	   return realpath(dirname(__FILE__) . '/../../themes');
    	} else {
    	   return $path;
    	}
    }
    add_filter( 'theme_root', &quot;hip_iphone_theme_root&quot; , 20 );

    function hip_iphone_theme_root_uri( $uri ) {
    	if (bnc_is_iphone()) {
    	   return 'http://' . $_SERVER['SERVER_NAME'] . '/wp-content/themes';
    	} else {
    	   return $uri;
    	}
    }
    add_filter( 'theme_root_uri', &quot;hip_iphone_theme_root_uri&quot; , 20 );
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.itassist.info/modules/blog/archives/527/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.itassist.info/modules/blog/archives/527" />
	</item>
		<item>
		<title>wptouchをPCから見る方法</title>
		<link>http://www.itassist.info/modules/blog/archives/523</link>
		<comments>http://www.itassist.info/modules/blog/archives/523#comments</comments>
		<pubDate>Mon, 09 May 2011 19:27:02 +0000</pubDate>
		<dc:creator>abe</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.itassist.info/modules/blog/?p=523</guid>
		<description><![CDATA[備忘録）
プラグインフォルダ内の
/include/フォルダに
developer.mode
という名称のファイルを作成して設置する。
これで、PCからでもスマートフォン用のテーマで表示される。
]]></description>
			<content:encoded><![CDATA[<p>備忘録）</p>
<p>プラグインフォルダ内の</p>
<p>/include/フォルダに</p>
<p>developer.mode</p>
<p>という名称のファイルを作成して設置する。</p>
<p>これで、PCからでもスマートフォン用のテーマで表示される。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itassist.info/modules/blog/archives/523/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.itassist.info/modules/blog/archives/523" />
	</item>
		<item>
		<title>アイティーエー株式会社オープン</title>
		<link>http://www.itassist.info/modules/blog/archives/516</link>
		<comments>http://www.itassist.info/modules/blog/archives/516#comments</comments>
		<pubDate>Wed, 16 Feb 2011 15:00:52 +0000</pubDate>
		<dc:creator>abe</dc:creator>
				<category><![CDATA[更新情報]]></category>

		<guid isPermaLink="false">http://www.itassist.info/modules/blog/?p=516</guid>
		<description><![CDATA[会社を引き継ぐ形ですが、アイティーエー株式会社業務開始いたしました。
http://www.eyeta.jp
まだ、ホームページも作成し始めたところですが、個人事業として行なってきたサービスをよりいいものにして行きたいと・・・・・]]></description>
			<content:encoded><![CDATA[<p>会社を引き継ぐ形ですが、アイティーエー株式会社業務開始いたしました。</p>
<p><a href="http://www.eyeta.jp" target="_self">http://www.eyeta.jp</a></p>
<p>まだ、ホームページも作成し始めたところですが、個人事業として行なってきたサービスをよりいいものにして行きたいと思います。</p>
<p>当面はJavascript、スマートフォン関連、Twitter関連の事業に力を注いでいくつもりです。</p>
<p>よろしくお願い致します。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itassist.info/modules/blog/archives/516/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.itassist.info/modules/blog/archives/516" />
	</item>
		<item>
		<title>postfix+amavisdで突然メールが配信されなくなった</title>
		<link>http://www.itassist.info/modules/blog/archives/513</link>
		<comments>http://www.itassist.info/modules/blog/archives/513#comments</comments>
		<pubDate>Fri, 30 Jul 2010 13:00:03 +0000</pubDate>
		<dc:creator>abe</dc:creator>
				<category><![CDATA[tool、サービス]]></category>
		<category><![CDATA[amavisd]]></category>
		<category><![CDATA[postfix]]></category>

		<guid isPermaLink="false">http://www.itassist.info/modules/blog/?p=513</guid>
		<description><![CDATA[備忘録
Mailmanで突然メーリングリストが配信されなくなった、
/var/log/maillogを見ると


postfix timed out while receiving the initial server ・・・・・]]></description>
			<content:encoded><![CDATA[<p>備忘録</p>
<p>Mailmanで突然メーリングリストが配信されなくなった、</p>
<p>/var/log/maillogを見ると</p>
<pre class="brush: plain;">

postfix timed out while receiving the initial server greeting
</pre>
<p>DNSかとも思ったが、色々調べたところamavisdを利用していて</p>
<p>postfixの再起動を行なった場合、amavisdも再起動しないと上記のようなエラーメッセージが表示されメールが配信できなくなるっぽい</p>
<p>プロバイダの設定で、デフォでamavisdが入っていて、いれているつもりがなかったので、解決にすごい時間かかった、、、、</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itassist.info/modules/blog/archives/513/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.itassist.info/modules/blog/archives/513" />
	</item>
		<item>
		<title>cocos2dサンプル:ActionTestの内容(3)</title>
		<link>http://www.itassist.info/modules/blog/archives/487</link>
		<comments>http://www.itassist.info/modules/blog/archives/487#comments</comments>
		<pubDate>Sun, 25 Jul 2010 09:28:47 +0000</pubDate>
		<dc:creator>abe</dc:creator>
				<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[cocos2d]]></category>
		<category><![CDATA[開発言語]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.itassist.info/modules/blog/?p=487</guid>
		<description><![CDATA[大分間があいてしまいましたが、続きをコツコツと
cocos2dのサンプルを勉強がてら読みといていくメモです。テストコードのActionTestを読んでいってみます。全体の流れは他のテストと同じみたいなので個別の部分を読ん・・・・・]]></description>
			<content:encoded><![CDATA[<p>大分間があいてしまいましたが、続きをコツコツと</p>
<p>cocos2dのサンプルを勉強がてら読みといていくメモです。テストコードのActionTestを読んでいってみます。<a href="http://www.itassist.info/modules/blog/archives/346">全体の流れは他のテスト</a>と同じみたいなので個別の部分を読んでみます。</p>
<p><!-- START CONTENTS --><a href="http://www.itassist.info/modules/blog/archives/471">cocos2dサンプル:ActionTestの内容(2)の続きです。<br />
</a></p>
<h4>ActionRepeatクラス</h4>
<p>アクションの繰り返し（無限ループや指定回数ループ）のテスト</p>
<pre class="brush: plain;">
// 1秒間で横に150PXへ移動するアクションを定義
id a1 = [CCMoveBy actionWithDuration:1 position:ccp(150,0)];
// 座標60,60へ移動し、上で定義した1秒間に横に150px移動するアクションを3回繰り返すアクションシーケンスを定義
id action1 = [CCRepeat actionWithAction:
    [CCSequence actions: [CCPlace actionWithPosition:ccp(60,60)], a1, nil]
    times:3];
// 上で定義した1秒間に横に150px移動するアクションとその逆の左に1秒間で150px移動するアクションを永遠に繰り返すアクションシーケンスを定義
id action2 = [CCRepeatForever actionWithAction:
    [CCSequence actions: [[a1 copy] autorelease], [a1 reverse], nil]
    ];
// 各アクションをスプライトへセット
[kathia runAction:action1];
[tamara runAction:action2];
</pre>
<p>※前にも出てきたが、同じアクションをシーケンスなどにセットする場合には、上の例のようにcopyしてセットする必要がある。これはアクションの継承元の「CCIntervalAction」でアクションの開始してからの時間などの情報を保持しているためです。</p>
<h4>ActionCallFuncクラス</h4>
<p>3つのアクションで関数を呼び出すテスト。</p>
<p>cocos2dではアクション中に関数を呼び出す方法が3通りあるようです。</p>
<p>違いは、</p>
<ul>
<li>単に関数を呼び出す。</li>
<li>呼び出す際に引数に呼び出し元のスプライトを付ける</li>
<li>呼び出す際に引数に呼び出し元のスプライトを付け、更に任意の引数をセット出来る。</li>
</ul>
<p>という3種のようです。</p>
<pre class="brush: plain;">
// 2秒間で右に200px動いた後に「callback1」という関数を呼び出すアクションを定義
id action = [CCSequence actions:
    [CCMoveBy actionWithDuration:2 position:ccp(200,0)],
    [CCCallFunc actionWithTarget:self selector:@selector(callback1)],
    nil];
// 2秒間にサイズを2倍にした後に2秒間かけてフェードアウトし、その後「callback2」関数を引数にこのアクションが適用されたスプライトをつけて呼び出す。
id action2 = [CCSequence actions:
    [CCScaleBy actionWithDuration:2  scale: 2],
    [CCFadeOut actionWithDuration:2],
    [CCCallFuncN actionWithTarget:self selector:@selector(callback2:)],
    nil];
// 3秒かけて360度回転した跡に2秒かけてフェードアウトし「callback3」関数をスプライトと「0xbebabeba」という変数（テスト用のダミー）
id action3 = [CCSequence actions:
    [CCRotateBy actionWithDuration:3  angle:360],
    [CCFadeOut actionWithDuration:2],
    [CCCallFuncND actionWithTarget:self selector:@selector(callback3:data:) data:(void*)0xbebabeba],
    nil];
// 各アクションをスプライトへセット
[grossini runAction:action];
[tamara runAction:action2];
[kathia runAction:action3];
</pre>
<p>テストのシミュレーター画面上では分かりにくいですが、xcodeのコンソールを見ると</p>
<pre class="brush: plain;">
ActionsTest[2168:207] callback 1 called
ActionsTest[2168:207] callback 2 called from:&lt;CCSprite = 05AE8150 | Rect = (0.00,0.00,52.00,139.00) | tag = -1 | atlasIndex = -1&gt;
callback 3 called from:&lt;CCSprite = 05AE82D0 | Rect = (0.00,0.00,56.00,138.00) | tag = -1 | atlasIndex = -1&gt; with data:bebabeba
</pre>
<p>とそれぞれの呼出の記録が残っています。</p>
<h4>ActionCallFuncNDクラス</h4>
<p>ActionCallFuncNDアクションのテスト（呼び出す際に引数に呼び出し元のスプライトを付け、更に任意の引数をセット出来る。）。</p>
<p>ActionCallFuncクラスとの違いは、actionWithTargetの引数のクラスがselfではなく、スプライトクラスとなっており、他のクラスのメソッドに引数を渡すことができるかを確認しているっぽい。</p>
<pre class="brush: plain;">
// 2秒間で右に200px移動した後、grossini（スプライト）のremoveFromParentAndCleanupメソッドを引数にYESを付けて呼び出す。
id action = [CCSequence actions:
    [CCMoveBy actionWithDuration:2 position:ccp(200,0)],
    [CCCallFuncND actionWithTarget:grossini selector:@selector(removeFromParentAndCleanup:) data:(void*)YES],
    nil];

// 定義したアクションをスプライトへセット
[grossini runAction:action];
</pre>
<p>ここで、「removeFromParentAndCleanup」メソッドはCCNodeクラスのメソッドで、</p>
<pre class="brush: plain;">
-(void) removeFromParentAndCleanup:(BOOL)cleanup;
</pre>
<p>のように定義されていて、このcleanup引数にYESを渡している。</p>
<h4>ActionOrbitクラス</h4>
<p>擬似3Dというか、2Dのスプライトを表示しているカメラ位置を変更するアニメーション（表示対象は2Dなので、平面を表示するカメラ位置が変わっているイメージ（分かりにくいですね、、、））</p>
<p>3Dはあまり理解していないので、今度時間があるときに少し勉強するとして、このクラスはザクっとスキップします。</p>
<pre class="brush: plain;">
// この前半で、カメラアングルを変えるアクションを定義している
id orbit1 = [CCOrbitCamera actionWithDuration:2 radius:1 deltaRadius:0 angleZ:0 deltaAngleZ:180 angleX:0 deltaAngleX:0];
id action1 = [CCSequence actions:
    orbit1,
    [orbit1 reverse],
    nil ];

id orbit2 = [CCOrbitCamera actionWithDuration:2 radius:1 deltaRadius:0 angleZ:0 deltaAngleZ:180 angleX:-45 deltaAngleX:0];
id action2 = [CCSequence actions:
    orbit2,
    [orbit2 reverse],
    nil ];

id orbit3 = [CCOrbitCamera actionWithDuration:2 radius:1 deltaRadius:0 angleZ:0 deltaAngleZ:180 angleX:90 deltaAngleX:0];
id action3 = [CCSequence actions:
    orbit3,
    [orbit3 reverse],
    nil ];
// カメラアングルの変更アクションを実行
[kathia runAction:[CCRepeatForever actionWithAction:action1]];
[tamara runAction:[CCRepeatForever actionWithAction:action2]];
[grossini runAction:[CCRepeatForever actionWithAction:action3]];

// 右に100px下に100pxを3秒かけて移動するアクションを定義
id move = [CCMoveBy actionWithDuration:3 position:ccp(100,-100)];
// 上のアクションの逆（左に100px、上に100pxを3秒かけて移動するアクション）を定義
id move_back = [move reverse];
// 2つのアクションを連続実行するアクションシーケンスを定義
id seq = [CCSequence actions:move, move_back, nil];
// 上で定義したアクションシーケンスを永遠に実行するアクションシーケンスを定義
id rfe = [CCRepeatForever actionWithAction:seq];
// 定義したアクションシーケンスをスプライトへ適用（同じアクションを適用するためcopyしてautoreleaseしていることに注意）
[kathia runAction:rfe];
[tamara runAction:[[rfe copy] autorelease]];
[grossini runAction:[[rfe copy] autorelease]];
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.itassist.info/modules/blog/archives/487/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.itassist.info/modules/blog/archives/487" />
	</item>
		<item>
		<title>cocos2d:アクション修飾の各種メソッド一覧（作成中）</title>
		<link>http://www.itassist.info/modules/blog/archives/488</link>
		<comments>http://www.itassist.info/modules/blog/archives/488#comments</comments>
		<pubDate>Sun, 25 Jul 2010 09:25:49 +0000</pubDate>
		<dc:creator>abe</dc:creator>
				<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[cocos2d]]></category>
		<category><![CDATA[開発言語]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.itassist.info/modules/blog/?p=488</guid>
		<description><![CDATA[量が増えてきたのでページを分離しました。
サンプルプログラムの勉強をしながら更新しているのでまだまだ網羅されていません。
アクション修飾メソッド
CCRepeat
useage:　[CCRepeat actionWith・・・・・]]></description>
			<content:encoded><![CDATA[<p>量が増えてきたのでページを分離しました。</p>
<p>サンプルプログラムの勉強をしながら更新しているのでまだまだ網羅されていません。</p>
<h3>アクション修飾メソッド</h3>
<h4><a title="CCRepeat" href="#CCRepeat">CCRepeat</a></h4>
<p>useage:　[CCRepeat actionWithAction:? times:?]</p>
<pre>指定回数繰り返すアクションを生成する。
</pre>
<ul>
<li>actionWithAction:　繰り返す対象のアクション</li>
<li>times:　繰り返す回数</li>
</ul>
<h4><a title="CCRepeatForever" href="#CCRepeatForever">CCRepeatForever</a></h4>
<p>useage:　[CCRepeatForever actionWithAction:actionUp]</p>
<p>永遠に繰り返すアクションを生成する。</p>
<ul>
<li>actionWithAction:　繰り返す対象のアクション</li>
</ul>
<h4><a title="CCSequence" href="#CCSequence">CCSequence</a></h4>
<p>useage:　[CCSequence actions:?,?,?,nil]</p>
<p>複数のアクションを連続して実行するアクションを定義</p>
<ul>
<li>actions:　連続して実行するアクションをカンマ区切りでセット</li>
</ul>
<p>※最後は終了を表す「nil」をセットする。</p>
<h4><a title="CCSpawn" href="#CCSpawn">CCSpawn</a></h4>
<p>useage:　[CCSpawn actions:?,?,nil]</p>
<p>複数のアクションを同時に実行するアクションを定義</p>
<ul>
<li>actions:　同時に実行するアクションをカンマ区切りでセット</li>
</ul>
<p>※最後は終了を表す「nil」をセットする。</p>
<h4><a title="reverse" href="#reverse">reverse</a></h4>
<p>useage:　[アクション reverse]</p>
<p>指定したアクションを逆向きに実行するアクション</p>
<p>逆と言ってもすべてが逆ではなく、例えばJumpなどはジャンプの方向や高さは同じとなる。</p>
<ul>
<li>アクション:　逆にする対象のアクション</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.itassist.info/modules/blog/archives/488/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.itassist.info/modules/blog/archives/488" />
	</item>
		<item>
		<title>cocos2d:アクションメソッド一覧（作成中）</title>
		<link>http://www.itassist.info/modules/blog/archives/489</link>
		<comments>http://www.itassist.info/modules/blog/archives/489#comments</comments>
		<pubDate>Sun, 25 Jul 2010 09:25:17 +0000</pubDate>
		<dc:creator>abe</dc:creator>
				<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[cocos2d]]></category>
		<category><![CDATA[開発言語]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.itassist.info/modules/blog/?p=489</guid>
		<description><![CDATA[量が増えてきたのでページを分離しました。
サンプルプログラムの勉強をしながら更新しているのでまだまだ網羅されていません。
アクションメソッド
runActionメソッドを利用して適用できる各種アクションメソッド
CCAn・・・・・]]></description>
			<content:encoded><![CDATA[<p>量が増えてきたのでページを分離しました。</p>
<p>サンプルプログラムの勉強をしながら更新しているのでまだまだ網羅されていません。</p>
<h3>アクションメソッド</h3>
<p>runActionメソッドを利用して適用できる各種アクションメソッド</p>
<h4><a title="CCAnimate" href="#CCAnimate">CCAnimate</a></h4>
<p>useage:　[CCAnimate actionWithDuration:? animation:? restoreOriginalFrame:?]</p>
<p>画像を切替えてアニメーションする</p>
<ul>
<li>actionWithDuration:　アニメーション時間</li>
<li>animation:　CCAnimationクラス</li>
<li>restoreOriginalFrame:　実行後最初のフレームへ戻るか？:　例）NO</li>
</ul>
<p>CCAnimationクラスは以下のように定義する。</p>
<pre class="brush: plain;">
// アニメーション名と共にクラスのインスタンス化
CCAnimation* animation = [CCAnimation animationWithName:@&quot;アニメーション名&quot;];

// フレーム数分画像ファイルを追加（フレーム数分実行する）
[animation addFrameWithFilename: @&quot;ファイル名&quot;];
</pre>
<h4><a title="CCBezierBy" href="#CCBezierBy">CCBezierBy</a></h4>
<p>useage:　[CCBezierBy actionWithDuration:? bezier:?]</p>
<p>ベジェ曲線のアニメーション</p>
<ul>
<li>actionWithDuration:　移動に要する時間</li>
<li>bezier:　ベジェ曲線の定義用のccBezierConfig構造体</li>
</ul>
<p>bezier曲線定義用の構造体は以下のように設定する。</p>
<pre class="brush: plain;">
bezier2.controlPoint_1 = ccp(100, s.height/2);
 bezier2.controlPoint_2 = ccp(200, -s.height/2);
 bezier2.endPosition = ccp(240,160);
</pre>
<h4><a title="CCBlink" href="#CCBlink">CCBlink</a></h4>
<p>useage:　[CCBlink actionWithDuration:2 blinks:10]</p>
<p>指定時間、指定回数点滅するアニメーション</p>
<ul>
<li>actionWithDuration:　実行時間</li>
<li>blinks:　時間内の点滅回数</li>
</ul>
<h4><a title="CCCallFunc" href="#CCCallFunc"><code>CCCallFunc</code></a></h4>
<p><code>useage: </code><code>[CCCallFunc actionWithTarget:?   selector:?]</code></p>
<p>指定したメソッドを実行</p>
<ul>
<li><code>actionWithTarget: 関数のクラス:　例）self</code></li>
<li><code> selector:　関数:　例）@selector(hogehogeMethod:)</code></li>
</ul>
<h4><a title="CCCallFunc" href="#CCCallFunc"><code>CCCallFuncN</code></a></h4>
<p><code>useage: </code><code>[CCCallFuncN actionWithTarget:?    selector:?]</code></p>
<p>指定したメソッドを実行</p>
<ul>
<li><code>actionWithTarget: 関数のクラス:　例）self</code></li>
<li><code> selector:　関数:　例）@selector(hogehogeMethod:)</code></li>
</ul>
<p>※CCallFuncとほぼ同じ挙動だが、呼び出されるメソッドの引数にsender（呼び出したスプライト）がつく</p>
<p>受ける関数では以下のように受け取る</p>
<pre class="brush: plain;">
-(void) 関数名:(id)sender
// senderは任意の変数名
</pre>
<h4><a title="CCCallFunc" href="#CCCallFunc"><code>CCCallFuncND</code></a></h4>
<p><code>useage: </code><code>[CCCallFuncND actionWithTarget:?    selector:? </code>data:?<code>]</code></p>
<p>指 定したメソッドを実行</p>
<ul>
<li><code>actionWithTarget: 関数のクラス:　例）self</code></li>
<li><code> selector:　関数:　例）@selector(hogehogeMethod:)</code></li>
<li>data:　引数となるデータ</li>
</ul>
<p>※ CCallFuncNとほぼ同じ挙動だが、呼び出されるメソッドの引数に任意の引数を付けられる</p>
<p>受ける関数では以下のように受け取る</p>
<pre class="brush: plain;">
-(void) 関数名:(id)sender data:(void*)data
// senderとdataは任意の変数名
</pre>
<h4><a title="CCDelayTime" href="#CCDelayTime"><code>CCDelayTime</code></a></h4>
<p><code>useage:　[CCDelayTime</code><code> actionWithDuration:?]</code></p>
<p>指定時間待機</p>
<ul>
<li><code>actionWithDuration: 待機時間（秒）: 例）1.1f</code></li>
</ul>
<h4><a title="CCFadeIn" href="#CCFadeIn">CCFadeIn</a></h4>
<p>useage:　[CCFadeIn actionWithDuration:?]</p>
<p>対象をフェードイン</p>
<ul>
<li>actionWithDuration:　フェードインに要する時間（秒）:　例）1.5f</li>
</ul>
<h4><a title="CCFadeOut" href="#CCFadeOut"><code>CCFadeOut</code></a></h4>
<p><code>useage: </code><code>[CCFadeOut actionWithDuration:?]</code></p>
<p>対象をフェードアウト</p>
<ul>
<li><code>actionWithDuration: フェードアウトに要する時間（秒）</code><code> 例）1.1f</code></li>
</ul>
<h4><a title="CCHide" href="#CCHide">CCHide</a></h4>
<p>useage:　[CCHide action]</p>
<p>対象を非表示にする。</p>
<h4><a title="CCJumpTo" href="#CCJumpTo">CCJumpTo</a></h4>
<p>useage:　[CCJumpTo actionWithDuration:? position:? height:? jumps:?]</p>
<p>指定した相対位置へジャンプしながら移動するアニメーション</p>
<ul>
<li>actionWithDuration:　ジャンプする時間</li>
<li>position:　移動先:　例）ccp(300,300)</li>
<li>height:　ジャンプの高さ</li>
<li>jumps:　ジャンプの回数</li>
</ul>
<h4><a title="CCJumpBy" href="#CCJumpBy">CCJumpBy</a></h4>
<p>useage:　[CCJumpBy actionWithDuration:2 position:ccp(300,0) height:50 jumps:4];</p>
<p>指定した方向へジャンプしながら移動するアニメーション</p>
<ul>
<li>actionWithDuration:　ジャンプする時間</li>
<li>position:　移動方向:　例）ccp(300,300)</li>
<li>height:　ジャンプの高さ</li>
<li>jumps:　ジャンプの回数</li>
</ul>
<h4><a title="CCMoveBy" href="#CCMoveBy"><code>CCMoveBy</code></a></h4>
<p><code>useage: [CCMoveBy actionWithDuration:?  position:?]</code></p>
<p>指定方向へ指定した時間をかけて移動（CCMoveToと異なり速さを指定している）</p>
<ul>
<li>actionWithDuration:　移動時間（秒):　例）1.1f</li>
<li>position:　位置:　例）<code>ccp(80,0)</code></li>
</ul>
<h4><a title="CCMoveTo" href="#CCMoveTo"><code>CCMoveTo</code></a></h4>
<p><code>useage: [CCMoveTo actionWithDuration:?  position:?]</code></p>
<p>指定位置へ指定した時間をかけて移動（CCMoveByと異なり到着地点を指定している）</p>
<ul>
<li>actionWithDuration:　移動時間（秒):　例）1.1f</li>
<li>position:　位置:　例）<code>ccp(150,0)</code></li>
</ul>
<h4><a title="CCOrbitCamera" href="#CCOrbitCamera">CCOrbitCamera</a></h4>
<p>useage: [CCOrbitCamera actionWithDuration:? radius:? deltaRadius:? angleZ:? deltaAngleZ:? angleX:? deltaAngleX:?]</p>
<p>カメラ位置を変更する</p>
<ul>
<li>actionWithDuration: 変化にかかる時間（秒）</li>
<li>radius:</li>
<li>deltaRadius:</li>
<li>angleZ:</li>
<li>deltaAngleZ:</li>
<li>angleX:</li>
<li>deltaAngleX:</li>
</ul>
<p>うーん、3Dをちょっと勉強して、何を示しているか後で書きます。</p>
<h4><a title="CCPlace" href="#CCPlace">CCPlace</a></h4>
<p>useage: [CCPlace actionWithPosition:?]</p>
<p>指定した座標へ瞬間移動する</p>
<p>actionWithPosition:　移動先座標：例）ccp(60,60)</p>
<p>※ccpは座標を示すCGPointクラスを返す関数</p>
<h4><a title="CCShow" href="#CCShow">CCShow</a></h4>
<p>useage:　[CCShow action]</p>
<p>対象を表示にする。</p>
<h4><a title="CCScaleTo" href="#CCScaleTo">CCScaleTo</a></h4>
<p>useage: [CCScaleTo actionWithDuration: scale:? scale:?]</p>
<p>useage2: [CCScaleTo actionWithDuration: ? scaleX:? scaleY:?]</p>
<p>指定したサイズへ指定した時間をかけてサイズ変更する</p>
<ul>
<li>actionWithDuration:　変化に係る時間（秒）:　例）1.1f</li>
<li>scale:　サイズ（倍数）:　例）0.5f</li>
<li>scaleX:　横方向倍率：　例）0.5f</li>
<li>scaleY:　縦方向倍率：　例）0.5f</li>
</ul>
<h4><a title="CCTintTo" href="#CCTintTo">CCTintTo</a></h4>
<p>useage:　[CCTintTo actionWithDuration:? red:? green:? blue:?]</p>
<p>色合いを変化させる</p>
<ul>
<li>actionWithDuration:　変化に要する時間</li>
<li>red:　赤の色の変化(0-255):　例）255</li>
<li>green:　緑の色の変化(0-255):　例）127</li>
<li>blue:　青色の変化(0-255):　例）-127</li>
</ul>
<h4><a title="CCToggleVisibility" href="#CCToggleVisibility">CCToggleVisibility</a></h4>
<p>useage:　[CCToggleVisibility action]</p>
<p>呼び出されるたびに表示非表示を切り替えるアクション</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itassist.info/modules/blog/archives/489/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.itassist.info/modules/blog/archives/489" />
	</item>
		<item>
		<title>cocos2dサンプル:ActionTestの内容(2)</title>
		<link>http://www.itassist.info/modules/blog/archives/471</link>
		<comments>http://www.itassist.info/modules/blog/archives/471#comments</comments>
		<pubDate>Tue, 13 Jul 2010 16:15:45 +0000</pubDate>
		<dc:creator>abe</dc:creator>
				<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[cocos2d]]></category>
		<category><![CDATA[iPhoneSDK]]></category>
		<category><![CDATA[開発言語]]></category>

		<guid isPermaLink="false">http://www.itassist.info/modules/blog/?p=471</guid>
		<description><![CDATA[cocos2dのサンプルを勉強がてら読みといていくメモです。テストコードのActionTestを読んでいってみます。全体の流れは他のテストと同じみたいなので個別の部分を読んでみます。
cocos2dサンプル:Action・・・・・]]></description>
			<content:encoded><![CDATA[<p>cocos2dのサンプルを勉強がてら読みといていくメモです。テストコードのActionTestを読んでいってみます。<a href="http://www.itassist.info/modules/blog/archives/346">全体の流れは他のテスト</a>と同じみたいなので個別の部分を読んでみます。</p>
<p><!-- START CONTENTS --><a href="../archives/384">cocos2dサンプル:ActionTestの内容(1)の続きです。<br />
</a></p>
<h4>ActionRotateToRepeatクラス</h4>
<p>指定回数アクションを繰り返すテスト</p>
<pre class="brush: plain;">
// 90度まで1秒で回転するアクションを定義
id act1 = [CCRotateTo actionWithDuration:1 angle:90];

// 0度まで1秒で回転するアクションを定義
id act2 = [CCRotateTo actionWithDuration:1 angle:0];

// 2つのアクションを連続実行するアクションシーケンスを定義
id seq = [CCSequence actions:act1, act2, nil];

// シーケンスを永遠に繰り返すアクションシーケンスを定義
id rep1 = [CCRepeatForever actionWithAction:seq];

// シーケンスを10回実行して終了するアクションシーケンスを定義
id rep2 = [CCRepeat actionWithAction:[[seq copy] autorelease] times:10];

// それぞれのアクションをスプライトへ適用
[tamara runAction:rep1];
[kathia runAction:rep2];
</pre>
<h4>ActionRotateJerkクラス</h4>
<p>ActionRotateToRepeatとほぼ同じ（角度とスピードが違う）</p>
<pre class="brush: plain;">
// −20度、20度へそれぞれ0.5秒で回転するアクションシーケンスを定義
id seq = [CCSequence actions:
    [CCRotateTo actionWithDuration:0.5f angle:-20],
    [CCRotateTo actionWithDuration:0.5f angle:20],
    nil];
// 定義したアクションシーケンスを10回繰り返すアクションシーケンスを定義
id rep1 = [CCRepeat actionWithAction:seq times:10];
// 定義したアクションシーケンスを永遠に繰り返すアクションシーケンスを定義
id rep2 = [CCRepeatForever actionWithAction: [[seq copy] autorelease] ];
// それぞれのスプライトへアクションシーケンスをセット
[tamara runAction:rep1];
[kathia runAction:rep2];
</pre>
<h4>ActionReverseクラス</h4>
<p>ここまででも、何度か登場しましたが、アクションを逆向きに実行するアクションのテスト</p>
<pre class="brush: plain;">
// 高さ50pxで2秒間に4回のジャンプで300px横に移動するアクションを定義
id jump = [CCJumpBy actionWithDuration:2 position:ccp(300,0) height:50 jumps:4];

// 定義したアクションを実行後、逆向き
// （高さ50pxで2秒間に4回のジャンプで-300px横に移動するアクション）を定義
 id action = [CCSequence actions: jump, [jump reverse], nil];
 // アクションをスプライトへセット
 [grossini runAction:action];
</pre>
<h4>ActionDelayTimeクラス</h4>
<p>指定した時間停止するアクションのテスト、アクションとアクションの間に時間を儲けたい時などに利用する。</p>
<pre class="brush: plain;">
// 右方向に1秒間に150px移動するアクションを定義
id move = [CCMoveBy actionWithDuration:1 position:ccp(150,0)];

// 定義したアクションの後、2秒停止して、再度アクションを実行するアクションシーケンスを定義
id action = [CCSequence actions: move, [CCDelayTime actionWithDuration:2], move, nil];
// 定義したアクションシーケンスをセット
[grossini runAction:action];
</pre>
<h4>ActionReverseSequenceクラス</h4>
<p>ActionReverseクラスに似ているが、アクションではなくアクションシーケンスをreverseするテスト</p>
<pre class="brush: plain;">
// 1秒間に250px横に移動するアクションを定義
id move1 = [CCMoveBy actionWithDuration:1 position:ccp(250,0)];

// 1秒間に上に50px移動するアクションを定義
id move2 = [CCMoveBy actionWithDuration:1 position:ccp(0,50)];

// 定義したシーケンスとreverseを組み合わせたアクションシーケンスを定義
id seq = [CCSequence actions: move1, move2, [move1 reverse], nil];

// 定義したアクションシーケンスと、アクションシーケンスをreverseしたアクションシーケンスを定義
id action = [CCSequence actions: seq, [seq reverse], nil];

// 定義したアクションシーケンスをスプライトへセット
[grossini runAction:action];
</pre>
<h4>ActionReverseSequence2クラス</h4>
<p>ActionReverseSequenceに似ているが、CCToggleVisibility、CCHideアクションへreverseを適用するテスト</p>
<pre class="brush: plain;">
// 移動のシーケンスを定義
id move1 = [CCMoveBy actionWithDuration:1 position:ccp(250,0)];
id move2 = [CCMoveBy actionWithDuration:1 position:ccp(0,50)];

// 実行するたびに表示非表示を切り替えるアクションを定義
id tog1 = [CCToggleVisibility action];
id tog2 = [CCToggleVisibility action];

// 定義したアクションを組み合わせたアクションシーケンスを定義
id seq = [CCSequence actions: move1, tog1, move2, tog2, [move1 reverse], nil];

// さらに、reverseとCCRepeatを適用（ここまで来るとちょっと入り組んでますね、ざっと流れを追うと）
// move1で右へ1秒で250px移動
// tog1で非表示に
// move2で消えた状態で上に50px移動
// tog2で表示に
// ここから[move1 reverse]
// tog2で非表示に
// move2で消えた状態で下に50px移動
// tog1で表示に
// move1で左に250px移動
// これを3回繰り返す
id action = [CCRepeat actionWithAction:[CCSequence actions: seq, [seq reverse], nil]
times:3];

// 作成したアクションシーケンスをセット
[kathia runAction:action];

// こちらはCCHideを使った例、ここでは触れていないですがCCHideの逆の当然CCShowも用意されています。
// 移動のアクションを定義
id move_tamara = [CCMoveBy actionWithDuration:1 position:ccp(100,0)];
id move_tamara2 = [CCMoveBy actionWithDuration:1 position:ccp(50,0)];
// 非表示にするアクションを定義
id hide = [CCHide action];
// 組み合わせてアクションシーケンスと、そのreverseを定義
id seq_tamara = [CCSequence actions: move_tamara, hide, move_tamara2, nil];
id seq_back = [seq_tamara reverse];
// 同じくアクションシーケンスをセット
// 一応追いかけると
// move_tamaraで1秒間で右に100px移動
// hideで非表示に
// move_tamara2で非表示状態で上に50px移動
// ここからseq_back
// move_tamara2で非表示状態で下方向に50px移動
// hideで表示に（reverseかかっているため）
// move_tamaraで左に100px移動
[tamara runAction: [CCSequence actions: seq_tamara, seq_back, nil]];
</pre>
</pre>
<p>いやー、長い、続きは次回</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itassist.info/modules/blog/archives/471/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.itassist.info/modules/blog/archives/471" />
	</item>
		<item>
		<title>jQueryでサイコロを実装するプラグイン</title>
		<link>http://www.itassist.info/modules/blog/archives/442</link>
		<comments>http://www.itassist.info/modules/blog/archives/442#comments</comments>
		<pubDate>Tue, 13 Jul 2010 12:20:59 +0000</pubDate>
		<dc:creator>abe</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[開発言語]]></category>

		<guid isPermaLink="false">http://www.itassist.info/modules/blog/?p=442</guid>
		<description><![CDATA[ちょっとした別件で必要になったので作ってみました。
利用しているサイコロ画像はイラスト素材の素材ダスさんからお借りしたので、入用な際は自前で用意するか、イラスト素材の素材ダスさんへのリンクを張ってください。

$(doc・・・・・]]></description>
			<content:encoded><![CDATA[<p>ちょっとした別件で必要になったので作ってみました。</p>
<p>利用しているサイコロ画像は<a href="http://www.sozaidas.com/" target="blank">イラスト素材の素材ダス</a>さんからお借りしたので、入用な際は自前で用意するか、<a href="http://www.sozaidas.com/" target="blank">イラスト素材の素材ダス</a>さんへのリンクを張ってください。</p>
<p><script  type="text/javascript">
$(document).ready( function(){
    $("#dice").dice({
        dice1: "http://www.itassist.info/modules/blog/wp-content/uploads/2010/07/dice_1.png",
        dice2: "http://www.itassist.info/modules/blog/wp-content/uploads/2010/07/dice_2.png",
        dice3: "http://www.itassist.info/modules/blog/wp-content/uploads/2010/07/dice_3.png",
        dice4: "http://www.itassist.info/modules/blog/wp-content/uploads/2010/07/dice_4.png",
        dice5: "http://www.itassist.info/modules/blog/wp-content/uploads/2010/07/dice_5.png",
        dice6: "http://www.itassist.info/modules/blog/wp-content/uploads/2010/07/dice_6.png",
        callback: function(diceValue){alert(diceValue);},
        duration: 5000
    });
});</script><br />
<img src="http://www.itassist.info/modules/blog/wp-content/uploads/2010/07/dice_1.png" id="dice" class="maskover"/></p>
<p><strong><span style="text-decoration: underline;">ダウンロード</span></strong></p>
<p><a href="http://www.itassist.info/modules/d3downloads/index.php?page=visit&#038;cid=6&#038;lid=7">http://www.itassist.info/modules/d3downloads/index.php?page=visit&#038;cid=6&#038;lid=7</a></p>
<p><span style="text-decoration: underline;"><strong>使い方（設置方法）</strong></span></p>
<p>設置方法は至って簡単、jquery.timer.jsを使っているのでそれと一緒にヘッダーで読み込んでおきます。</p>
<pre class="brush: plain;">
&lt;script  type=&quot;text/javascript&quot; src=&quot;js/jquery-1.4.2.min.js&quot;&gt;&lt;/script&gt;
&lt;script  type=&quot;text/javascript&quot; src=&quot;js/jquery.timer.js&quot;&gt;&lt;/script&gt;
&lt;script  type=&quot;text/javascript&quot; src=&quot;js/jquery.dice.js&quot;&gt;&lt;/script&gt;
</pre>
<p>その後、実行したいイメージタグにclassかidを指定して</p>
<pre class="brush: plain;">
&lt;img src=&quot;img/dice_1.png&quot; id=&quot;dice&quot;/&gt;
</pre>
<p>ヘッダからonloadでセットします。</p>
<pre class="brush: xml;">&lt;/pre&gt;
&lt;script  type=&quot;text/javascript&quot;&gt;
$(document).ready(, function(){
$(&quot;#dice&quot;).dice();
});

&lt;/script&gt;
</pre>
<p><span style="text-decoration: underline;"><strong>使い方（ダイス実行）</strong></span></p>
<p>後はダイスの実行開始ですが、2つの方法があります。1つはクリックイベントで自動実行する場合</p>
<p>もうひとつは、jQuery.triggerHandlerを使って直接呼び出す場合です。</p>
<p>クリックイベントはデフォルトで実装されているので、意識せずに実装するとクリックイベントでダイスが実行されます。</p>
<p>jQuery.triggerHandlerを使う場合はreadyでの記載を以下のようにします。</p>
<pre class="brush: xml;">
&lt;script  type=&quot;text/javascript&quot;&gt;
$(document).ready(, function(){
$(&quot;#dice&quot;).dice({onclick: false});
});
&lt;/script&gt;
</pre>
<p>「onclick: true」とすることで、クリックイベントへbindされなくなります。実行するときは</p>
<pre class="brush: xml;">
$('#dice').triggerHandler(&quot;throwDice&quot;);
</pre>
<p>のように「throwDice」イベントハンドラを実行すると開始されます。</p>
<p><span style="text-decoration: underline;"><strong>使い方（結果の取得方法）</strong></span></p>
<p>結果の取得方法も２つあります。１つは、jQuery.dataにデータを自動で保持するように成っているためそこから取得することができます。</p>
<pre class="brush: plain;">
jQuery.data($(&quot;#dice&quot;).get(0),&quot;dice&quot;)
</pre>
<p>ここで、データのキーとなるdiceはオプションで変更可能です。</p>
<p>もうひとつは、callback関数を用意して、その関数内で受取る方法です。</p>
<pre class="brush: plain;">
$(this).triggerHandler(&quot;throwDice&quot;, {callback: function (diceValue) {alert(diceValue);}});
</pre>
<p>の用に、コールバックで指定した関数の第一引数にダイスの結果が戻ってきます。</p>
<p><span style="text-decoration: underline;"><strong>使い方（設定変更方法）</strong></span></p>
<p>以下の項目を引数で設定できます。</p>
<ul>
<li> dice1: &#8220;img/dice_1.png&#8221;, // ダイスの１の目の画像</li>
<li> dice2: &#8220;img/dice_2.png&#8221;, // ダイスの2の目の画像</li>
<li> dice3: &#8220;img/dice_3.png&#8221;, // ダイスの3の目の画像</li>
<li> dice4: &#8220;img/dice_4.png&#8221;, // ダイスの4の目の画像</li>
<li> dice5: &#8220;img/dice_5.png&#8221;, // ダイスの5の目の画像</li>
<li> dice6: &#8220;img/dice_6.png&#8221;, // ダイスの6の目の画像</li>
<li> maxdice: 6,  // ダイスの目の数</li>
<li> onclick: true,  // クリックイベントをセットするかどうか</li>
<li> //callback: // コールバック関数</li>
<li> oneDuration: 10,  // 一回の変化の秒数</li>
<li> duration: 1000,	// ダイスが廻っている時間</li>
<li> dataKey: &#8220;dice&#8221; // jQuery.dataのキー</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.itassist.info/modules/blog/archives/442/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.itassist.info/modules/blog/archives/442" />
	</item>
	</channel>
</rss>

