<?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>イテルの一日一問 &#187; ボタン</title>
	<atom:link href="http://oneday.ter.jp/tag/%e3%83%9c%e3%82%bf%e3%83%b3/feed" rel="self" type="application/rss+xml" />
	<link>http://oneday.ter.jp</link>
	<description>一日にひとつは何かを考える。</description>
	<lastBuildDate>Mon, 31 Jan 2011 09:23:33 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://oneday.ter.jp/tag/%e3%83%9c%e3%82%bf%e3%83%b3/feed" />
		<item>
		<title>Tweenerでなんか動かす。</title>
		<link>http://oneday.ter.jp/actionscript3/218.html</link>
		<comments>http://oneday.ter.jp/actionscript3/218.html#comments</comments>
		<pubDate>Sat, 27 Jun 2009 13:35:00 +0000</pubDate>
		<dc:creator>イテル</dc:creator>
				<category><![CDATA[ActionScript3]]></category>
		<category><![CDATA[tweener]]></category>
		<category><![CDATA[ボタン]]></category>
		<category><![CDATA[移動]]></category>

		<guid isPermaLink="false">http://oneday.ter.jp/?p=218</guid>
		<description><![CDATA[なんか手抜き調ですが、今日もtweenerで間をつなぐことに。 とりあえず、なんか動かしてみよう。 クリックすると、ほら動いた（笑 クリックしたら座標x280、座標y80に一回点しながら、10秒かけて移動しろって意味。  [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-236" title="090630" src="http://oneday.ter.jp/wp-content/uploads/2009/06/090630-700x200.jpg" alt="090630" width="700" height="200" /></p>
<p>なんか手抜き調ですが、今日もtweenerで間をつなぐことに。</p>
<p>とりあえず、なんか動かしてみよう。</p>
<pre class="brush: as3; title: ; notranslate">
//tweener読み込み
import caurina.transitions.Tweener;
//ボールの初期位置
Tweener.addTween( ball_mc , { x:31 , y:31 });

//マウスカーソルを指にする
ball_mc.buttonMode=true;
//イベント登録
ball_mc.addEventListener(MouseEvent.ROLL_OVER,over);
ball_mc.addEventListener(MouseEvent.ROLL_OUT,out);
ball_mc.addEventListener(MouseEvent.CLICK,click);

//マウスオーバーの動き
function over(e:Event):void{
Tweener.addTween( ball_mc , { alpha:0.5 , time:1 });
}
//マウスアウトの動き
function out(e:Event):void{
Tweener.addTween( ball_mc , { alpha:1 , time:1 });
}
function click(e:MouseEvent):void{
Tweener.addTween( ball_mc , { x:31 , y:31 });
Tweener.addTween( ball_mc , { x:280 , y:80 , rotation:360 , time:10 });
}
</pre>
<p>クリックすると、ほら動いた（笑</p>
<p>クリックしたら座標x280、座標y80に一回点しながら、10秒かけて移動しろって意味。</p>
<p>単純な移動なら楽チン。</p>
<p><object type="application/x-shockwave-flash" style="width:350px;height:125px" data="http://oneday.ter.jp/swf_data/0906/090627/ball3.swf"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="quality" value="best" /><param name="wmode" value="transparent" /><param name="movie" value="http://oneday.ter.jp/swf_data/0906/090627/ball3.swf" /><param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer" />If you can see this, then you might need a Flash Player upgrade or you need to install Flash Player if it's missing. Get <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash Player</a> from Adobe.</object><br/>
		<!-- Valid XHTML flash object delivered by XHTML Video Embed. Get it at: http://saltwaterc.net/xhtml-video-embed -->
		</p>
<p>※手抜き投稿って言わないで。</p>
]]></content:encoded>
			<wfw:commentRss>http://oneday.ter.jp/actionscript3/218.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://oneday.ter.jp/actionscript3/218.html" />
	</item>
		<item>
		<title>Tweenerとボタンの応用</title>
		<link>http://oneday.ter.jp/actionscript3/210.html</link>
		<comments>http://oneday.ter.jp/actionscript3/210.html#comments</comments>
		<pubDate>Fri, 26 Jun 2009 14:28:41 +0000</pubDate>
		<dc:creator>イテル</dc:creator>
				<category><![CDATA[ActionScript3]]></category>
		<category><![CDATA[tweener]]></category>
		<category><![CDATA[ボタン]]></category>

		<guid isPermaLink="false">http://oneday.ter.jp/?p=210</guid>
		<description><![CDATA[昨日のTweenerと一昨日のボタンの応用で、あらたにボタンを作ってみた。 で、できたのがこれ。 If you can see this, then you might need a Flash Player upgra [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-238" title="090630" src="http://oneday.ter.jp/wp-content/uploads/2009/06/0906301-700x200.jpg" alt="090630" width="700" height="200" /></p>
<p>昨日のTweenerと一昨日のボタンの応用で、あらたにボタンを作ってみた。</p>
<pre class="brush: as3; title: ; notranslate">
//tweener読み込み
import caurina.transitions.Tweener;
//マウスカーソルを指にする
ball_mc.buttonMode=true;
//イベント登録
ball_mc.addEventListener(MouseEvent.ROLL_OVER,over);
ball_mc.addEventListener(MouseEvent.ROLL_OUT,out);

//マウスオーバーの動き
function over(e:Event):void{
Tweener.addTween( ball_mc , { alpha:0.5 , time:1 });
}
//マウスアウトの動き
function out(e:Event):void{
Tweener.addTween( ball_mc , { alpha:1 , time:1 });
}
</pre>
<p>で、できたのがこれ。</p>
<p><object type="application/x-shockwave-flash" style="width:350px;height:125px" data="http://oneday.ter.jp/swf_data/0906/090626/ball2.swf"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="quality" value="best" /><param name="wmode" value="transparent" /><param name="movie" value="http://oneday.ter.jp/swf_data/0906/090626/ball2.swf" /><param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer" />If you can see this, then you might need a Flash Player upgrade or you need to install Flash Player if it's missing. Get <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash Player</a> from Adobe.</object><br/>
		<!-- Valid XHTML flash object delivered by XHTML Video Embed. Get it at: http://saltwaterc.net/xhtml-video-embed -->
		</p>
]]></content:encoded>
			<wfw:commentRss>http://oneday.ter.jp/actionscript3/210.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://oneday.ter.jp/actionscript3/210.html" />
	</item>
		<item>
		<title>基本に立ち返る、as3でボタン処理</title>
		<link>http://oneday.ter.jp/actionscript3/201.html</link>
		<comments>http://oneday.ter.jp/actionscript3/201.html#comments</comments>
		<pubDate>Wed, 24 Jun 2009 13:07:13 +0000</pubDate>
		<dc:creator>イテル</dc:creator>
				<category><![CDATA[ActionScript3]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[ボタン]]></category>

		<guid isPermaLink="false">http://oneday.ter.jp/?p=201</guid>
		<description><![CDATA[一日一問ではいろいろと書いてるが、3ヶ月のブランクは非常に長い。 ということで、as3の基本としてボタン処理を復習することに。 というかコード書いて終わり。 出来上がったのはこれ。 If you can see this [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://oneday.ter.jp/wp-content/uploads/2009/06/090630-2-700x200.jpg" alt="090630-2" title="090630-2" width="700" height="200" class="alignnone size-thumbnail wp-image-242" /></p>
<p>一日一問ではいろいろと書いてるが、3ヶ月のブランクは非常に長い。</p>
<p>ということで、as3の基本としてボタン処理を復習することに。</p>
<p>というかコード書いて終わり。</p>
<pre class="brush: as3; title: ; notranslate">
bt_btn.buttonMode=true;

//マウスオーバーイベント登録
bt_btn.addEventListener(MouseEvent.ROLL_OVER , over);
function over(e:Event):void{
text_txt.text=&quot;上さきた&quot;;
}

//マウスアウトイベント登録
bt_btn.addEventListener(MouseEvent.ROLL_OUT , out);
function out(e:Event):void{
text_txt.text=&quot;いねぐなった&quot;;
}

//クリックイベント登録
bt_btn.addEventListener(MouseEvent.CLICK , click);
function click(e:Event):void{
text_txt.text=&quot;やんだ、クリックしねで&quot;;
}
</pre>
<p>出来上がったのはこれ。</p>
<p><object type="application/x-shockwave-flash" style="width:350px;height:125px" data="http://oneday.ter.jp/swf_data/0906/090624/btn.swf"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="quality" value="best" /><param name="wmode" value="transparent" /><param name="movie" value="http://oneday.ter.jp/swf_data/0906/090624/btn.swf" /><param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer" />If you can see this, then you might need a Flash Player upgrade or you need to install Flash Player if it's missing. Get <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash Player</a> from Adobe.</object><br/>
		<!-- Valid XHTML flash object delivered by XHTML Video Embed. Get it at: http://saltwaterc.net/xhtml-video-embed -->
		</p>
<pre>追記：2009.07.01
voidが抜けていたので追記。</pre>
]]></content:encoded>
			<wfw:commentRss>http://oneday.ter.jp/actionscript3/201.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://oneday.ter.jp/actionscript3/201.html" />
	</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.461 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-09 15:26:28 -->

