<?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; as3</title>
	<atom:link href="http://oneday.ter.jp/tag/as3/feed" rel="self" type="application/rss+xml" />
	<link>http://oneday.ter.jp</link>
	<description>一日にひとつは何かを考える。</description>
	<lastBuildDate>Tue, 25 May 2010 00:35:11 +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://oneday.ter.jp/tag/as3/feed" />
		<item>
		<title>wonderflのコードを試してみた4</title>
		<link>http://oneday.ter.jp/actionscript3/453.html</link>
		<comments>http://oneday.ter.jp/actionscript3/453.html#comments</comments>
		<pubDate>Mon, 20 Jul 2009 08:27:54 +0000</pubDate>
		<dc:creator>イテル</dc:creator>
				<category><![CDATA[ActionScript3]]></category>
		<category><![CDATA[3d空間]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[wonderfl]]></category>
		<category><![CDATA[文字]]></category>

		<guid isPermaLink="false">http://oneday.ter.jp/?p=453</guid>
		<description><![CDATA[
4日連続のwonderfl投稿。
だって面白いんだもん。
ちょっと実務向きに使えそうなものをお試し。
3D表現とブラー効果がステキすぎる。
お試し７（画像をクリッキング）

今日はここまで・・・。
本当はもうひとつ試し [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://oneday.ter.jp/wp-content/uploads/2009/07/090720-top-700x200.jpg" alt="090720-top" title="090720-top" width="700" height="200" class="alignnone size-thumbnail wp-image-460" /></p>
<p>4日連続のwonderfl投稿。<br />
だって面白いんだもん。</p>
<p>ちょっと実務向きに使えそうなものをお試し。<br />
3D表現とブラー効果がステキすぎる。</p>
<h3>お試し７<small>（画像をクリッキング）</small></h3>
<p><a title="お試し７" rel="shadowbox;width=700;height=700" href="http://oneday.ter.jp/swf_data/0907/20/090720.swf"><img class="alignnone size-thumbnail wp-image-375" title="re002" src="http://oneday.ter.jp/wp-content/uploads/2009/07/090720-1.jpg" alt="re002" width="700" height="200" /></a></p>
<p>今日はここまで・・・。</p>
<p>本当はもうひとつ試したかったものがあるのだが、私の使う<br />
flash cs3ではコンパイルできないらしく断念・・・。</p>
<p>cs4欲しいなぁ・・・。<br />
FlashDevelopかFDTでもインストールしようかしら。。。<br />
ツワモノの皆様はこれらを使ってるみたいですし。。。</p>
]]></content:encoded>
			<wfw:commentRss>http://oneday.ter.jp/actionscript3/453.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://oneday.ter.jp/actionscript3/453.html" />
	</item>
		<item>
		<title>wonderflのコードを試してみた3</title>
		<link>http://oneday.ter.jp/actionscript3/446.html</link>
		<comments>http://oneday.ter.jp/actionscript3/446.html#comments</comments>
		<pubDate>Sun, 19 Jul 2009 04:57:29 +0000</pubDate>
		<dc:creator>イテル</dc:creator>
				<category><![CDATA[ActionScript3]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[wonderfl]]></category>
		<category><![CDATA[ぼんやり]]></category>
		<category><![CDATA[光]]></category>
		<category><![CDATA[雪文字]]></category>

		<guid isPermaLink="false">http://oneday.ter.jp/?p=446</guid>
		<description><![CDATA[
昨日、おとといに引き続き、また試してみた。
やっつけ投稿じゃないよ。
お試しすることで、いかにもデキルヤツになった感を味わっているわけでもない。
いや、正確にはちょっと感じてるｗ
現実は人様の作品をコピペしてるだけ・・ [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://oneday.ter.jp/wp-content/uploads/2009/07/090719-top-700x200.jpg" alt="090719-top" title="090719-top" width="700" height="200" class="alignnone size-thumbnail wp-image-451" /></p>
<p>昨日、おとといに引き続き、また試してみた。</p>
<p>やっつけ投稿じゃないよ。</p>
<p>お試しすることで、いかにもデキルヤツになった感を味わっているわけでもない。</p>
<p>いや、正確にはちょっと感じてるｗ</p>
<p>現実は人様の作品をコピペしてるだけ・・・orz</p>
<h3>お試し５<small>（画像をクリッキング）</small></h3>
<p><a title="お試し５" rel="shadowbox;width=700;height=700" href="http://oneday.ter.jp/swf_data/0907/19/090719-1.swf"><img class="alignnone size-thumbnail wp-image-375" title="re002" src="http://oneday.ter.jp/wp-content/uploads/2009/07/090719-1.jpg" alt="re002" width="700" height="200" /></a></p>
<h3>お試し６<small>（画像をクリッキング）</small></h3>
<p><a title="お試し６" rel="shadowbox;width=700;height=700" href="http://oneday.ter.jp/swf_data/0907/19/090719-2.swf"><img class="alignnone size-thumbnail wp-image-375" title="re002" src="http://oneday.ter.jp/wp-content/uploads/2009/07/090719-2.jpg" alt="re002" width="700" height="200" /></a></p>
<p>本当に世の中にはすごい方たちがたくさんいる！！！</p>
<p>私も勉強しなきゃ。暇だし。</p>
]]></content:encoded>
			<wfw:commentRss>http://oneday.ter.jp/actionscript3/446.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://oneday.ter.jp/actionscript3/446.html" />
	</item>
		<item>
		<title>wonderflのコードを試してみた1</title>
		<link>http://oneday.ter.jp/actionscript3/422.html</link>
		<comments>http://oneday.ter.jp/actionscript3/422.html#comments</comments>
		<pubDate>Thu, 16 Jul 2009 15:00:14 +0000</pubDate>
		<dc:creator>イテル</dc:creator>
				<category><![CDATA[ActionScript3]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[spark]]></category>
		<category><![CDATA[wonderfl]]></category>

		<guid isPermaLink="false">http://oneday.ter.jp/?p=422</guid>
		<description><![CDATA[
カヤックさんの運営する、wonderflというサイトがアツイ。
wonderflはwebブラウザで入力したactionscriptがコンパイルされて公開される。
個人の方の実験場となるとともに、公開の場、腕試しの場とな [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-430" title="090717-top" src="http://oneday.ter.jp/wp-content/uploads/2009/07/090717-top2-700x200.jpg" alt="090717-top" width="700" height="200" /></p>
<p>カヤックさんの運営する、wonderflというサイトがアツイ。</p>
<p>wonderflはwebブラウザで入力したactionscriptがコンパイルされて公開される。</p>
<p>個人の方の実験場となるとともに、公開の場、腕試しの場となっている。</p>
<p>天下一武道会のような感じのイベントまで行われているみたい。</p>
<p>その中のいくつかを試して（パクって）みた。</p>
<h3>お試し１<small>（画像をクリッキング）</small></h3>
<p><a title="お試し１" rel="shadowbox;width=700;height=700" href="http://oneday.ter.jp/swf_data/0907/17/090717-1.swf"><img class="alignnone size-thumbnail wp-image-375" title="re002" src="http://oneday.ter.jp/wp-content/uploads/2009/07/090717-1-700x200.jpg" alt="re002" width="700" height="200" /></a></p>
<h3>お試し２<small>（画像をクリッキング）</small></h3>
<p><a title="お試し２" rel="shadowbox;width=700;height=700" href="http://oneday.ter.jp/swf_data/0907/17/090717-2.swf"><img class="alignnone size-thumbnail wp-image-375" title="re002" src="http://oneday.ter.jp/wp-content/uploads/2009/07/090717-2-2.jpg" alt="re002" width="700" height="200" /></a></p>
<p>sparkもそうだが、本当に頭のいい人たちはたくさんいるのだと、<br />
興奮とともに、絶望にも近い感覚を覚たｗ</p>
]]></content:encoded>
			<wfw:commentRss>http://oneday.ter.jp/actionscript3/422.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://oneday.ter.jp/actionscript3/422.html" />
	</item>
		<item>
		<title>as3でイコライザ再び</title>
		<link>http://oneday.ter.jp/actionscript3/226.html</link>
		<comments>http://oneday.ter.jp/actionscript3/226.html#comments</comments>
		<pubDate>Sun, 28 Jun 2009 14:06:24 +0000</pubDate>
		<dc:creator>イテル</dc:creator>
				<category><![CDATA[ActionScript3]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[イコライザ]]></category>
		<category><![CDATA[音楽]]></category>

		<guid isPermaLink="false">http://oneday.ter.jp/?p=226</guid>
		<description><![CDATA[
またも、イコライザが気になりクリクリ調査。
52secNoteさんのサイトを発見。
さっそく試してみることにした。

var myVolume:int = 0;

var bgm:Sound = new Sound() [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-244" title="090630-2" src="http://oneday.ter.jp/wp-content/uploads/2009/06/090630-21-700x200.jpg" alt="090630-2" width="700" height="200" /></p>
<p>またも、イコライザが気になりクリクリ調査。</p>
<p><a href="http://52sec.org/wordpress/?p=101" target="_blank">52secNote</a>さんのサイトを発見。</p>
<p>さっそく試してみることにした。</p>
<pre class="brush: as3;">
var myVolume:int = 0;

var bgm:Sound = new Sound();
bgm.addEventListener(Event.COMPLETE, onSoundLoaded);
var req:URLRequest = new URLRequest(&amp;quot;http://domain.domain/path.mp3&amp;quot;);
var trans:SoundTransform = new SoundTransform(1, 0);
var channel:SoundChannel;
var soundBox01:SoundBox = new SoundBox(5, 5, 2, 2, 1, 1, 0xFFFFFF);
ico_mc.ico_in_mc.addChild(soundBox01);

function onSoundLoaded(event:Event):void{
channel = bgm.play(0, 500);//500はリピート回数
soundBox01.start();
}
bgm.load(req);

//クリックしたとき音楽を停止or再生
ico_mc.buttonMode=true;
ico_mc.addEventListener(MouseEvent.CLICK,click);
function click(e:Event):void{
// 再生チャネルは初期化されている？
if(channel) {
myVolume = ++myVolume % 2;
switch(myVolume) {
case 0:
trans.volume = 0;
break;
case 1:
trans.volume = 1;
break;
}
channel.soundTransform = trans;
}
}
//※再生ボタンなど余計なところは消去してます。
</pre>
<p>で、できたのがこれ。</p>
<p><object type="application/x-shockwave-flash" style="width:125px;height:90px" data="http://oneday.ter.jp/swf_data/0906/090628/ico090628.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/090628/ico090628.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>
<p>でもステキだ～。</p>
<p>もっと小さくしたときでもわかりやすいともっとステキ・・・と言ってみるテスト。</p>
<p>また、イコライザをクリックしたときにミュートされるようにしてみたけど、</p>
<p>なんか一回目のクリックのときは無視されるみたい。。。</p>
<p>あとできちんと調べよ。</p>
]]></content:encoded>
			<wfw:commentRss>http://oneday.ter.jp/actionscript3/226.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://oneday.ter.jp/actionscript3/226.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の基本としてボタン処理を復習することに。
というかコード書いて終わり。

bt_btn.buttonMode=true;

//マウ [...]]]></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;">
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>
		<item>
		<title>ランダムテキスト</title>
		<link>http://oneday.ter.jp/actionscript3/177.html</link>
		<comments>http://oneday.ter.jp/actionscript3/177.html#comments</comments>
		<pubDate>Mon, 22 Jun 2009 07:16:55 +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=177</guid>
		<description><![CDATA[
ユニクロのサイトで使われているように、アルファベットをランダムに表示する方法を調べていたところ、案外いろんな方が作られているようだった。
なので、それをちょっと試してみた。
BONKURA BLOGさんを参考にさせても [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-185" title="090621" src="http://oneday.ter.jp/wp-content/uploads/2009/06/090621-700x200.jpg" alt="090621" width="700" height="200" /></p>
<p>ユニクロのサイトで使われているように、アルファベットをランダムに表示する方法を調べていたところ、案外いろんな方が作られているようだった。</p>
<p>なので、それをちょっと試してみた。</p>
<p><a href="http://blog.bonkura.jp/2008/10/as3-1.html" target="_blank">BONKURA BLOG</a>さんを参考にさせてもらった。</p>
<p><object type="application/x-shockwave-flash" style="width:350px;height:125px" data="http://oneday.ter.jp/swf_data/090621/test.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/090621/test.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>
<p>だけど、使いどころが難しいかも。</p>
]]></content:encoded>
			<wfw:commentRss>http://oneday.ter.jp/actionscript3/177.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://oneday.ter.jp/actionscript3/177.html" />
	</item>
		<item>
		<title>ちょっとしたイコライザ</title>
		<link>http://oneday.ter.jp/actionscript3/167.html</link>
		<comments>http://oneday.ter.jp/actionscript3/167.html#comments</comments>
		<pubDate>Sat, 20 Jun 2009 11:38:45 +0000</pubDate>
		<dc:creator>イテル</dc:creator>
				<category><![CDATA[ActionScript3]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[イコライザ的な]]></category>
		<category><![CDATA[音楽と同期]]></category>

		<guid isPermaLink="false">http://oneday.ter.jp/?p=167</guid>
		<description><![CDATA[
先日の音楽とswfを同期させる処理を調べていたら、「TheFlashBlog」さんを見つけた。
音楽に合わせて円を描くちょっとしたイコライザ的なもの（参照）。
とりあえず、わけのわからぬままコピペしてちょいと修正してみ [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-169" title="090620_one" src="http://oneday.ter.jp/wp-content/uploads/2009/06/090620_one-700x200.jpg" alt="090620_one" width="700" height="200" /></p>
<p>先日の音楽とswfを同期させる処理を調べていたら、「<a href="http://theflashblog.com/" target="_blank">TheFlashBlog</a>」さんを見つけた。</p>
<p>音楽に合わせて円を描くちょっとしたイコライザ的なもの（<a href="http://theflashblog.com/?p=181#" target="_blank">参照</a>）。</p>
<p>とりあえず、わけのわからぬままコピペしてちょいと修正してみた。</p>
<pre class="brush: as3;">
//変数類の宣言
var s:Sound = new Sound();
var sc:SoundChannel;
var ba:ByteArray = new ByteArray();
var array:Array;
//URLをセット
s.load(new URLRequest(&amp;quot;http://domain.domain/path.mp3&amp;quot;));

//読み込み時のイベント登録
this.addEventListener(Event.ENTER_FRAME, spectrum);
var a:Number = 0;

//波形を表示する
function spectrum(event:Event){
a = 0;
graphics.clear();
SoundMixer.computeSpectrum(ba,true,0);
for(var i=0; i &lt; 256; i=i+8){
a = ba.readFloat();
var num:Number = a*360;
graphics.lineStyle( num/15 , 0x0066FF | (num&lt;&lt; 8));
graphics.drawCircle(stage.stageWidth/2,stage.stageHeight/2,i);
}
}

// 再生ボタンを押したとき
play_b.buttonMode=true;
play_b.addEventListener(MouseEvent.CLICK,function(event){
//現在再生中の音楽を停止
if(sc){
sc.stop();
}
if(s){
//9999回リピートさせ再生
sc = s.play(0, 99999);
}
});
// 停止ボタン
stop_b.buttonMode=true;
stop_b.addEventListener(MouseEvent.CLICK,function(event){
//再生停止
if(sc){
sc.stop();
}
});
</pre>
<p>で、出来上がったのがこれ↓。</p>
<p><object type="application/x-shockwave-flash" style="width:400px;height:400px" data="http://oneday.ter.jp/swf_data/090620/test.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/090620/test.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>
<p>やっぱas3はおもろいなぁ。</p>
]]></content:encoded>
			<wfw:commentRss>http://oneday.ter.jp/actionscript3/167.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://oneday.ter.jp/actionscript3/167.html" />
	</item>
	</channel>
</rss>
