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

<channel>
	<title>planet-ape&#124;blog &#187; BetweenAS3</title>
	<atom:link href="http://www.planet-ape.net/blog/archives/tag/betweenas3/feed" rel="self" type="application/rss+xml" />
	<link>http://www.planet-ape.net/blog</link>
	<description>We Love WordPress</description>
	<lastBuildDate>Sun, 20 Nov 2011 09:36:42 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>DoTextAnimationコマンド(Progrssion4用)を作りました</title>
		<link>http://www.planet-ape.net/blog/archives/862</link>
		<comments>http://www.planet-ape.net/blog/archives/862#comments</comments>
		<pubDate>Thu, 31 Dec 2009 09:49:13 +0000</pubDate>
		<dc:creator>fumix</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[actionscript3.0]]></category>
		<category><![CDATA[BetweenAS3]]></category>
		<category><![CDATA[Progression]]></category>

		<guid isPermaLink="false">http://www.planet-ape.net/blog/?p=862</guid>
		<description><![CDATA[普段はいうほどFlashを触ってないので「年末年始は逆にいっぱいFlash触ろう！」的なやつの第1弾です（2弾以降続く保証は全くないです）。 ランダムにテキストがピロピロ？とアニメーションする、よく見るエフェクトをPro [...]]]></description>
			<content:encoded><![CDATA[				<p>普段はいうほどFlashを触ってないので「年末年始は逆にいっぱいFlash触ろう！」的なやつの第1弾です（2弾以降続く保証は全くないです）。<br />
				ランダムにテキストがピロピロ？とアニメーションする、よく見るエフェクトをProgression4用のコマンドとして作ってみました。<br />
				<span id="more-862"></span><br />
				<a href="http://wonderfl.net/code/31708cc4caa15c0ba3c37ab098bc33fab677de12">wonderflに実装例</a>が既にあるのでそれを元に作ろうと思ったのですが、あまり自由度が無い感じでアニメーション自体もイマイチ好みじゃないので別実装しました。</p>
				<p>ソース（zip）<br />
				・<a href='http://www.planet-ape.net/wp-content/uploads/2009/12/DoTextAnimation.as_.zip'>DoTextAnimation.as</a><br />
				※別途<a href="http://www.libspark.org/wiki/BetweenAS3/en">BetweenAS3ライブラリ</a>が必要です。</p>
				<p>以下、サンプルと使用例のasです。</p>
				<p><div style="text-align: center; width:200px; height:25px; line-height:25px; background: #ffffff;"><div id="swf91e02">This movie requires Flash Player 9.0.0</div></div>
				<script type="text/javascript">
					swfobject.embedSWF("http://www.planet-ape.net/wp-content/uploads/2009/12/Sample.swf", "swf91e02", "200", "25", "9.0.0", "http://www.planet-ape.net/kjFavmAascPn9aB/wp-content/plugins/wp-al-swfobject/expressInstall.swf", {}, {}, {});
				</script>
				</p>
				<pre class="brush: as">
package {
	import jp.progression.commands.lists.LoopList;
	import org.libspark.betweenas3.easing.Expo;
	import flash.display.MovieClip;
	import flash.events.Event;
	import flash.text.TextField;

	/**
	 * @author fumix
	 */
	 [SWF(backgroundColor="#FFFFFF", frameRate="30", width="200", height="25")]
	public class Sample extends MovieClip {
		private var tf : TextField;

		public function Sample() {
			addEventListener(Event.ADDED_TO_STAGE, _initialize);
		}

		private function _initialize(event : Event) : void {
			tf = new TextField();
			tf.x = tf.y = 5;
			addChild(tf);
			var loop:LoopList = new LoopList();
			loop.addCommand(
				new DoTextAnimation(tf, "Hello World!!","welcome to www.planet-ape.net!",
					{
						step: 4,
						time: 3,
						characters: "0123456789-#",
						transition: Expo.easeInOut
					}),
				new DoTextAnimation(tf, "welcome to www.planet-ape.net!","Hello World!!",
					{
						step: 4,
						time: 3,
						delay: 1,
						//characters: "0123456789-#",
						transition: Expo.easeInOut
					})
			);
			loop.execute();
		}
	}
}
</pre>
				<p>LoopList内に2つDoTextAnimationを設置してループさせています。<br />
				第1引数が対象となるTextField、第2引数が変化前のテキスト、第3引数が変化後のテキストとなり、この3つは必須です。<br />
				それ以降のObjectはプロパティ名から何となく分かると思います（ぉ）。<br />
				Objectは全くなくても動作します。</p>
				<p>元ネタ：<a href="http://labs.hellokeita.com/2007/09/20/textanimation/">labs.hellokeita.com » TextAnimation</a><br />
				ゼロから実装できるほどas得意じゃないんで、元ネタ有りです。<br />
				はい、もうTextAnimationの元祖的な感じです。<br />
				元ネタはtransition自体も自力実装だったのですが・・・すいません、BetweenAS3使ってます。</p>
				<p>自分で言うのもなんですが、なかなか良さげなコマンドができました。<br />
				初めてまともに使えそうなコマンドになったなあ、と。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.planet-ape.net/blog/archives/862/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

