<?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>KIYOTY DESIGN BLOG</title>
	<atom:link href="http://www.kiyoty.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.kiyoty.com/blog</link>
	<description>WEB,DESIGN,ActionScript Memo and MORE...</description>
	<lastBuildDate>Sun, 08 Jan 2012 13:56:46 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>HTML5 canvasでバネ運動</title>
		<link>http://www.kiyoty.com/blog/?p=517</link>
		<comments>http://www.kiyoty.com/blog/?p=517#comments</comments>
		<pubDate>Sat, 26 Feb 2011 15:36:34 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[canvas]]></category>
		<category><![CDATA[HTML5]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=517</guid>
		<description><![CDATA[FLASHでよく使うイージングとバネ運動をHTML5のcanvasで描画してみた。 マウスの位置はjQueryのmousemove取得。 ｜デモ｜ダウンロード &#60;!DOCTYPE html&#62; &#60;html &#8230; <a href="http://www.kiyoty.com/blog/?p=517">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>FLASHでよく使うイージングとバネ運動をHTML5のcanvasで描画してみた。<br />
マウスの位置はjQueryのmousemove取得。</p>
<p><iframe width="520" height="320" src="http://www.kiyoty.com/blog/download/canvas110227/" style="border:none;"></iframe></p>
<p>｜<a href="http://www.kiyoty.com/blog/download/canvas110227/" target="_blank">デモ</a>｜<a href="http://www.kiyoty.com/blog/download/canvas110227.zip">ダウンロード</a><br />
<span id="more-517"></span></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset=&quot;utf-8&quot;&gt;
&lt;title&gt;canvas バネ運動&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
* { margin: 0px;padding: 0px;}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&nbsp;
&lt;canvas id=&quot;a_canvas&quot; width=&quot;500&quot; height=&quot;300&quot;&gt;&lt;/canvas&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;jquery-1.3.2.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function(){
	var targetX = 0;
	var targetY = 0;
	var easing = 0.15;	//イージング
	var friction = 0.8; //摩擦
	var gravity = 5;	//重力
	var vx = 0;			//X速度
	var vy = 0;			//Y速度
&nbsp;
	var canvas = document.getElementById(&quot;a_canvas&quot;);
	var context = canvas.getContext(&quot;2d&quot;);
&nbsp;
	var ball = {x:100,y:100};
&nbsp;
	window.onload = function() {	
&nbsp;
		//マウスの位置を取得
		$(&quot;#a_canvas&quot;).mousemove(function(e){
			targetX = e.clientX;
			targetY = e.clientY;	
		});
&nbsp;
		setInterval(drawBall,50);
	}
&nbsp;
	function drawBall() {
&nbsp;
		//キャンバスに色を描画
		context.fillStyle = &quot;#000&quot;;
		context.fillRect(0,0,500,300);
&nbsp;
		context.beginPath();
&nbsp;
		//ボールを描画
		context.arc(ball.x,ball.y,10,0,2*Math.PI);
&nbsp;
		//ラインを描画
		context.moveTo(targetX,targetY);
		context.lineTo(ball.x,ball.y);
		context.strokeStyle=&quot;#FFF&quot;;
		context.stroke();
&nbsp;
		//ボールを塗りつぶし
		context.fillStyle = &quot;#FF0000&quot;;
		context.fill();
&nbsp;
		vx += (targetX - ball.x) * easing;
		vy += (targetY - ball.y) * easing;
&nbsp;
		vy += gravity;
&nbsp;
		ball.x += (vx *= friction);
		ball.y += (vy *= friction);
&nbsp;
	}
});
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=517</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>グラデーション</title>
		<link>http://www.kiyoty.com/blog/?p=510</link>
		<comments>http://www.kiyoty.com/blog/?p=510#comments</comments>
		<pubDate>Sat, 20 Mar 2010 14:23:14 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[ActionScript3.0]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=510</guid>
		<description><![CDATA[AS3のコピペ用のグラデーションサンプル //createGradientBox(width: Number , height: Number , [rotation: Number ], [tx: Number ],  &#8230; <a href="http://www.kiyoty.com/blog/?p=510">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>AS3のコピペ用のグラデーションサンプル</p>
<p>
<object width="330" height="330">
<param name="movie" value="http://www.kiyoty.com/blog/wp-content/uploads/2010/03/GradationTest.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<param name="allowScriptAccess" value="always"></param>
<embed type="application/x-shockwave-flash" width="330" height="330" src="http://www.kiyoty.com/blog/wp-content/uploads/2010/03/GradationTest.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
<p><span id="more-510"></span></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #009900; font-style: italic;">//createGradientBox(width: Number , height: Number , [rotation: Number ], [tx: Number ], [ty: Number ])</span>
<span style="color: #009900; font-style: italic;">//GradientType.LINEAR 線状グラデーションの塗り</span>
<span style="color: #009900; font-style: italic;">//GradientType.RADIAL 放射状グラデーションの塗り</span>
<span style="color: #009900; font-style: italic;">//SpreadMethod.PAD</span>
<span style="color: #009900; font-style: italic;">//SpreadMethod.REFLECT</span>
<span style="color: #009900; font-style: italic;">//SpreadMethod.REPEAT</span>
&nbsp;
<span style="color: #9900cc; font-weight: bold;">package</span> <span style="color: #000000;">&#123;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Sprite</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Graphics</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">SpreadMethod</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.geom</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Matrix</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">GradientType</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">InterpolationMethod</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> GradationTest <span style="color: #0033ff; font-weight: bold;">extends</span> <span style="color: #004993;">Sprite</span> <span style="color: #000000;">&#123;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> GradationTest<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
&nbsp;
			<span style="color: #6699cc; font-weight: bold;">var</span> gr<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Graphics</span> = <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Matrix</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Matrix</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">colors</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Array</span> = <span style="color: #000000;">&#91;</span>0xFFCC00<span style="color: #000066; font-weight: bold;">,</span>0xFF0000<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">alphas</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Array</span> = <span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">ratios</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Array</span> = <span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">255</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #009900; font-style: italic;">//横方向</span>
			<span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">createGradientBox</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			gr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">beginFill</span><span style="color: #000000;">&#40;</span>0xFF0000<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			gr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">beginGradientFill</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">GradientType</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">LINEAR</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">colors</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">alphas</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">ratios</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">SpreadMethod</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">PAD</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			gr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">drawRect</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #009900; font-style: italic;">//縦方向</span>
			<span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">createGradientBox</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">PI</span><span style="color: #000066; font-weight: bold;">/</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">110</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			gr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">beginFill</span><span style="color: #000000;">&#40;</span>0xFF0000<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			gr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">beginGradientFill</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">GradientType</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">LINEAR</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">colors</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">alphas</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">ratios</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">SpreadMethod</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">PAD</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			gr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">drawRect</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">110</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #009900; font-style: italic;">//放射</span>
			<span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">createGradientBox</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">220</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			gr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">beginFill</span><span style="color: #000000;">&#40;</span>0xFF0000<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			gr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">beginGradientFill</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">GradientType</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">RADIAL</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">colors</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">alphas</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">ratios</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">SpreadMethod</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">PAD</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			gr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">drawRect</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">220</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #009900; font-style: italic;">//リフレクト</span>
			<span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">createGradientBox</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">20</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">110</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			gr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">beginFill</span><span style="color: #000000;">&#40;</span>0xFF0000<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			gr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">beginGradientFill</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">GradientType</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">LINEAR</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">colors</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">alphas</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">ratios</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">SpreadMethod</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">REFLECT</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			gr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">drawRect</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">110</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #009900; font-style: italic;">//繰り返し</span>
			<span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">createGradientBox</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">20</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">110</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">110</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			gr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">beginFill</span><span style="color: #000000;">&#40;</span>0xFF0000<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			gr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">beginGradientFill</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">GradientType</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">LINEAR</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">colors</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">alphas</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">ratios</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">SpreadMethod</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">REPEAT</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			gr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">drawRect</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">110</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">110</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #009900; font-style: italic;">//リフレクト InterpolationMethod.LINEAR_RGB</span>
			<span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">createGradientBox</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">20</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">220</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			gr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">beginFill</span><span style="color: #000000;">&#40;</span>0xFF0000<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			gr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">beginGradientFill</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">GradientType</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">LINEAR</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">colors</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">alphas</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">ratios</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">SpreadMethod</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">REFLECT</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">InterpolationMethod</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">LINEAR_RGB</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			gr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">drawRect</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">220</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #009900; font-style: italic;">//リフレクト InterpolationMethod.RGB</span>
			<span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">createGradientBox</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">20</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">110</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">220</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			gr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">beginFill</span><span style="color: #000000;">&#40;</span>0xFF0000<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			gr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">beginGradientFill</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">GradientType</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">LINEAR</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">colors</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">alphas</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">ratios</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">SpreadMethod</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">REFLECT</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">InterpolationMethod</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">RGB</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			gr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">drawRect</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">110</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">220</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">100</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=510</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery plugin: Tablesorter 2.0</title>
		<link>http://www.kiyoty.com/blog/?p=507</link>
		<comments>http://www.kiyoty.com/blog/?p=507#comments</comments>
		<pubDate>Mon, 15 Feb 2010 12:29:49 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=507</guid>
		<description><![CDATA[サンプル jQuery plugin: Tablesorter 2.0 http://tablesorter.com/docs/ &#60;script type=&#34;text/javascript&#34;&#038;g &#8230; <a href="http://www.kiyoty.com/blog/?p=507">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.kiyoty.com/blog/download/tablesorter/" target="_blank">サンプル</a></p>
<p>jQuery plugin: Tablesorter 2.0<br />
<a href="http://tablesorter.com/docs/" target="_blank">http://tablesorter.com/docs/</a></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
jQuery<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#myTable&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">tablesorter</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">//widgets: ['zebra']</span>
	<span style="color: #006600; font-style: italic;">//1行間隔で行の背景色を変える</span>
	<span style="color: #006600; font-style: italic;">//&lt;tr&gt;にeven,oddクラス追加</span>
	widgets<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'zebra'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">//sortList: [[列, 並び順]]</span>
	<span style="color: #006600; font-style: italic;">//列は左を0とした数値を指定</span>
	<span style="color: #006600; font-style: italic;">//昇順:0、降順:1 </span>
	sortList<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">//headers</span>
	<span style="color: #006600; font-style: italic;">//列は左を0とした数値を指定</span>
	<span style="color: #006600; font-style: italic;">//sorter:false 並び無効</span>
	headers<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #CC0000;">1</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>sorter<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
		<span style="color: #CC0000;">8</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>sorter<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=507</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SIMPLEMODAL</title>
		<link>http://www.kiyoty.com/blog/?p=502</link>
		<comments>http://www.kiyoty.com/blog/?p=502#comments</comments>
		<pubDate>Mon, 15 Feb 2010 12:10:26 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=502</guid>
		<description><![CDATA[サンプル SIMPLEMODAL http://www.ericmmartin.com/projects/simplemodal/ &#60;script type=&#34;text/javascript&#34;  &#8230; <a href="http://www.kiyoty.com/blog/?p=502">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.kiyoty.com/blog/download/SimpleModal/" target="_blank">サンプル</a></p>
<p>SIMPLEMODAL<br />
<a href="http://www.ericmmartin.com/projects/simplemodal/" target="_blank">http://www.ericmmartin.com/projects/simplemodal/</a></p>

<div class="wp_syntax"><div class="code"><pre class="xhtml" style="font-family:monospace;">&lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery-1.4.1.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery.simplemodal.js&quot;&gt;&lt;/script&gt;
&lt;link type='text/css' href='css/simplemodal.css' rel='stylesheet' media='screen' /&gt;</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
jQuery<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#demo-modal a.demo'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		e.<span style="color: #660066;">preventDefault</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.demo-modal-content'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">modal</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#test-modal a.test'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		e.<span style="color: #660066;">preventDefault</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.test-modal-content'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">modal</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">//外部サイトを表示</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#yahoo-modal a.yahoo'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> src <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://www.yahoo.co.jp&quot;</span><span style="color: #339933;">;</span>
		$.<span style="color: #660066;">modal</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;iframe src=&quot;'</span> <span style="color: #339933;">+</span> src <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&quot; height=&quot;450&quot; width=&quot;830&quot; style=&quot;border:0&quot;&gt;'</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>
			closeHTML<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">,</span>
			containerCss<span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span>
				backgroundColor<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;#fff&quot;</span><span style="color: #339933;">,</span>
				borderColor<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;#0063dc&quot;</span><span style="color: #339933;">,</span>
				height<span style="color: #339933;">:</span><span style="color: #CC0000;">450</span><span style="color: #339933;">,</span>
				padding<span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>
				width<span style="color: #339933;">:</span><span style="color: #CC0000;">830</span>
			<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
			overlayClose<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=502</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Accordion</title>
		<link>http://www.kiyoty.com/blog/?p=496</link>
		<comments>http://www.kiyoty.com/blog/?p=496#comments</comments>
		<pubDate>Mon, 15 Feb 2010 12:02:20 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=496</guid>
		<description><![CDATA[デモ &#60;style&#62; &#60;!-- body &#123; margin: 0px; padding: 0px; background: #FFFFFF; &#125; div#wrapper &#123; &#8230; <a href="http://www.kiyoty.com/blog/?p=496">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.kiyoty.com/blog/download/SimpleAccordion/" target="_blank">デモ</a></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">&lt;style<span style="color: #00AA00;">&gt;</span>
&lt;!--
body <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#FFFFFF</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
div<span style="color: #cc00cc;">#wrapper</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">300px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
h1 <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span> <span style="color: #933;">15px</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">14px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#EEEEEE</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
h2 <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">280px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span><span style="color: #00AA00;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#CCCCCC</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#FFFFFF</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#333333</span><span style="color: #00AA00;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">pointer</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
p <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">280px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">150%</span><span style="color: #00AA00;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#EEEEEE</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
--<span style="color: #00AA00;">&gt;</span>
&lt;/style<span style="color: #00AA00;">&gt;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
jQuery<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> p <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'p'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'#accordion'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	p.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'h2'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'#accordion'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> next <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">next</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #006600; font-style: italic;">//↓コメントをはずせば、クリックしたもの以外は閉じる</span>
	<span style="color: #006600; font-style: italic;">//p.not(next).slideUp();</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>next.<span style="color: #000066; font-weight: bold;">is</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">':visible'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		next.<span style="color: #660066;">slideUp</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span>
		next.<span style="color: #660066;">slideDown</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="xhtml" style="font-family:monospace;">&lt;div id=&quot;accordion&quot;&gt;
	&lt;h2&gt;タイトル&lt;/h2&gt;
	&lt;p&gt;文章が入ります。文章が入ります。文章が入ります。文章が入ります。文章が入ります。文章が入ります。&lt;/p&gt;
	&lt;h2&gt;タイトル&lt;/h2&gt;
	&lt;p&gt;文章が入ります。文章が入ります。文章が入ります。文章が入ります。文章が入ります。文章が入ります。&lt;/p&gt;
	&lt;h2&gt;タイトル&lt;/h2&gt;
	&lt;p&gt;文章が入ります。文章が入ります。文章が入ります。文章が入ります。文章が入ります。文章が入ります。&lt;/p&gt;
&lt;/div&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=496</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery lightBox plugin</title>
		<link>http://www.kiyoty.com/blog/?p=492</link>
		<comments>http://www.kiyoty.com/blog/?p=492#comments</comments>
		<pubDate>Sun, 14 Feb 2010 01:11:39 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=492</guid>
		<description><![CDATA[サンプル jQuery lightBox plugin http://leandrovieira.com/projects/jquery/lightbox/ Javascript読み込み &#60;script type= &#8230; <a href="http://www.kiyoty.com/blog/?p=492">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.kiyoty.com/blog/download/lightbox/" target="_blank">サンプル</a></p>
<p>jQuery lightBox plugin<br />
<a href="http://leandrovieira.com/projects/jquery/lightbox/" target="_blank">http://leandrovieira.com/projects/jquery/lightbox/</a></p>
<p>Javascript読み込み</p>

<div class="wp_syntax"><div class="code"><pre class="xhtml" style="font-family:monospace;">&lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery-1.3.2.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery.cookie.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery.lightbox-0.5.js&quot;&gt;&lt;/script&gt;</pre></div></div>

<p>Javascript記述<br />
$(&#8216;.gallery a&#8217;).lightBox(); で指定したclass（or id）をHTMLで指定する。</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>  
$<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>  
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.gallery a'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">lightBox</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>HTML</p>

<div class="wp_syntax"><div class="code"><pre class="xhtml" style="font-family:monospace;">&lt;ul class=&quot;gallery&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;images/sample_1.jpg&quot;&gt;&lt;img src=&quot;images/thumb_1.jpg&quot; width=&quot;200&quot; height=&quot;150&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;images/sample_2.jpg&quot;&gt;&lt;img src=&quot;images/thumb_2.jpg&quot; width=&quot;150&quot; height=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=492</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>フローティングメニュー-JQUERY SCROLL FOLLOW</title>
		<link>http://www.kiyoty.com/blog/?p=488</link>
		<comments>http://www.kiyoty.com/blog/?p=488#comments</comments>
		<pubDate>Sun, 14 Feb 2010 00:51:21 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=488</guid>
		<description><![CDATA[サンプル（コンテナ範囲外でスクロール） サンプル（コンテナ範囲内でスクロール） ダウンロード JQUERY SCROLL FOLLOW http://kitchen.net-perspective.com/open-so &#8230; <a href="http://www.kiyoty.com/blog/?p=488">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.kiyoty.com/blog/download/Scroll_Follow/" target="_blank">サンプル（コンテナ範囲外でスクロール）</a><br />
<a href="http://www.kiyoty.com/blog/download/Scroll_Follow/index2.html" target="_blank">サンプル（コンテナ範囲内でスクロール）</a><br />
<a href="http://www.kiyoty.com/blog/download/Scroll_Follow.zip">ダウンロード</a></p>
<p>JQUERY SCROLL FOLLOW<br />
<a href="http://kitchen.net-perspective.com/open-source/scroll-follow/" target="_blank">http://kitchen.net-perspective.com/open-source/scroll-follow/</a></p>

<div class="wp_syntax"><div class="code"><pre class="xhtml" style="font-family:monospace;">&lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery-1.3.2.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery.cookie.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/ui.core.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery.easing.1.3.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery.scrollfollow.js&quot;&gt;&lt;/script&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=488</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScriptでCSSを切り替える-jStyler</title>
		<link>http://www.kiyoty.com/blog/?p=478</link>
		<comments>http://www.kiyoty.com/blog/?p=478#comments</comments>
		<pubDate>Thu, 11 Feb 2010 09:33:43 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=478</guid>
		<description><![CDATA[サンプル ダウンロード jStyler http://idhana.com/wp-content/uploads/2008/02/index.html ｊQuery Plugins jStyler http://plug &#8230; <a href="http://www.kiyoty.com/blog/?p=478">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.kiyoty.com/blog/download/jStyler/" target="_blank">サンプル</a><br />
<a href="http://www.kiyoty.com/blog/download/jStyler.zip">ダウンロード</a></p>
<p><strong>jStyler</strong><br />
<a href="http://idhana.com/wp-content/uploads/2008/02/index.html" target="_blank">http://idhana.com/wp-content/uploads/2008/02/index.html</a></p>
<p><strong>ｊQuery Plugins jStyler</strong><br />
<a href="http://plugins.jquery.com/project/jStyler" target="_blank">http://plugins.jquery.com/project/jStyler</a></p>
<p><strong>jquery.cookie.js | jQuery Plugins</strong><br />
<a href="http://plugins.jquery.com/project/cookie" target="_blank">http://plugins.jquery.com/project/cookie</a></p>
<p>title属性が変更するCSSのキーとなる</p>

<div class="wp_syntax"><div class="code"><pre class="xhtml" style="font-family:monospace;">&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;css/font-defaut.css&quot; title=&quot;defaut&quot; media=&quot;screen&quot; /&gt;
&lt;link rel=&quot;alternate stylesheet&quot; type=&quot;text/css&quot; href=&quot;css/font-small.css&quot; title=&quot;small&quot; media=&quot;screen&quot; /&gt;
&lt;link rel=&quot;alternate stylesheet&quot; type=&quot;text/css&quot; href=&quot;css/font-big.css&quot; title=&quot;big&quot; media=&quot;screen&quot; /&gt;</pre></div></div>

<p><span style="color:#FF0000">jquery.cookie.js</span>が必要</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">&lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery-1.3.2.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery.cookie.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/switcher.js&quot;&gt;&lt;/script&gt;
&nbsp;
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#switcher'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">switcher</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>idにswitcherを指定。hrefにtitle属性で指定したキーを入れる。</p>

<div class="wp_syntax"><div class="code"><pre class="xhtml" style="font-family:monospace;">  &lt;ul id=&quot;switcher&quot;&gt;
      &lt;li&gt;&lt;a href=&quot;#big&quot;&gt;大&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#defaut&quot;&gt;標準&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#small&quot;&gt;小&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=478</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>スムーススクロール-df Smooth Scroll</title>
		<link>http://www.kiyoty.com/blog/?p=473</link>
		<comments>http://www.kiyoty.com/blog/?p=473#comments</comments>
		<pubDate>Thu, 11 Feb 2010 09:15:46 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=473</guid>
		<description><![CDATA[サンプル ダウンロード dfSmooth Scroll http://www.dezinerfolio.com/2007/08/08/df-javascript-smooth-scroll/ 参考 HTMLもCSSも書換 &#8230; <a href="http://www.kiyoty.com/blog/?p=473">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.kiyoty.com/blog/download/df_Smooth_Scroll/" target="_blank">サンプル</a><br />
<a href="http://www.kiyoty.com/blog/download/df_Smooth_Scroll.zip" target="_blank">ダウンロード</a></p>
<p>dfSmooth Scroll<br />
<a href="http://www.dezinerfolio.com/2007/08/08/df-javascript-smooth-scroll/">http://www.dezinerfolio.com/2007/08/08/df-javascript-smooth-scroll/</a></p>
<p>参考<br />
<a href="http://ascii.jp/elem/000/000/182/182839/index-2.html">HTMLもCSSも書換不要！気持ちいいスクロール</a></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;js/jquery-1.3.2.min.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;js/smooth.pack.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="xhtml" style="font-family:monospace;">&lt;body&gt;
&lt;a name=&quot;pagetop&quot; id=&quot;pagetop&quot;&gt;ページの先頭&lt;/a&gt;
&nbsp;
&lt;div id=&quot;wrapper&quot; class=&quot;clearfix&quot;&gt;
&nbsp;
  &lt;ul&gt;
    &lt;li&gt;&lt;a href=&quot;#anchor_no1&quot;&gt;その1&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#anchor_no2&quot;&gt;その2&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#anchor_no3&quot;&gt;その3&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&nbsp;
  &lt;div style=&quot;margin: 500px 0px 1000px 0px;&quot;&gt;&lt;a name=&quot;anchor_no1&quot; id=&quot;anchor_no1&quot;&gt;その1&lt;/a&gt;&lt;/div&gt;
  &lt;div style=&quot;margin: 0px 0px 1000px 0px;&quot;&gt;&lt;a name=&quot;anchor_no2&quot; id=&quot;anchor_no2&quot;&gt;その2&lt;/a&gt;&lt;/div&gt;
  &lt;div style=&quot;margin: 0px 0px 200px;&quot;&gt;&lt;a name=&quot;anchor_no3&quot; id=&quot;anchor_no3&quot;&gt;その3&lt;/a&gt;&lt;/div&gt;
  &lt;div style=&quot;margin: 0px 0px 0px;&quot;&gt;&lt;a href=&quot;#pagetop&quot;&gt;pagetop&lt;/a&gt;&lt;/div&gt;
&nbsp;
&lt;/div&gt;
&lt;/body&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=473</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ドロップダウン（プルダウンメニュー）-droppy</title>
		<link>http://www.kiyoty.com/blog/?p=458</link>
		<comments>http://www.kiyoty.com/blog/?p=458#comments</comments>
		<pubDate>Thu, 11 Feb 2010 08:53:52 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=458</guid>
		<description><![CDATA[サンプル ダウンロード jQuery http://jquery.com/ droppy &#8211; Nested drop down menus http://onehackoranother.com/projec &#8230; <a href="http://www.kiyoty.com/blog/?p=458">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.kiyoty.com/blog/download/droppy/" target="_blank">サンプル</a><br />
<a href="http://www.kiyoty.com/blog/download/droppy.zip">ダウンロード</a></p>
<p>jQuery<a href="http://jquery.com/"></p>
<p>http://jquery.com/</a></p>
<p>droppy  &#8211; Nested drop down menus<br />
<a href="http://onehackoranother.com/projects/jquery/droppy/" target="_blank">http://onehackoranother.com/projects/jquery/droppy/</a></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;js/jquery-1.3.2.min.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;js/jquery.droppy.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>ヘッダーで読み込む。<br />
id（#main_menu）をプルダウンさせる場所にあわせる。</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#main_menu&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">droppy</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>html</p>

<div class="wp_syntax"><div class="code"><pre class="xhtml" style="font-family:monospace;">&lt;ul id=&quot;main_menu&quot; class=&quot;on_aaa clearfix&quot;&gt;
&nbsp;
  &lt;li&gt;&lt;a href=&quot;#&quot; id=&quot;m_aaa&quot;&gt;AAAAA&lt;/a&gt;
&nbsp;
    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#&quot;&gt;A-1&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#&quot;&gt;A-2&lt;/a&gt;
&nbsp;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href=&quot;#&quot;&gt;AA-1&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href=&quot;#&quot;&gt;AA-2&lt;/a&gt;
&nbsp;
            &lt;ul&gt;
              &lt;li&gt;&lt;a href=&quot;#&quot;&gt;AAA-1&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href=&quot;#&quot;&gt;AAA-2&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href=&quot;#&quot;&gt;AAA-3&lt;/a&gt;
&nbsp;
                &lt;ul&gt;
                  &lt;li&gt;&lt;a href=&quot;#&quot;&gt;AAAA-1&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href=&quot;#&quot;&gt;AAAA-2&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href=&quot;#&quot;&gt;AAAA-3&lt;/a&gt;&lt;/li&gt;
                &lt;/ul&gt;
&nbsp;
              &lt;/li&gt;
            &lt;/ul&gt;
&nbsp;
          &lt;/li&gt;
          &lt;li&gt;&lt;a href=&quot;#&quot;&gt;AA-3&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
&nbsp;
      &lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#&quot;&gt;A-3&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
&nbsp;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#&quot; id=&quot;m_bbb&quot;&gt;BBBBB&lt;/a&gt;
&nbsp;
    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#&quot;&gt;B-1&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#&quot;&gt;B-2&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#&quot;&gt;B-3&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
&nbsp;
  &lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#&quot; id=&quot;m_ccc&quot;&gt;CCCCC&lt;/a&gt;
&nbsp;
    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#&quot;&gt;C-1&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
&nbsp;
  &lt;/li&gt;
&lt;/ul&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=458</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ProgressionカテゴリをProgression3に変更</title>
		<link>http://www.kiyoty.com/blog/?p=455</link>
		<comments>http://www.kiyoty.com/blog/?p=455#comments</comments>
		<pubDate>Sun, 07 Feb 2010 00:17:16 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[ActionScript3.0]]></category>
		<category><![CDATA[Progression3]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=455</guid>
		<description><![CDATA[Progression4のメモのため、 ProgressionカテゴリをProgression3に変更しました。]]></description>
			<content:encoded><![CDATA[<p>Progression4のメモのため、<br />
ProgressionカテゴリをProgression3に変更しました。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=455</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>円運動</title>
		<link>http://www.kiyoty.com/blog/?p=413</link>
		<comments>http://www.kiyoty.com/blog/?p=413#comments</comments>
		<pubDate>Sun, 31 Jan 2010 11:04:19 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[ActionScript3.0]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=413</guid>
		<description><![CDATA[ダウンロード package &#123; import flash.display.Shape; import flash.display.Sprite; import flash.events.Event; impo &#8230; <a href="http://www.kiyoty.com/blog/?p=413">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
<object width="300" height="300">
<param name="movie" value="http://www.kiyoty.com/blog/wp-content/uploads/2010/01/RotateCicle1.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<param name="allowScriptAccess" value="always"></param>
<embed type="application/x-shockwave-flash" width="300" height="300" src="http://www.kiyoty.com/blog/wp-content/uploads/2010/01/RotateCicle1.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
<p><a href='http://www.kiyoty.com/blog/wp-content/uploads/2010/01/RotateCicle_1001261.zip'>ダウンロード</a></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> 
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Shape</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Sprite</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MouseEvent</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> RotateCicle <span style="color: #0033ff; font-weight: bold;">extends</span> <span style="color: #004993;">Sprite</span> 
	<span style="color: #000000;">&#123;</span>
		<span style="color: #6699cc; font-weight: bold;">var</span> ball<span style="color: #000066; font-weight: bold;">:</span>Ball<span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #6699cc; font-weight: bold;">var</span> baseCircle<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Shape</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #6699cc; font-weight: bold;">var</span> centerX<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">150</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #6699cc; font-weight: bold;">var</span> centerY<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">150</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #6699cc; font-weight: bold;">var</span> radiusX<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">120</span><span style="color: #000066; font-weight: bold;">;</span>						<span style="color: #009900; font-style: italic;">//X半径</span>
		<span style="color: #6699cc; font-weight: bold;">var</span> radiusY<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">120</span><span style="color: #000066; font-weight: bold;">;</span>						<span style="color: #009900; font-style: italic;">//Y半径</span>
		<span style="color: #6699cc; font-weight: bold;">var</span> speed<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">5</span><span style="color: #000066; font-weight: bold;">;</span>							<span style="color: #009900; font-style: italic;">//スピード</span>
		<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">angle</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>							<span style="color: #009900; font-style: italic;">//角度</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> onFlg<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Boolean</span> = <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> RotateCicle<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			ball = <span style="color: #0033ff; font-weight: bold;">new</span> Ball<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">10</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = centerX<span style="color: #000066; font-weight: bold;">;</span>
			ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = centerY<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>ball<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>			
			<span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">MouseEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MOUSE_DOWN</span><span style="color: #000066; font-weight: bold;">,</span> onEvent<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onEvent<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">MouseEvent</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> 
		<span style="color: #000000;">&#123;</span>
			<span style="color: #000000;">&#40;</span>onFlg<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">?</span> onFlg = <span style="color: #0033ff; font-weight: bold;">false</span> <span style="color: #000066; font-weight: bold;">:</span> onFlg = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>onFlg == <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ENTER_FRAME</span><span style="color: #000066; font-weight: bold;">,</span> onEnterFrame<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>onFlg == <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">removeEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ENTER_FRAME</span><span style="color: #000066; font-weight: bold;">,</span> onEnterFrame<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #339966; font-weight: bold;">function</span> onEnterFrame<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> radian<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #004993;">angle</span> <span style="color: #000066; font-weight: bold;">*</span> <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">PI</span> <span style="color: #000066; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">180</span><span style="color: #000066; font-weight: bold;">;</span>
			ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = centerX <span style="color: #000066; font-weight: bold;">+</span> radiusX <span style="color: #000066; font-weight: bold;">*</span> <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">cos</span><span style="color: #000000;">&#40;</span>radian<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = centerY <span style="color: #000066; font-weight: bold;">+</span> radiusY <span style="color: #000066; font-weight: bold;">*</span> <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">sin</span><span style="color: #000000;">&#40;</span>radian<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">angle</span> <span style="color: #000066; font-weight: bold;">+</span>= speed<span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=413</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>跳ね返りサンプル</title>
		<link>http://www.kiyoty.com/blog/?p=428</link>
		<comments>http://www.kiyoty.com/blog/?p=428#comments</comments>
		<pubDate>Thu, 28 Jan 2010 13:16:40 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[ActionScript3.0]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=428</guid>
		<description><![CDATA[普通に跳ね返らせる。 ダウンロード package &#123; &#160; import flash.display.Sprite; import flash.events.Event; import flash.d &#8230; <a href="http://www.kiyoty.com/blog/?p=428">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>普通に跳ね返らせる。</p>
<p>
<object width="300" height="200">
<param name="movie" value="http://www.kiyoty.com/blog/wp-content/uploads/2010/01/BoundBall2.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<param name="allowScriptAccess" value="always"></param>
<embed type="application/x-shockwave-flash" width="300" height="200" src="http://www.kiyoty.com/blog/wp-content/uploads/2010/01/BoundBall2.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
<p><a href="http://www.kiyoty.com/blog/wp-content/uploads/2010/01/BoundBall_1001281.zip">ダウンロード</a></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> <span style="color: #000000;">&#123;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Sprite</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Shape</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MouseEvent</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">StageScaleMode</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">StageAlign</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> BoundBall <span style="color: #0033ff; font-weight: bold;">extends</span> <span style="color: #004993;">Sprite</span> <span style="color: #000000;">&#123;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> ball<span style="color: #000066; font-weight: bold;">:</span>Ball<span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> centerX<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stageWidth</span> <span style="color: #000066; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">;</span>	<span style="color: #009900; font-style: italic;">//初期X位置</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> centerY<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stageHeight</span> <span style="color: #000066; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">;</span>	<span style="color: #009900; font-style: italic;">//初期Y位置</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> vx<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">5</span><span style="color: #000066; font-weight: bold;">;</span>							<span style="color: #009900; font-style: italic;">//速度</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> vy<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">5</span><span style="color: #000066; font-weight: bold;">;</span>							<span style="color: #009900; font-style: italic;">//速度</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> bounce<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000066; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">;</span>						<span style="color: #009900; font-style: italic;">//跳ね返り</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> onFlg<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Boolean</span> = <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> BoundBall<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">scaleMode</span> = <span style="color: #004993;">StageScaleMode</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">NO_SCALE</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">align</span> = <span style="color: #004993;">StageAlign</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">TOP_LEFT</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			ball = <span style="color: #0033ff; font-weight: bold;">new</span> Ball<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">10</span><span style="color: #000066; font-weight: bold;">,</span>0x339900<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = centerX<span style="color: #000066; font-weight: bold;">;</span>
			ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = centerY<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			ball<span style="color: #000066; font-weight: bold;">.</span>vx = vx<span style="color: #000066; font-weight: bold;">;</span>
			ball<span style="color: #000066; font-weight: bold;">.</span>vy = vy<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>ball<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">MouseEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MOUSE_DOWN</span><span style="color: #000066; font-weight: bold;">,</span> onEvent<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onEvent<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">MouseEvent</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> 
		<span style="color: #000000;">&#123;</span>
			<span style="color: #000000;">&#40;</span>onFlg<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">?</span> onFlg = <span style="color: #0033ff; font-weight: bold;">false</span> <span style="color: #000066; font-weight: bold;">:</span> onFlg = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>onFlg == <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ENTER_FRAME</span><span style="color: #000066; font-weight: bold;">,</span> onEnterFrame<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>onFlg == <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">removeEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ENTER_FRAME</span><span style="color: #000066; font-weight: bold;">,</span> onEnterFrame<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> onEnterFrame<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
&nbsp;
			<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">left</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">right</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stageWidth</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">top</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">bottom</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stageHeight</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> <span style="color: #000066; font-weight: bold;">+</span> ball<span style="color: #000066; font-weight: bold;">.</span>radius <span style="color: #000066; font-weight: bold;">&gt;</span> <span style="color: #004993;">right</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = <span style="color: #004993;">right</span> <span style="color: #000066; font-weight: bold;">-</span> ball<span style="color: #000066; font-weight: bold;">.</span>radius<span style="color: #000066; font-weight: bold;">;</span>
				vx <span style="color: #000066; font-weight: bold;">*</span>= bounce<span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> <span style="color: #000066; font-weight: bold;">-</span> ball<span style="color: #000066; font-weight: bold;">.</span>radius <span style="color: #000066; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = ball<span style="color: #000066; font-weight: bold;">.</span>radius<span style="color: #000066; font-weight: bold;">;</span>
				vx <span style="color: #000066; font-weight: bold;">*</span>= bounce<span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
&nbsp;
			ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> <span style="color: #000066; font-weight: bold;">+</span>= vx<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000066; font-weight: bold;">+</span> ball<span style="color: #000066; font-weight: bold;">.</span>radius <span style="color: #000066; font-weight: bold;">&gt;</span> <span style="color: #004993;">bottom</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = <span style="color: #004993;">bottom</span> <span style="color: #000066; font-weight: bold;">-</span> ball<span style="color: #000066; font-weight: bold;">.</span>radius<span style="color: #000066; font-weight: bold;">;</span>
				vy <span style="color: #000066; font-weight: bold;">*</span>= bounce<span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000066; font-weight: bold;">-</span> ball<span style="color: #000066; font-weight: bold;">.</span>radius <span style="color: #000066; font-weight: bold;">&lt;</span> <span style="color: #004993;">top</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = <span style="color: #004993;">top</span> <span style="color: #000066; font-weight: bold;">+</span> ball<span style="color: #000066; font-weight: bold;">.</span>radius<span style="color: #000066; font-weight: bold;">;</span>
				vy <span style="color: #000066; font-weight: bold;">*</span>= bounce<span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
&nbsp;
			ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000066; font-weight: bold;">+</span>= vy<span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>継承して、bitmapにdrawしてブラー効果をかけてみる。</p>
<p>
<object width="300" height="200">
<param name="movie" value="http://www.kiyoty.com/blog/wp-content/uploads/2010/01/BoundBallLight1.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<param name="allowScriptAccess" value="always"></param>
<embed type="application/x-shockwave-flash" width="300" height="200" src="http://www.kiyoty.com/blog/wp-content/uploads/2010/01/BoundBallLight1.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span>
<span style="color: #000000;">&#123;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Bitmap</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">BitmapData</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.filters</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">BlurFilter</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.geom</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Matrix</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.geom</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> BoundBallLight <span style="color: #0033ff; font-weight: bold;">extends</span> BoundBall
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> bmd<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">BitmapData</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> bmp<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Bitmap</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Matrix</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> blur<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">BlurFilter</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">BlurFilter</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">4</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">4</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">3</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> BoundBallLight<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> 
&nbsp;
			vx = <span style="color: #000000; font-weight:bold;">10</span><span style="color: #000066; font-weight: bold;">;</span>
			vy = <span style="color: #000000; font-weight:bold;">7</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			BallLight<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> BallLight<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			bmd = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">BitmapData</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">300</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">200</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">,</span>0x000000<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			bmp = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Bitmap</span><span style="color: #000000;">&#40;</span>bmd<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>bmp<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #004993;">matrix</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Matrix</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ENTER_FRAME</span><span style="color: #000066; font-weight: bold;">,</span> onBallDraw<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onBallDraw<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			bmd<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">applyFilter</span><span style="color: #000000;">&#40;</span>bmd<span style="color: #000066; font-weight: bold;">,</span> bmd<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">rect</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Point</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">,</span> blur<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">identity</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">translate</span><span style="color: #000000;">&#40;</span>ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			bmd<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">draw</span><span style="color: #000000;">&#40;</span>ball<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">matrix</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=428</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bitmap習作2</title>
		<link>http://www.kiyoty.com/blog/?p=404</link>
		<comments>http://www.kiyoty.com/blog/?p=404#comments</comments>
		<pubDate>Sun, 24 Jan 2010 12:16:45 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[ActionScript3.0]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=404</guid>
		<description><![CDATA[ボールを100個にして、マウスの位置によってcolorTransformで色が変わるように変更。 blurを使うと重いな・・・。 package &#123; import flash.display.Bitmap; i &#8230; <a href="http://www.kiyoty.com/blog/?p=404">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
<object width="465" height="465">
<param name="movie" value="http://www.kiyoty.com/blog/wp-content/uploads/2010/01/FlyingBall2.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<param name="allowScriptAccess" value="always"></param>
<embed type="application/x-shockwave-flash" width="465" height="465" src="http://www.kiyoty.com/blog/wp-content/uploads/2010/01/FlyingBall2.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
<p>ボールを100個にして、マウスの位置によってcolorTransformで色が変わるように変更。<br />
blurを使うと重いな・・・。</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> 
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Bitmap</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">BitmapData</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Sprite</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.filters</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">BlurFilter</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.geom</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ColorTransform</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.geom</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Matrix</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.geom</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #3f5fbf;">/**
	 * ...
	 * @author ...
	 */</span>
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> FlyingBall <span style="color: #0033ff; font-weight: bold;">extends</span> <span style="color: #004993;">Sprite</span> 
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> ball<span style="color: #000066; font-weight: bold;">:</span>Ball<span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> ball1<span style="color: #000066; font-weight: bold;">:</span>Ball<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> angleX<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> angleY<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> centerX<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stageWidth</span> <span style="color: #000066; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> centerY<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stageHeight</span> <span style="color: #000066; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> range<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">150</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> xspeed<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000066; font-weight: bold;">.</span>07<span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> yspeed<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000066; font-weight: bold;">.</span>03<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #3f5fbf;">/*
		private var angle:Number = 0;
		private var centerScale:Number = 1;
		private var rangeScale:Number = 0.2;
		private var speed:Number = .1;
		*/</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> bmd<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">BitmapData</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> bmp<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Bitmap</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Matrix</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> blur<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">BlurFilter</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">BlurFilter</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">5</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">5</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">3</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> ballArr<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Array</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Array</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>		<span style="color: #009900; font-style: italic;">//ボール用配列</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> ballStatus<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Array</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Array</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>		<span style="color: #009900; font-style: italic;">//ボールの位置保持配列</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> count<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">;</span>					<span style="color: #009900; font-style: italic;">//ボールの数</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> colortrans<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">ColorTransform</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #339966; font-weight: bold;">function</span> FlyingBall<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> Stats<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">uint</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&lt;</span> count<span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				ball = <span style="color: #0033ff; font-weight: bold;">new</span> Ball<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">,</span> 0xFFFFFF<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				range = <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">*</span> <span style="color: #000000; font-weight:bold;">250</span><span style="color: #000066; font-weight: bold;">;</span>
				xspeed = <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">*</span> <span style="color: #000000; font-weight:bold;">0.2</span><span style="color: #000066; font-weight: bold;">;</span>
				yspeed = <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">*</span> <span style="color: #000000; font-weight:bold;">0.2</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
				ballArr<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span>ball<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				ballStatus<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> = <span style="color: #000000;">&#91;</span>range<span style="color: #000066; font-weight: bold;">,</span>xspeed<span style="color: #000066; font-weight: bold;">,</span>yspeed<span style="color: #000066; font-weight: bold;">,</span>angleX<span style="color: #000066; font-weight: bold;">,</span>angleY<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
&nbsp;
			bmd = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">BitmapData</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">465</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">465</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">,</span> 0xFF000000<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			bmp = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Bitmap</span><span style="color: #000000;">&#40;</span>bmd<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>bmp<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #004993;">matrix</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Matrix</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			colortrans = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">ColorTransform</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ENTER_FRAME</span><span style="color: #000066; font-weight: bold;">,</span>onEnterFrame<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onEnterFrame<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> 
		<span style="color: #000000;">&#123;</span>	
			<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">uint</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&lt;</span> count<span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
&nbsp;
				ballArr<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = centerX <span style="color: #000066; font-weight: bold;">+</span> <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">sin</span><span style="color: #000000;">&#40;</span>ballStatus<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">3</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">*</span> ballStatus<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
				ballArr<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = centerY <span style="color: #000066; font-weight: bold;">+</span> <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">sin</span><span style="color: #000000;">&#40;</span>ballStatus<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">4</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">*</span> ballStatus<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
				ballStatus<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #000066; font-weight: bold;">+</span>= ballStatus<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
				ballStatus<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">4</span><span style="color: #000000;">&#93;</span> <span style="color: #000066; font-weight: bold;">+</span>= ballStatus<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
				<span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">identity</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">translate</span><span style="color: #000000;">&#40;</span>ballArr<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> ballArr<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
				colortrans<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">greenMultiplier</span> = <span style="color: #004993;">mouseX</span> <span style="color: #000066; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">465</span><span style="color: #000066; font-weight: bold;">;</span>
				colortrans<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">blueMultiplier</span> = <span style="color: #004993;">mouseY</span> <span style="color: #000066; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">465</span><span style="color: #000066; font-weight: bold;">;</span>
				colortrans<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">alphaMultiplier</span> = <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
				<span style="color: #009900; font-style: italic;">//matrix.scale(centerScale + Math.sin(angle) * rangeScale,centerScale + Math.sin(angle) * rangeScale);</span>
				<span style="color: #009900; font-style: italic;">//angle += speed;</span>
&nbsp;
				bmd<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">draw</span><span style="color: #000000;">&#40;</span>ballArr<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">,</span> colortrans<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
&nbsp;
			bmd<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">applyFilter</span><span style="color: #000000;">&#40;</span>bmd<span style="color: #000066; font-weight: bold;">,</span> bmd<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">rect</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Point</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">,</span> blur<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #000000;">&#125;</span>
&nbsp;
&nbsp;
	<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p><a href="http://www.kiyoty.com/blog/wp-content/uploads/2010/01/FlyingBall_100124.zip">ダウンロード</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=404</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bitmap習作1</title>
		<link>http://www.kiyoty.com/blog/?p=397</link>
		<comments>http://www.kiyoty.com/blog/?p=397#comments</comments>
		<pubDate>Wed, 20 Jan 2010 12:27:32 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[ActionScript3.0]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=397</guid>
		<description><![CDATA[ビットマップの習作 FlyingBall .as package &#123; import flash.display.Bitmap; import flash.display.BitmapData; import f &#8230; <a href="http://www.kiyoty.com/blog/?p=397">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
<object width="465" height="465">
<param name="movie" value="http://www.kiyoty.com/blog/wp-content/uploads/2010/01/FlyingBall3.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<param name="allowScriptAccess" value="always"></param>
<embed type="application/x-shockwave-flash" width="465" height="465" src="http://www.kiyoty.com/blog/wp-content/uploads/2010/01/FlyingBall3.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
<p>ビットマップの習作</p>
<p>FlyingBall .as</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> 
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Bitmap</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">BitmapData</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Sprite</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.filters</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">BlurFilter</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.geom</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Matrix</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.geom</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #3f5fbf;">/**
	 * ...
	 * @author ...
	 */</span>
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> FlyingBall <span style="color: #0033ff; font-weight: bold;">extends</span> <span style="color: #004993;">Sprite</span> 
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> ball<span style="color: #000066; font-weight: bold;">:</span>Ball<span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> angleX<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> angleY<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> centerX<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stageWidth</span> <span style="color: #000066; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> centerY<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stageHeight</span> <span style="color: #000066; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> range<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">150</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> xspeed<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000066; font-weight: bold;">.</span>07<span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> yspeed<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000066; font-weight: bold;">.</span>03<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">angle</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> centerScale<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> rangeScale<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">0.2</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> speed<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000066; font-weight: bold;">.</span>1<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> bmd<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">BitmapData</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> bmp<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Bitmap</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Matrix</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> blur<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">BlurFilter</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">BlurFilter</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">3</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">3</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">3</span><span style="color: #000000;">&#41;</span>
&nbsp;
		<span style="color: #339966; font-weight: bold;">function</span> FlyingBall<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> Stats<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			ball = <span style="color: #0033ff; font-weight: bold;">new</span> Ball<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">5</span><span style="color: #000066; font-weight: bold;">,</span>0x00CC00<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			bmd = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">BitmapData</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">465</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">465</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">,</span> 0xFF000000<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			bmp = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Bitmap</span><span style="color: #000000;">&#40;</span>bmd<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>bmp<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #004993;">matrix</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Matrix</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ENTER_FRAME</span><span style="color: #000066; font-weight: bold;">,</span>onEnterFrame<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onEnterFrame<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> 
		<span style="color: #000000;">&#123;</span>	
			ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = centerX <span style="color: #000066; font-weight: bold;">+</span> <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">sin</span><span style="color: #000000;">&#40;</span>angleX<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">*</span> range<span style="color: #000066; font-weight: bold;">;</span>
			ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = centerY <span style="color: #000066; font-weight: bold;">+</span> <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">sin</span><span style="color: #000000;">&#40;</span>angleY<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">*</span> range<span style="color: #000066; font-weight: bold;">;</span>
			angleX <span style="color: #000066; font-weight: bold;">+</span>= xspeed<span style="color: #000066; font-weight: bold;">;</span>
			angleY <span style="color: #000066; font-weight: bold;">+</span>= yspeed<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">identity</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">translate</span><span style="color: #000000;">&#40;</span>ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> ball<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">matrix</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">scale</span><span style="color: #000000;">&#40;</span>centerScale <span style="color: #000066; font-weight: bold;">+</span> <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">sin</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">angle</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">*</span> rangeScale<span style="color: #000066; font-weight: bold;">,</span>centerScale <span style="color: #000066; font-weight: bold;">+</span> <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">sin</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">angle</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">*</span> rangeScale<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">angle</span> <span style="color: #000066; font-weight: bold;">+</span>= speed<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			bmd<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">applyFilter</span><span style="color: #000000;">&#40;</span>bmd<span style="color: #000066; font-weight: bold;">,</span> bmd<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">rect</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Point</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">,</span> blur<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			bmd<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">draw</span><span style="color: #000000;">&#40;</span>ball<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">matrix</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
&nbsp;
	<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Ball.as</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> 
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Sprite</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #3f5fbf;">/**
	 * @author Kiyoty
	 */</span>
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> Ball <span style="color: #0033ff; font-weight: bold;">extends</span> <span style="color: #004993;">Sprite</span> 
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> radius<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">color</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">uint</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> vx<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> vy<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>		
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> Ball<span style="color: #000000;">&#40;</span>radius<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">40</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">color</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">uint</span> = 0xff0000 <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>radius = radius<span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">color</span> = <span style="color: #004993;">color</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">beginFill</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">color</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">drawCircle</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> radius<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">endFill</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p><a href='http://www.kiyoty.com/blog/wp-content/uploads/2010/01/FlyingBall_100120.zip'>ダウンロード</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=397</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>外部ファイルをBitmapDataにする</title>
		<link>http://www.kiyoty.com/blog/?p=375</link>
		<comments>http://www.kiyoty.com/blog/?p=375#comments</comments>
		<pubDate>Tue, 15 Dec 2009 14:08:23 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[ActionScript3.0]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=375</guid>
		<description><![CDATA[「Flash-AS3でBitmapData読み込み」を参考に、外部からBitmapしてみる。 読み込んだ画像をbitmapDataにdrawする。 package &#160; &#123; &#160; import  &#8230; <a href="http://www.kiyoty.com/blog/?p=375">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>「<a href="http://k-hiura.cocolog-nifty.com/blog/2009/06/as3bitmapdata-e.html" target="_blank">Flash-AS3でBitmapData読み込み</a>」を参考に、外部からBitmapしてみる。<br />
読み込んだ画像をbitmapDataにdrawする。</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span>
&nbsp;
<span style="color: #000000;">&#123;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Bitmap</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">BitmapData</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Loader</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Sprite</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.geom</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Matrix</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.net</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">URLRequest</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> BitmapTest <span style="color: #0033ff; font-weight: bold;">extends</span> <span style="color: #004993;">Sprite</span><span style="color: #000000;">&#123;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Loader</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> bmpData<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">BitmapData</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> bmpObjMtx<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Bitmap</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> mtx<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Matrix</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> bmpDataMtx<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">BitmapData</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> MatrixTest<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
&nbsp;
			<span style="color: #009900; font-style: italic;">//外部画像を読み込む</span>
			<span style="color: #004993;">loader</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Loader</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">load</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">URLRequest</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;image.jpg&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">contentLoaderInfo</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">COMPLETE</span><span style="color: #000066; font-weight: bold;">,</span>loadComp<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> loadComp<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>	<span style="color: #000000;">&#123;</span>
&nbsp;
			<span style="color: #009900; font-style: italic;">//読み込んだ外部画像を表示</span>
			<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">loader</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #009900; font-style: italic;">//読み込んだ画像をコピー</span>
			bmpData = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">BitmapData</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			bmpData<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">draw</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">loader</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> bmpObj<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Bitmap</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Bitmap</span><span style="color: #000000;">&#40;</span>bmpData<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			bmpObj<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = <span style="color: #000000; font-weight:bold;">150</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>bmpObj<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #009900; font-style: italic;">//コピーした画像を更にコピーし、ランダムノイズを発生させ、Matrixで変形移動</span>
			bmpDataMtx = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">BitmapData</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			bmpDataMtx<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">draw</span><span style="color: #000000;">&#40;</span>bmpData<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			bmpObjMtx = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Bitmap</span><span style="color: #000000;">&#40;</span>bmpDataMtx<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> rand = <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">*</span> 0xFFFF<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>	<span style="color: #009900; font-style: italic;">// 適当な乱数</span>
			bmpDataMtx<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">noise</span><span style="color: #000000;">&#40;</span>rand <span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span> <span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">255</span> <span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">8</span><span style="color: #000066; font-weight: bold;">|</span><span style="color: #000000; font-weight:bold;">4</span><span style="color: #000066; font-weight: bold;">|</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">|</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			mtx = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Matrix</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			mtx<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">identity</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			mtx<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">scale</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">1.5</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">1.5</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			mtx<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">translate</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">300</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			bmpObjMtx<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">transform</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">matrix</span> = mtx<span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>bmpObjMtx<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>追記<br />
<a href="http://sipo.jp/blog/2009/12/flashbitmapdata.html" target="_blank">Flashの描画速度をBitmapDataクラスを使って上げる方法</a>が詳しくて素晴らしい!<br />
<a href="http://www.scratchbrain.net/blog/ver2/entries/000278.html" target="_blank">BitmapにMouseEventつけられない</a><br />
BitmapにMouseEventつけようとして嵌った。Spriteの中にいれると出来た。<br />
<a href="http://livedocs.adobe.com/flex/201_jp/langref/flash/display/Bitmap.html" target="_blank">Adobe® Flex™ 2 リファレンスガイド</a></p>
<blockquote><p>メモ : Bitmap クラスは InteractiveObject クラスのサブクラスではないため、マウスイベントを送出できません。しかし、ビットマップオブジェクトを格納した表示オブジェクトコンテナの addEventListener() メソッドを使用できます。</p>
</blockquote>
<p>as演算子で変換できるるので、<br />
as演算子でBitmapに変換した方がスマートかも。</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> <span style="color: #000000;">&#123;</span>
&nbsp;
    <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Sprite</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">BitmapData</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Bitmap</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Loader</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.net</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">URLRequest</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
    <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> BitmapScroll <span style="color: #0033ff; font-weight: bold;">extends</span> <span style="color: #004993;">Sprite</span> <span style="color: #000000;">&#123;</span>
&nbsp;
        <span style="color: #6699cc; font-weight: bold;">var</span> bmpData<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">BitmapData</span><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Loader</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
        <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> BitmapScroll<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
            <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
            <span style="color: #004993;">loader</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Loader</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
            <span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">contentLoaderInfo</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">COMPLETE</span><span style="color: #000066; font-weight: bold;">,</span>onComp<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
            <span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">load</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">URLRequest</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;photo.jpg&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onComp<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
            <span style="color: #009900; font-style: italic;">//Bitmapに変換</span>
            <span style="color: #6699cc; font-weight: bold;">var</span> _bmp<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Bitmap</span> = <span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">content</span> <span style="color: #0033ff; font-weight: bold;">as</span> <span style="color: #004993;">Bitmap</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
            _bmp<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">bitmapData</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">scroll</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">20</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">10</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
            <span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>_bmp<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #000000;">&#125;</span>    
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>フィルターを適用させるには<a href="http://livedocs.adobe.com/flash/9.0_jp/ActionScriptLangRefV3/index.html?flash/display/BitmapData.html&amp;flash/display/class-list.html" target="_blank">BitmapData.applyFilter</a>を使う</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Bitmap</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">BitmapData</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Loader</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Sprite</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.filters</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">BlurFilter</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.geom</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.net</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">URLRequest</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> ApplyFilterTest <span style="color: #0033ff; font-weight: bold;">extends</span> <span style="color: #004993;">Sprite</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Loader</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #6699cc; font-weight: bold;">var</span> blur<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">BlurFilter</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">BlurFilter</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">5</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">5</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">3</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> ApplyFilterTest<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">loader</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Loader</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">contentLoaderInfo</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">COMPLETE</span><span style="color: #000066; font-weight: bold;">,</span> onComp<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">load</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">URLRequest</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;image.jpg&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onComp<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> bmpObj = <span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">content</span> <span style="color: #0033ff; font-weight: bold;">as</span> <span style="color: #004993;">Bitmap</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #009900; font-style: italic;">//フィルターを適用</span>
			bmpObj<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">bitmapData</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">applyFilter</span><span style="color: #000000;">&#40;</span>bmpObj<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">bitmapData</span><span style="color: #000066; font-weight: bold;">,</span> bmpObj<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">bitmapData</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">rect</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Point</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">,</span> blur<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>bmpObj<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=375</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>addEventListenerで引数を渡す</title>
		<link>http://www.kiyoty.com/blog/?p=368</link>
		<comments>http://www.kiyoty.com/blog/?p=368#comments</comments>
		<pubDate>Sun, 08 Nov 2009 14:20:23 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[ActionScript3.0]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=368</guid>
		<description><![CDATA[BONKURA BLOGに載っていました。 addEventListenerで一緒に引数を渡したい package &#123; import flash.display.Sprite; import flash.eve &#8230; <a href="http://www.kiyoty.com/blog/?p=368">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog2.bonkura.jp/" target="_blank">BONKURA BLOG</a>に載っていました。<br />
<a rel="bookmark" href="http://blog2.bonkura.jp/?p=13" target="_blank">addEventListenerで一緒に引数を渡したい</a></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Sprite</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MouseEvent</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> Fountain <span style="color: #0033ff; font-weight: bold;">extends</span> <span style="color: #004993;">Sprite</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> Fountain<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">MouseEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MOUSE_DOWN</span><span style="color: #000066; font-weight: bold;">,</span> onMouseDown<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onMouseDown<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">MouseEvent</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> _Dots<span style="color: #000066; font-weight: bold;">:</span>Dots = <span style="color: #0033ff; font-weight: bold;">new</span> Dots<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//水玉</span>
			_Dots<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = <span style="color: #004993;">mouseX</span><span style="color: #000066; font-weight: bold;">;</span>
			_Dots<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = <span style="color: #004993;">mouseY</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ENTER_FRAME</span><span style="color: #000066; font-weight: bold;">,</span> onEnterFrameHandler<span style="color: #000000;">&#40;</span>_Dots<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>_Dots<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #009900; font-style: italic;">//イベントハンドラー</span>
		<span style="color: #009900; font-style: italic;">//↓↓こう言う書き方をする　return function....</span>
		<span style="color: #339966; font-weight: bold;">function</span> onEnterFrameHandler<span style="color: #000000;">&#40;</span>dots<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Sprite</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Function</span> <span style="color: #000000;">&#123;</span>
&nbsp;
			<span style="color: #009900; font-style: italic;">//処理</span>
			<span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000000;">&#123;</span>
				dots<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> <span style="color: #000066; font-weight: bold;">+</span>= <span style="color: #000000; font-weight:bold;">10</span><span style="color: #000066; font-weight: bold;">;</span>
				dots<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000066; font-weight: bold;">+</span>= <span style="color: #000000; font-weight:bold;">10</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=368</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ダレル・ロイヤルの手紙</title>
		<link>http://www.kiyoty.com/blog/?p=360</link>
		<comments>http://www.kiyoty.com/blog/?p=360#comments</comments>
		<pubDate>Sun, 18 Oct 2009 13:56:08 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[Diary]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=360</guid>
		<description><![CDATA[ダレル・ロイヤルの手紙を時々思い出すのでメモ。 テキサス大アメフト部の名コーチ、ダレル ロイヤルが夏休み帰省中の選手達に送った手紙より 親愛なるロングホーン諸君 打ち負かされる事自体は、何も恥じるべき事ではない。 打ち負 &#8230; <a href="http://www.kiyoty.com/blog/?p=360">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>ダレル・ロイヤルの手紙を時々思い出すのでメモ。</p>
<p>テキサス大アメフト部の名コーチ、ダレル ロイヤルが夏休み帰省中の選手達に送った手紙より</p>
<blockquote><p>親愛なるロングホーン諸君</p>
<p>打ち負かされる事自体は、何も恥じるべき事ではない。<br />
打ち負かされたまま、立ち上がろうとせずにいる事が恥じるべき事なのである。<br />
ここに、数多くの人生での敗北を経験しながらも、<br />
その敗北から這い上がる勇気を持ち続けた、<br />
偉大な男の歴史を紹介しよう。</p>
<p>１８３２年 失業<br />
１８３２年 衆議院選、落選<br />
１８３３年 事業倒産<br />
１８３４年 衆議会議員当選<br />
１８３５年 婚約者死去<br />
１８３６年 神経衰弱<br />
１８３８年 衆議会議長落選<br />
１８４５年 下院議員指名投票、敗北<br />
１８４６年 下院議員当選<br />
１８４８年 下院議員再選失敗<br />
１８４９年 国土庁調査官を拒否される<br />
１８５４年 上院議員落選<br />
１８５６年 副大統領指名投票敗北<br />
１８５８年 上院議員、再度落選</p>
<p>&#8230;そして１８６０年、アブラハム リンカーンは第十六代 アメリカ合衆国大統領に選出された。</p>
<p>諸君等も三軍でシーズンを迎え、六軍でシーズンを終えるかも知れない。<br />
或いは一軍で始まり、四軍で終わるかもしれない。</p>
<p>諸君等が常に自分に問うべき事は、打ちのめされた後、自分は何をしようとしているのか？という事である。<br />
不平を言って自分を情けなく思うのか、それとも闘志を燃やし再び立ち向かって行くのか、という事である。<br />
今秋、フィールドでプレーする諸君等の誰もが、必ず一度や二度の屈辱を味わされるだろう。</p>
<p>今まで打ちのめされた事が無い選手等、存在した事は無い。<br />
ただし、一流の選手はあらゆる努力を払い速やかに立ち上がろうと努める、<br />
並の選手は少しばかり立ち上がるのが遅い、<br />
そして敗者はいつまでもグラウンドに横たわったままである。</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=360</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CastSprite生成時にidを指定&amp;getInstanceById()</title>
		<link>http://www.kiyoty.com/blog/?p=355</link>
		<comments>http://www.kiyoty.com/blog/?p=355#comments</comments>
		<pubDate>Sat, 17 Oct 2009 14:46:41 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[ActionScript3.0]]></category>
		<category><![CDATA[Progression3]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=355</guid>
		<description><![CDATA[すぐ忘れるのでメモ。 //testCastSprite = CastSprite //{id:&#34;hoge&#34;}でidを指定できる var _testCastSprite:testCastSprite = &#8230; <a href="http://www.kiyoty.com/blog/?p=355">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>すぐ忘れるのでメモ。</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #009900; font-style: italic;">//testCastSprite = CastSprite</span>
<span style="color: #009900; font-style: italic;">//{id:&quot;hoge&quot;}でidを指定できる</span>
<span style="color: #6699cc; font-weight: bold;">var</span> _testCastSprite<span style="color: #000066; font-weight: bold;">:</span>testCastSprite = <span style="color: #0033ff; font-weight: bold;">new</span> testCastSprite<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#123;</span>id<span style="color: #000066; font-weight: bold;">:</span><span style="color: #990000;">&quot;hoge&quot;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #009900; font-style: italic;">//getInstanceByIdで&quot;hoge&quot;への参照を取得</span>
<span style="color: #6699cc; font-weight: bold;">var</span> castSprite<span style="color: #000066; font-weight: bold;">:</span>CastSprite = CastSprite<span style="color: #000000;">&#40;</span>getInstanceById<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;hoge&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #009900; font-style: italic;">//削除</span>
progression<span style="color: #000066; font-weight: bold;">.</span>container<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">removeChild</span><span style="color: #000000;">&#40;</span>castSprite<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p><a href="http://asdoc.progression.jp/jp/progression/casts/package.html#getInstanceById%28%29" target="_blank">getInstanceById()</p>
<p>http://asdoc.progression.jp/jp/progression/casts/package.html#getInstanceById%28%29</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=355</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>スプーン印50周年CM：三井製糖</title>
		<link>http://www.kiyoty.com/blog/?p=343</link>
		<comments>http://www.kiyoty.com/blog/?p=343#comments</comments>
		<pubDate>Sun, 11 Oct 2009 13:26:12 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=343</guid>
		<description><![CDATA[スプーン印50周年CM：三井製糖 駅張りポスターが可愛くて気になった＆いい感じだったので。]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.kiyoty.com/blog/wp-content/uploads/2009/10/20091011221843スプーン印50周年CM：三井製糖.jpg"><img class="alignnone size-medium wp-image-344" title="20091011221843スプーン印50周年CM：三井製糖" src="http://www.kiyoty.com/blog/wp-content/uploads/2009/10/20091011221843スプーン印50周年CM：三井製糖-300x188.jpg" alt="20091011221843スプーン印50周年CM：三井製糖" width="300" height="188" /></a></p>
<p><a href="http://" target="_blank">スプーン印50周年CM：三井製糖</a></p>
<p>駅張りポスターが可愛くて気になった＆いい感じだったので。</p>
<p><a href="http://www.kiyoty.com/blog/wp-content/uploads/2009/10/spoom50th08.gif"><img class="alignnone size-full wp-image-345" title="spoom50th08" src="http://www.kiyoty.com/blog/wp-content/uploads/2009/10/spoom50th08.gif" alt="spoom50th08" width="350" height="253" /></a><a href="http://www.kiyoty.com/blog/wp-content/uploads/2009/10/spoom50th01.gif"></a></p>
<p><a href="http://www.kiyoty.com/blog/wp-content/uploads/2009/10/spoom50th01.gif"><img class="alignnone size-medium wp-image-348" title="spoom50th01" src="http://www.kiyoty.com/blog/wp-content/uploads/2009/10/spoom50th01-300x110.gif" alt="spoom50th01" width="300" height="110" /></a></p>
<p><a href="http://www.kiyoty.com/blog/wp-content/uploads/2009/10/wp_a_1280x1024.jpg"><img class="alignnone size-medium wp-image-346" title="wp_a_1280x1024" src="http://www.kiyoty.com/blog/wp-content/uploads/2009/10/wp_a_1280x1024-300x240.jpg" alt="wp_a_1280x1024" width="300" height="240" /></a></p>
<p><a href="http://www.kiyoty.com/blog/wp-content/uploads/2009/10/wp_b_1280x1024.jpg"><img class="alignnone size-medium wp-image-347" title="wp_b_1280x1024" src="http://www.kiyoty.com/blog/wp-content/uploads/2009/10/wp_b_1280x1024-300x240.jpg" alt="wp_b_1280x1024" width="300" height="240" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=343</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LOUIS VUITTON &#8211; A journey beyond</title>
		<link>http://www.kiyoty.com/blog/?p=337</link>
		<comments>http://www.kiyoty.com/blog/?p=337#comments</comments>
		<pubDate>Sun, 11 Oct 2009 06:23:52 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=337</guid>
		<description><![CDATA[LOUIS VUITTON &#8211; A journey beyond http://www.louisvuittonjourneys.com/#/r_FR/ Some journeys change mankin &#8230; <a href="http://www.kiyoty.com/blog/?p=337">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.kiyoty.com/blog/wp-content/uploads/2009/10/1_CV-SC2.jpg"><img class="alignnone size-medium wp-image-338" title="1_CV-SC2" src="http://www.kiyoty.com/blog/wp-content/uploads/2009/10/1_CV-SC2-300x225.jpg" alt="1_CV-SC2" width="300" height="225" /></a><br />
<a href="http://www.louisvuittonjourneys.com/#/r_FR/" target="_blank">LOUIS VUITTON &#8211; A journey beyond</a><br />
<a href="http://www.louisvuittonjourneys.com/#/r_FR/" target="_blank">http://www.louisvuittonjourneys.com/#/r_FR/</a><br />
Some journeys change mankind forever<br />
「人類を、新たな地へ導く旅」ということで、宇宙飛行士のジム・ラヴェル、バズ・オルドリン、サリー・ライドの3人を起用。<br />
ルイ・ヴィトンと言えば旅がテーマだけど、宇宙飛行士にはグッときた。<br />
ネルソン・マンデラも考えていると読んだけど、旅の切り口がいい。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=337</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Michal Levy-Giant Steps</title>
		<link>http://www.kiyoty.com/blog/?p=329</link>
		<comments>http://www.kiyoty.com/blog/?p=329#comments</comments>
		<pubDate>Sun, 27 Sep 2009 05:34:40 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[Web Site]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=329</guid>
		<description><![CDATA[Giant Steps http://michalevy.com/giant-steps いつかこういうのを作りたい。 Oneも素晴らしい。]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.michalevy.com/gs_download.html" target="_blank"><img class="alignnone size-medium wp-image-330" title="gs-watch" src="http://www.kiyoty.com/blog/wp-content/uploads/2009/09/gs-watch-300x97.jpg" alt="gs-watch" width="300" height="97" /></a></p>
<p><a href="http://www.michalevy.com/gs_download.html" target="_blank">Giant Steps</p>
<p>http://michalevy.com/giant-steps</a></p>
<p>いつかこういうのを作りたい。</p>
<p>Oneも素晴らしい。</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/qypqwcrO3YE&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;feature=player_embedded&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/qypqwcrO3YE&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;feature=player_embedded&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=329</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Papervision3Dの参考サイト</title>
		<link>http://www.kiyoty.com/blog/?p=317</link>
		<comments>http://www.kiyoty.com/blog/?p=317#comments</comments>
		<pubDate>Sun, 27 Sep 2009 03:51:50 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[ActionScript3.0]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=317</guid>
		<description><![CDATA[Papervision3Dは、ClockMakerさんのサイトがわかりやすいです。 フレームアクションで覚える PV3D Vol.01 フレームアクションで覚える PV3D Vol.01 (補足) フレームアクションで覚 &#8230; <a href="http://www.kiyoty.com/blog/?p=317">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Papervision3Dは、<a href="http://clockmaker.jp/blog/">ClockMaker</a>さんのサイトがわかりやすいです。</p>
<ul>
<li><a title="フレームアクションで覚える Papervision3D チュートリアル Vol.01 | ClockMaker Blog" href="http://clockmaker.jp/blog/2009/02/pv3d_frame_action_01/" target="_blank">フレームアクションで覚える PV3D Vol.01</a></li>
<li><a title="フレームアクションで覚える Papervision3D チュートリアル Vol.01 (補足) | ClockMaker Blog" href="http://clockmaker.jp/blog/2009/03/pv3d_frame_action_01_hosoku/" target="_blank">フレームアクションで覚える PV3D Vol.01 (補足)</a></li>
<li><a title="フレームアクションで覚える PV3D Vol.02 : Primitiveを理解する | ClockMaker Blog" href="http://clockmaker.jp/blog/2009/04/papervision3d_tutorial_2/" target="_blank">フレームアクションで覚える PV3D Vol.02 : Primitiveを理解する</a></li>
<li><a title="フレームアクションで覚える PV3D Vol.03 : Materialを理解する | ClockMaker Blog" href="http://clockmaker.jp/blog/2009/05/papervision3d_tutorial_3/" target="_blank">フレームアクションで覚える PV3D Vol.03 : Materialを理解する</a></li>
<li><a title="フレームアクションで覚える PV3D Vol.04 : BasicViewを理解する | ClockMaker Blog" href="http://clockmaker.jp/blog/2009/05/papervision3d_tutorial_4/#more-1619" target="_blank">フレームアクションで覚える PV3D Vol.04 : BasicViewを理解する</a></li>
<li><a title="フレームアクションで覚える PV3D Vol.05 : Cameraを理解する | ClockMaker Blog" href="http://clockmaker.jp/blog/2009/05/papervision3d_tutorial_5/" target="_blank">フレームアクションで覚える PV3D Vol.05 : Cameraを理解する</a></li>
<li><a title="フレームアクションで覚える PV3D Vol.06 : スライドショー | ClockMaker Blog" href="http://clockmaker.jp/blog/2009/05/papervision3d_tutorial_6/" target="_blank">フレームアクションで覚える PV3D Vol.06 : スライドショー</a></li>
</ul>
<p><a href="http://clockmaker.jp/labs/090419_primitive_generator/bin/index.html" target="_blank">Primitive Generator</a></p>
<p>カメラの移動とかは「<a title="崖っぷちWEBデザイナーブログ" href="http://www.y-tti.com/blog/" target="_blank">崖っぷちWEBデザイナーブログ</a>」がわかりやすいです。<br />
<a title="崖っぷちWEBデザイナーブログ | PaperVision3Dでオブジェクト回転とかカメラ移動とか" href="http://www.y-tti.com/blog/2008/04/papervision3d_2.php" target="_blank">崖っぷちWEBデザイナーブログ | PaperVision3Dでオブジェクト回転とかカメラ移動とか</a></p>
<p>公式はココ<a href="http://code.google.com/p/papervision3d/" target="_blank"><br />
papervision3d</a><br />
ドキュメント<a href="http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/index.html" target="_blank"></p>
<p>http://papervision3d.googlecode.com/svn/trunk/as3/trunk/docs/index.html</a></p>
<p><a title="崖っぷちWEBデザイナーブログ | PaperVision3Dでオブジェクト回転とかカメラ移動とか" href="http://www.y-tti.com/blog/2008/04/papervision3d_2.php" target="_blank"><br />
</a></p>
<p><strong>補足</strong><br />
<a href="http://clockmaker.jp/blog/2009/01/using_flash/" target="_blank">Flashでやってしまいがちな14個の間違った使い方</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=317</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Try&#8230;catch &#8230;finallyで例外処理を行う</title>
		<link>http://www.kiyoty.com/blog/?p=304</link>
		<comments>http://www.kiyoty.com/blog/?p=304#comments</comments>
		<pubDate>Mon, 21 Sep 2009 01:53:20 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[ActionScript3.0]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=304</guid>
		<description><![CDATA[アプリケーションの同期エラーの処理 test.xmlがなくて、error.xmlを読み込む場合。 public function TryTest&#40;&#41;:void &#123; &#160; var _loa &#8230; <a href="http://www.kiyoty.com/blog/?p=304">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://help.adobe.com/ja_JP/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7ed1.html" target="_blank">アプリケーションの同期エラーの処理</a></p>
<p>test.xmlがなくて、error.xmlを読み込む場合。</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> TryTest<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
&nbsp;
	<span style="color: #6699cc; font-weight: bold;">var</span> _loader<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">URLLoader</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">URLLoader</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">try</span> <span style="color: #000000;">&#123;</span>	
		<span style="color: #009900; font-style: italic;">//エラーが発生する可能性のある処理</span>
		_loader<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">load</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">URLRequest</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;test.xml&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">throw</span> <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Error</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;ファイルがありません&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">catch</span> <span style="color: #000000;">&#40;</span><span style="color: #004993;">error</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Error</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
		<span style="color: #009900; font-style: italic;">//エラーが発生した場合の処理</span>
		<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;&lt;Error&gt; &quot;</span> <span style="color: #000066; font-weight: bold;">+</span> <span style="color: #004993;">error</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">message</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		_loader<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">load</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">URLRequest</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;error.xml&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span> finally <span style="color: #000000;">&#123;</span>
		<span style="color: #009900; font-style: italic;">//必ず実行する処理</span>
		<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;処理終了&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=304</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tweener Memo</title>
		<link>http://www.kiyoty.com/blog/?p=269</link>
		<comments>http://www.kiyoty.com/blog/?p=269#comments</comments>
		<pubDate>Sun, 20 Sep 2009 08:27:23 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[ActionScript3.0]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://www.kiyoty.com/blog/?p=269</guid>
		<description><![CDATA[Tweenerは開発終了しまったけど・・・。 参考サイト Tweener Documentation and Language Reference 超訳：Tweenerドキュメント＆言語リファレンス Tweener 特殊 &#8230; <a href="http://www.kiyoty.com/blog/?p=269">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.tonpoo.com/blog/2009/06/tweener/" target="_blank">Tweenerは開発終了</a>しまったけど・・・。</p>
<p><strong>参考サイト</strong><br />
<a href="http://hosted.zeh.com.br/tweener/docs/en-us/" target="_blank">Tweener Documentation and Language Reference</a><br />
<a href="http://www.tonpoo.com/tweener/index2.html" target="_blank">超訳：Tweenerドキュメント＆言語リファレンス</a><br />
<a href="http://soohei.net/blog/archives/2008/01/10015045.html" target="_blank">Tweener 特殊プロパティ一覧 | SOOHEI.NET_BLOG</a><br />
<a href="http://fladdict.net/blog/2008/03/tweenermovieclipmatrix_1.html" target="_blank">fladdict » Tweener拡張で、MovieClipをMatrixで超変形をできるようにした</a></p>
<p>下記をインポート</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">import</span> caurina<span style="color: #000066; font-weight: bold;">.</span>transitions<span style="color: #000066; font-weight: bold;">.</span>Tweener<span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>通常の移動。onCompleteでTween完了後MyFunc実行。</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #009900; font-style: italic;">//移動</span>
Tweener<span style="color: #000066; font-weight: bold;">.</span>addTween<span style="color: #000000;">&#40;</span>_BoxMc <span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span> <span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">460</span> <span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">time</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">1</span> <span style="color: #000066; font-weight: bold;">,</span> transition<span style="color: #000066; font-weight: bold;">:</span><span style="color: #990000;">&quot;easeOut&quot;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #009900; font-style: italic;">//delay</span>
Tweener<span style="color: #000066; font-weight: bold;">.</span>addTween<span style="color: #000000;">&#40;</span>_BoxMc <span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span> <span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">180</span> <span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">time</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">1</span> <span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">delay</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">2</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #009900; font-style: italic;">//alpha→完了したらMyFunc実行</span>
Tweener<span style="color: #000066; font-weight: bold;">.</span>addTween<span style="color: #000000;">&#40;</span>_BoxMc <span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span> <span style="color: #004993;">alpha</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0.1</span> <span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">time</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">1</span> <span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">delay</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">4</span><span style="color: #000066; font-weight: bold;">,</span> onComplete<span style="color: #000066; font-weight: bold;">:</span>MyFunc <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> MyFunc<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	Tweener<span style="color: #000066; font-weight: bold;">.</span>addTween<span style="color: #000000;">&#40;</span>_BoxMc <span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span> <span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">alpha</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">1</span> <span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">time</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">1</span> <span style="color: #000066; font-weight: bold;">,</span> transition<span style="color: #000066; font-weight: bold;">:</span><span style="color: #990000;">&quot;easeOut&quot;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>onStart：Tween開始したタイミングで実行<br />
onComplete：Tween完了したタイミングで実行<br />
<span id="more-269"></span></p>
<p><a href="http://hosted.zeh.com.br/tweener/docs/en-us/properties/FilterShortcuts.html" target="_blank">FilterShortcuts</a></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">import</span> caurina<span style="color: #000066; font-weight: bold;">.</span>transitions<span style="color: #000066; font-weight: bold;">.</span>properties<span style="color: #000066; font-weight: bold;">.</span>FilterShortcuts<span style="color: #000066; font-weight: bold;">;</span>
FilterShortcuts<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
Tweener<span style="color: #000066; font-weight: bold;">.</span>addTween<span style="color: #000000;">&#40;</span>_BoxMc <span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span> _Blur_blurX<span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">200</span> <span style="color: #000066; font-weight: bold;">,</span>_Blur_blurY<span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">200</span> <span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">time</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">1</span> <span style="color: #000066; font-weight: bold;">,</span> transition<span style="color: #000066; font-weight: bold;">:</span><span style="color: #990000;">&quot;easeOut&quot;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p><a href="http://hosted.zeh.com.br/tweener/docs/en-us/properties/ColorShortcuts.html" target="_blank">ColorShortcuts</a></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">import</span> caurina<span style="color: #000066; font-weight: bold;">.</span>transitions<span style="color: #000066; font-weight: bold;">.</span>properties<span style="color: #000066; font-weight: bold;">.</span>ColorShortcuts<span style="color: #000066; font-weight: bold;">;</span>
ColorShortcuts<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
Tweener<span style="color: #000066; font-weight: bold;">.</span>addTween<span style="color: #000000;">&#40;</span>_BoxMc <span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span> _color<span style="color: #000066; font-weight: bold;">:</span>0xffdd33 <span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">time</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">1</span> <span style="color: #000066; font-weight: bold;">,</span> transition<span style="color: #000066; font-weight: bold;">:</span><span style="color: #990000;">&quot;easeOut&quot;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p><a href="http://hosted.zeh.com.br/tweener/docs/en-us/properties/DisplayShortcuts.html" target="_blank">DisplayShortcuts</a></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">import</span> caurina<span style="color: #000066; font-weight: bold;">.</span>transitions<span style="color: #000066; font-weight: bold;">.</span>properties<span style="color: #000066; font-weight: bold;">.</span>DisplayShortcuts<span style="color: #000066; font-weight: bold;">;</span>
DisplayShortcuts<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
Tweener<span style="color: #000066; font-weight: bold;">.</span>addTween<span style="color: #000000;">&#40;</span> _BoxMc<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span>_scale<span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">10</span> <span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">time</span><span style="color: #000066; font-weight: bold;">:</span> <span style="color: #000000; font-weight:bold;">2</span> <span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">delay</span><span style="color: #000066; font-weight: bold;">:</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p><a href="http://fladdict.net/blog/2008/03/tweenermovieclipmatrix_1.html" target="_blank">fladdictさんのMatrix変形</a></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">import</span> sketchbook<span style="color: #000066; font-weight: bold;">.</span>external<span style="color: #000066; font-weight: bold;">.</span>tweener<span style="color: #000066; font-weight: bold;">.</span>MatrixShortcuts<span style="color: #000066; font-weight: bold;">;</span>
MatrixShortcuts<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
Tweener<span style="color: #000066; font-weight: bold;">.</span>addTween<span style="color: #000000;">&#40;</span> _BoxMc<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #004993;">time</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">,</span>
	_matrix_a <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #000000; font-weight:bold;">5</span><span style="color: #000066; font-weight: bold;">,</span>
	_matrix_b <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">,</span>
	_matrix_c <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">,</span>
	_matrix_d <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">,</span>
	_matrix_tx<span style="color: #000066; font-weight: bold;">:</span> <span style="color: #000000; font-weight:bold;">200</span><span style="color: #000066; font-weight: bold;">,</span>
	_matrix_ty<span style="color: #000066; font-weight: bold;">:</span> <span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">,</span>
	<span style="color: #004993;">delay</span><span style="color: #000066; font-weight: bold;">:</span> <span style="color: #000000; font-weight:bold;">2</span>
<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=269</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CastButtonでhtmlページにリンク</title>
		<link>http://www.kiyoty.com/blog/?p=244</link>
		<comments>http://www.kiyoty.com/blog/?p=244#comments</comments>
		<pubDate>Tue, 15 Sep 2009 13:06:26 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[ActionScript3.0]]></category>
		<category><![CDATA[Progression3]]></category>

		<guid isPermaLink="false">http://kiyoty.com/blog/?p=244</guid>
		<description><![CDATA[CastButtonのコンストラクタにhrefプロパティを設定。 windowTargetプロパティで移動先を開くウィンドウを設定。 public function BlogButton&#40; initObject: &#8230; <a href="http://www.kiyoty.com/blog/?p=244">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>CastButtonのコンストラクタにhrefプロパティを設定。<br />
windowTargetプロパティで移動先を開くウィンドウを設定。</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> BlogButton<span style="color: #000000;">&#40;</span> initObject<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Object</span> = <span style="color: #0033ff; font-weight: bold;">null</span> <span style="color: #000000;">&#41;</span> 
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000000;">&#40;</span> initObject <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	href=<span style="color: #990000;">&quot;http://kiyoty.com/blog/&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
	windowTarget=<span style="color: #990000;">&quot;_blank&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p><a href=" http://asdoc.progression.jp/jp/progression/casts/CastButton.html#href"></p>
<p>http://asdoc.progression.jp/jp/progression/casts/CastButton.html#href</a></p>
<p><a href="http://asdoc.progression.jp/jp/progression/casts/CastButton.html#windowTarget">http://asdoc.progression.jp/jp/progression/casts/CastButton.html#windowTarget</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=244</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Maps API for Flashを使ってみる 1</title>
		<link>http://www.kiyoty.com/blog/?p=236</link>
		<comments>http://www.kiyoty.com/blog/?p=236#comments</comments>
		<pubDate>Sun, 13 Sep 2009 11:15:13 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[ActionScript3.0]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://kiyoty.com/blog/?p=236</guid>
		<description><![CDATA[Google Maps API for Flash http://code.google.com/intl/ja/apis/maps/documentation/flash/ ドキュメントクラスGmapsTest に記述 &#8230; <a href="http://www.kiyoty.com/blog/?p=236">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Google Maps API for Flash</strong><br />
<a href="http://code.google.com/intl/ja/apis/maps/documentation/flash/"　target="_blank">http://code.google.com/intl/ja/apis/maps/documentation/flash/</a></p>
<p>ドキュメントクラスGmapsTest に記述。</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> 
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MovieClip</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.geom</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Stage</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">StageAlign</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">StageScaleMode</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> com<span style="color: #000066; font-weight: bold;">.</span>google<span style="color: #000066; font-weight: bold;">.</span>maps<span style="color: #000066; font-weight: bold;">.</span>LatLng<span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> com<span style="color: #000066; font-weight: bold;">.</span>google<span style="color: #000066; font-weight: bold;">.</span>maps<span style="color: #000066; font-weight: bold;">.</span>Map<span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> com<span style="color: #000066; font-weight: bold;">.</span>google<span style="color: #000066; font-weight: bold;">.</span>maps<span style="color: #000066; font-weight: bold;">.</span>MapEvent<span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> com<span style="color: #000066; font-weight: bold;">.</span>google<span style="color: #000066; font-weight: bold;">.</span>maps<span style="color: #000066; font-weight: bold;">.</span>MapType<span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> com<span style="color: #000066; font-weight: bold;">.</span>google<span style="color: #000066; font-weight: bold;">.</span>maps<span style="color: #000066; font-weight: bold;">.</span>controls<span style="color: #000066; font-weight: bold;">.*;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> GmapsTest <span style="color: #0033ff; font-weight: bold;">extends</span> <span style="color: #004993;">MovieClip</span> 
	<span style="color: #000000;">&#123;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> googleMap<span style="color: #000066; font-weight: bold;">:</span>Map<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #009900; font-style: italic;">//Google Maps API KEY</span>
		const APP_ID<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;ABQIAAAACCDJp3BiH54Ry1gXIvKHaRQZE-WZzWfzLKT59YK6xkkyjLNwfRSLVernh1wD9pdfW0NRLDGvYYrSZQ&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #339966; font-weight: bold;">function</span> GmapsTest<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
&nbsp;
			<span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">align</span> = <span style="color: #004993;">StageAlign</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">TOP_LEFT</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">scaleMode</span> = <span style="color: #004993;">StageScaleMode</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">NO_SCALE</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			googleMap = <span style="color: #0033ff; font-weight: bold;">new</span> Map<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			googleMap<span style="color: #000066; font-weight: bold;">.</span>key = APP_ID<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			googleMap<span style="color: #000066; font-weight: bold;">.</span>setSize<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Point</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stageWidth</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stageHeight</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			googleMap<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>MapEvent<span style="color: #000066; font-weight: bold;">.</span>MAP_READY<span style="color: #000066; font-weight: bold;">,</span> onMapReady<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">RESIZE</span> <span style="color: #000066; font-weight: bold;">,</span> onGmapResize<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>googleMap<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #009900; font-style: italic;">//ウィンドウをリサイズした場合</span>
		<span style="color: #339966; font-weight: bold;">function</span> onGmapResize<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			googleMap<span style="color: #000066; font-weight: bold;">.</span>setSize<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Point</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stageWidth</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stageHeight</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>		
&nbsp;
		<span style="color: #339966; font-weight: bold;">function</span> onMapReady<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
			googleMap<span style="color: #000066; font-weight: bold;">.</span>setCenter<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> LatLng<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">40.736072</span><span style="color: #000066; font-weight: bold;">,-</span><span style="color: #000000; font-weight:bold;">73.992062</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">14</span><span style="color: #000066; font-weight: bold;">,</span> MapType<span style="color: #000066; font-weight: bold;">.</span>SATELLITE_MAP_TYPE<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #009900; font-style: italic;">//マウスズーム</span>
			googleMap<span style="color: #000066; font-weight: bold;">.</span>enableScrollWheelZoom<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #009900; font-style: italic;">//コントロール</span>
			googleMap<span style="color: #000066; font-weight: bold;">.</span>addControl<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> ZoomControl<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			googleMap<span style="color: #000066; font-weight: bold;">.</span>addControl<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> PositionControl<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			googleMap<span style="color: #000066; font-weight: bold;">.</span>addControl<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> MapTypeControl<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>			
		<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p><a href="http://kiyoty.com/blog/download/090913_gmaptest/" target="blank">サンプル</a><br />
<a href="http://kiyoty.com/blog/download/090913_gmaptest/kiyoty_gmap_test.zip">FLAデータ</a></p>
<p>FireFox3.0.14で確認するとマウスズームができない。宿題としておこう。</p>
<p>progressionでGoogle Mapsを使う場合は、import com.google.maps.*に、あわせて、src\libs\com\Googleに、SWC（map_1_16.swc）をおいたら動いた。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=236</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Progression LoadURLでエラー処理する</title>
		<link>http://www.kiyoty.com/blog/?p=231</link>
		<comments>http://www.kiyoty.com/blog/?p=231#comments</comments>
		<pubDate>Sun, 30 Aug 2009 15:15:16 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[ActionScript3.0]]></category>
		<category><![CDATA[Progression3]]></category>

		<guid isPermaLink="false">http://kiyoty.com/blog/?p=231</guid>
		<description><![CDATA[new LoadURL&#40; new URLRequest&#40; &#34;data.txt&#34; &#41; &#41; .error&#40; function&#40; e:Error &#41;: &#8230; <a href="http://www.kiyoty.com/blog/?p=231">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">new</span> LoadURL<span style="color: #000000;">&#40;</span> <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">URLRequest</span><span style="color: #000000;">&#40;</span> <span style="color: #990000;">&quot;data.txt&quot;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>
<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">error</span><span style="color: #000000;">&#40;</span> <span style="color: #339966; font-weight: bold;">function</span><span style="color: #000000;">&#40;</span> e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Error</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span> e <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span></pre></div></div>

<p><a href="http://forum.progression.jp/index.php?topic=31.0" target="_blank">http://forum.progression.jp/index.php?topic=31.0</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=231</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Progression ボタンを無効化</title>
		<link>http://www.kiyoty.com/blog/?p=228</link>
		<comments>http://www.kiyoty.com/blog/?p=228#comments</comments>
		<pubDate>Sun, 30 Aug 2009 13:08:13 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[ActionScript3.0]]></category>
		<category><![CDATA[Progression3]]></category>

		<guid isPermaLink="false">http://kiyoty.com/blog/?p=228</guid>
		<description><![CDATA[myBtn.buttonEnabled = false; http://asdoc.progression.jp/jp/progression/casts/CastButton.html]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">myBtn<span style="color: #000066; font-weight: bold;">.</span>buttonEnabled = <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p><a href="http://asdoc.progression.jp/jp/progression/casts/CastButton.html" target="_blank">http://asdoc.progression.jp/jp/progression/casts/CastButton.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=228</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MovieClipを並べる</title>
		<link>http://www.kiyoty.com/blog/?p=226</link>
		<comments>http://www.kiyoty.com/blog/?p=226#comments</comments>
		<pubDate>Mon, 24 Aug 2009 13:29:58 +0000</pubDate>
		<dc:creator>Kiyoty</dc:creator>
				<category><![CDATA[ActionScript3.0]]></category>
		<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://kiyoty.com/blog/?p=226</guid>
		<description><![CDATA[protected override function _onInit&#40;&#41;:void &#123; &#160; // 実行したいコマンドを登録します。 addCommand&#40; &#160; fu &#8230; <a href="http://www.kiyoty.com/blog/?p=226">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">protected</span> override <span style="color: #339966; font-weight: bold;">function</span> _onInit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
&nbsp;
	<span style="color: #009900; font-style: italic;">// 実行したいコマンドを登録します。</span>
	addCommand<span style="color: #000000;">&#40;</span>
&nbsp;
		<span style="color: #339966; font-weight: bold;">function</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
&nbsp;
			<span style="color: #009900; font-style: italic;">//_boxを60個並べる</span>
			<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span> <span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight:bold;">60</span><span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
&nbsp;
				<span style="color: #009900; font-style: italic;">//_box width:50px height:50px</span>
				<span style="color: #6699cc; font-weight: bold;">var</span> _box<span style="color: #000066; font-weight: bold;">:</span>Box = <span style="color: #0033ff; font-weight: bold;">new</span> Box<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
				<span style="color: #009900; font-style: italic;">// 5個ずつ並べる場合</span>
				<span style="color: #009900; font-style: italic;">// xのデフォルト値 70  横のオブジェクト送り値 60</span>
				<span style="color: #009900; font-style: italic;">// yのデフォルト値 10  縦のオブジェクト送り値 60</span>
				_box<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = <span style="color: #000000;">&#40;</span> <span style="color: #000000; font-weight:bold;">60</span> <span style="color: #000066; font-weight: bold;">*</span> <span style="color: #000000;">&#40;</span>i <span style="color: #000066; font-weight: bold;">%</span> <span style="color: #000000; font-weight:bold;">5</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">+</span> <span style="color: #000000; font-weight:bold;">70</span><span style="color: #000066; font-weight: bold;">;</span>
				_box<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = <span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">60</span> <span style="color: #000066; font-weight: bold;">*</span> <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span>i<span style="color: #000066; font-weight: bold;">/</span><span style="color: #000000; font-weight:bold;">5</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">+</span> <span style="color: #000000; font-weight:bold;">10</span><span style="color: #000066; font-weight: bold;">;</span>
				progression<span style="color: #000066; font-weight: bold;">.</span>container<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>_box<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kiyoty.com/blog/?feed=rss2&#038;p=226</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

