<?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>Organize and share your code snippets</title>
	<atom:link href="http://www.snippetsmania.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.snippetsmania.com</link>
	<description>php, javascript, java, c, c++, ruby, jquery, actionscript and more code snippets</description>
	<lastBuildDate>Thu, 23 Feb 2012 08:05:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>AS2 CASA MediaLoadã§ç”»åƒãƒ­ãƒ¼ãƒ‰</title>
		<link>http://www.snippetsmania.com/as2-casa-medialoada%c2%81%c2%a7c%e2%80%9d%c2%bba%c6%92%c2%8fa%c6%92%c2%ada%c6%92%c2%bca%c6%92%e2%80%b0/</link>
		<comments>http://www.snippetsmania.com/as2-casa-medialoada%c2%81%c2%a7c%e2%80%9d%c2%bba%c6%92%c2%8fa%c6%92%c2%ada%c6%92%c2%bca%c6%92%e2%80%b0/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 08:01:00 +0000</pubDate>
		<dc:creator>snippets</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[CASA]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[movie]]></category>
		<category><![CDATA[textmate]]></category>

		<guid isPermaLink="false">http://www.snippetsmania.com/?p=7858</guid>
		<description><![CDATA[source]]></description>
			<content:encoded><![CDATA[<pre class="qoate-code">/* ã“ã“ã‹ã‚‰ */
/* MediaLoadä½¿ã„æ–¹ */
import org.casaframework.load.media.MediaLoad;

//holderã‚’é…ç½®
this.createEmptyMovieClip(&quot;holder&quot;,this.getNextHighestDepth());
//CASAã‚’ä½¿ã£ã¦holderä¸Šã«ç”»åƒã‚’ãƒ­ãƒ¼ãƒ‰
var mediaLoad:MediaLoad = new MediaLoad(holder, &quot;external.jpg&quot;, false);
//ç”»åƒã®ãƒ­ãƒ¼ãƒ‰ãŒå®Œäº†ã—ãŸã‚‰ã€onImageLoadComplete ã‚’å®Ÿè¡Œã—ã‚ã¨ã„ã†æŒ‡å®š
mediaLoad.addEventObserver(this, MediaLoad.EVENT_LOAD_COMPLETE, &quot;onImageLoadComplete&quot;);
//ãƒ­ãƒ¼ãƒ‰é–‹å§‹
mediaLoad.start();

function onImageLoadComplete(sender:MediaLoad){
//ç”»åƒãƒ­ãƒ¼ãƒ‰ãŒå®Œäº†ã—ãŸã‚‰ã€ä¸Šã«ãƒªãƒ³ã‚±ãƒ¼ã‚¸ç™»éŒ²ã—ã¦ã‚ã‚‹MCã‚’ã‹ã¶ã›ã‚‹
holder.attachMovie(&quot;attachMC&quot;, &quot;attachMC1&quot;,100); //ã¨ã‚Šã‚ãˆãšæ·±åº¦100ã«ç½®ã
}</pre>
<p><a href="/out.php?id=5011" rel="nofollow">source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.snippetsmania.com/as2-casa-medialoada%c2%81%c2%a7c%e2%80%9d%c2%bba%c6%92%c2%8fa%c6%92%c2%ada%c6%92%c2%bca%c6%92%e2%80%b0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP MdN FlashãŒPHPã¨é€£æºã—ã¦æŽ²ç¤ºæ¿ PHPå´</title>
		<link>http://www.snippetsmania.com/php-mdn-flasha%c2%81oephpa%c2%81%c2%a8eeae%c2%90%c2%baa%c2%81%e2%80%94a%c2%81%c2%a6aez%c2%b2c%c2%a4%c2%baae%c2%9d%c2%bf-phpa%c2%81%c2%b4/</link>
		<comments>http://www.snippetsmania.com/php-mdn-flasha%c2%81oephpa%c2%81%c2%a8eeae%c2%90%c2%baa%c2%81%e2%80%94a%c2%81%c2%a6aez%c2%b2c%c2%a4%c2%baae%c2%9d%c2%bf-phpa%c2%81%c2%b4/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 07:01:00 +0000</pubDate>
		<dc:creator>snippets</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[mdn]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[textmate]]></category>

		<guid isPermaLink="false">http://www.snippetsmania.com/?p=7856</guid>
		<description><![CDATA[source]]></description>
			<content:encoded><![CDATA[<pre class="qoate-code">&lt;?/*
ãƒ‡ãƒ¼ã‚¿ä¿å­˜ã®ãŸã‚ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ç”¨æ„
Flashã‹ã‚‰å€¤ã‚’å—ã‘å–ã£ã¦ã€è¿”ã™
*/?&gt;

&lt;?php
//ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã™ã‚‹ãŸã‚ã®ãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚¡ã‚¤ãƒ«å
define(&quot;FILE_NAME&quot;, &quot;p046.txt&quot;);

//ä½•ã‚‰ã‹ã®ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸæ™‚ã«errorãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã‚’ä½œæˆ&lt;1&gt;
function error($message){ print(&quot;error=&quot;.$message.&quot;&amp;&quot;); };

//ç«‹ã¡ä¸ŠãŒã‚Šæ™‚
//POSTã‹ã‚‰startupã‚’å—ã‘å–ã‚‹
$startup = $_POST['startup'];
if($startup == &quot;true&quot;){
$fp = fopen(FILE_NAME,'r');
print(fread($fp,filesize(FILE_NAME)));
fclose($fp);
}

//POSTã‹ã‚‰commentã‚’å—ã‘å–ã‚‹&lt;2&gt;
$comment = $_POST['comment'];
if($comment != &quot;&quot;){
$fp = fopen(FILE_NAME,'r+');
if(!$fp){error(&quot;ãƒ•ã‚¡ã‚¤ãƒ«ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸ&quot;);}
if(!flock($fp,LOCK_EX)){error(&quot;ãƒ•ã‚¡ã‚¤ãƒ«ãƒ­ãƒƒã‚¯ã«å¤±æ•—ã—ã¾ã—ãŸ&quot;);}

$text = fread($fp,filesize(FILE_NAME));
$var_array	= explode(&quot;&amp;&quot;,$text);
$var_total = $var_array[0];
$total = explode(&quot;=&quot;,$var_total);
$total_num = $total[1];
$new_comment = &quot;comment&quot;.($total_num).&quot;=&quot;.$comment.&quot;&amp;&quot;.&quot;date&quot;.($total_num).&quot;=&quot;.date(&quot;Y-m-d (D) H:i:s&quot;);
array_push($var_array,$new_comment);

rewind($fp);

for($num = 0 ; $num &lt;= ($total_num*2)+1 ; $num++)
{
if($num == 0){
write_print($fp,&quot;total=&quot;.($total_num+1).&quot;&amp;&quot;);
}else if($num &lt; ($total_num*2)+1){
write_print($fp,$var_array[$num].&quot;&amp;&quot;);
}else{
write_print($fp,$var_array[$num]);
}
}
fclose($fp);
}

//ãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®æ›¸ãè¾¼ã¿ã¨ãƒ¬ã‚·ãƒ¼ãƒ–ç”¨ã®è¡¨ç¤ºã‚’ã¾ã¨ã‚ã‚‹
function write_print($filepath,$string){
fwrite($filepath,$string);
print($string);
}

?&gt;
</pre>
<p><a href="/out.php?id=5010" rel="nofollow">source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.snippetsmania.com/php-mdn-flasha%c2%81oephpa%c2%81%c2%a8eeae%c2%90%c2%baa%c2%81%e2%80%94a%c2%81%c2%a6aez%c2%b2c%c2%a4%c2%baae%c2%9d%c2%bf-phpa%c2%81%c2%b4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS2 MdN PHPã¨é€£æºã—ã¦æŽ²ç¤ºæ¿ ASå´</title>
		<link>http://www.snippetsmania.com/as2-mdn-phpa%c2%81%c2%a8eeae%c2%90%c2%baa%c2%81%e2%80%94a%c2%81%c2%a6aez%c2%b2c%c2%a4%c2%baae%c2%9d%c2%bf-asa%c2%81%c2%b4/</link>
		<comments>http://www.snippetsmania.com/as2-mdn-phpa%c2%81%c2%a8eeae%c2%90%c2%baa%c2%81%e2%80%94a%c2%81%c2%a6aez%c2%b2c%c2%a4%c2%baae%c2%9d%c2%bf-asa%c2%81%c2%b4/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 06:01:00 +0000</pubDate>
		<dc:creator>snippets</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[bbs]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[mdn]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[send]]></category>
		<category><![CDATA[textmate]]></category>
		<category><![CDATA[vars]]></category>

		<guid isPermaLink="false">http://www.snippetsmania.com/?p=7854</guid>
		<description><![CDATA[source]]></description>
			<content:encoded><![CDATA[<pre class="qoate-code">/*
ã‚¹ãƒ†ãƒ¼ã‚¸ã«upBtn,downBtn(è¡¨ç¤ºãƒ•ãƒ¬ãƒ¼ãƒ ã®ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«)
sendBtnã‚’é…ç½®
é€ä¿¡å´
*/

//é€ä¿¡ç”¨LoadVras
var sendObj:LoadVars = new LoadVars();
//å—ä¿¡ç”¨LoadVras
var receiveObj:LoadVars = new LoadVars();
//ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹PHPãƒ•ã‚¡ã‚¤ãƒ«ã¸ã®ãƒ‘ã‚¹
var connectURL:String = &quot;p046.php&quot;;

//ã¯ã˜ã‚ã«ãƒ‡ãƒ¼ã‚¿ã‚’å—ã‘å–ã‚‹
sendObj.startup = &quot;true&quot;;
sendObj.sendAndLoad(connectURL,receiveObj,&quot;POST&quot;);
displayTF.text = &quot;Now Loading ...&quot;;

//&lt;2&gt;
receiveObj.onLoad = function(success){
if(success){
if(receiveObj.error != undefined){
displayTF.text = receiveObj.error;
}else{
trace(&quot;total : &quot;+receiveObj.total+&quot;Â¥n&quot;);
//ä¸€åº¦displayTFã‚’åˆæœŸåŒ–
displayTF.text = &quot;&quot;;
//ç·ã‚³ãƒ¡ãƒ³ãƒˆæ•°
var total:Number = new Number(receiveObj.total);
//&lt;3&gt;
for(var i = 0 ; i &lt; total ; i++){
displayTF.text += &quot;No.&quot;+i+&quot;Â¥n&quot;;
//&lt;4&gt;
displayTF.text += receiveObj[&quot;comment&quot;+i]+&quot;Â¥n&quot;;
displayTF.text += receiveObj[&quot;date&quot;+i]+&quot;Â¥n&quot;;

displayTF.text += &quot;-Â¥nÂ¥n&quot;;
}
//ä¸€ç•ªä¸‹ã¾ã§ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«
displayTF.scroll = displayTF.maxscroll;
}
}else{
trace(&quot;Error connecting to server.&quot;);
}
};
//&lt;1&gt;
sendBtn.onRelease = function(){
sendObj.startup = &quot;false&quot;;
sendObj.comment = inputTF.text;
//ãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’åˆæœŸåŒ–
inputTF.text = &quot;&quot;;
sendObj.sendAndLoad(connectURL,receiveObj,&quot;POST&quot;);
}

upBtn.onPress = function(){
if(displayTF.scroll &gt; 1){
displayTF.scroll--;
}
}
downBtn.onPress = function(){
if(displayTF.scroll &lt; displayTF.maxscroll){
displayTF.scroll++;
}
}
</pre>
<p><a href="/out.php?id=5009" rel="nofollow">source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.snippetsmania.com/as2-mdn-phpa%c2%81%c2%a8eeae%c2%90%c2%baa%c2%81%e2%80%94a%c2%81%c2%a6aez%c2%b2c%c2%a4%c2%baae%c2%9d%c2%bf-asa%c2%81%c2%b4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS2 MdN ãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’ãƒ€ã‚¤ãƒŠãƒŸãƒƒã‚¯ã«ç”Ÿæˆ</title>
		<link>http://www.snippetsmania.com/as2-mdn-a%c6%92%e2%80%a0a%e2%80%9a%c2%ada%e2%80%9a%c2%b9a%c6%92%cb%86a%c6%92%e2%80%a2a%e2%80%9aa%c6%92%c2%bca%c6%92%c2%aba%c6%92%e2%80%b0a%e2%80%9a%e2%80%99a%c6%92ea%e2%80%9a%c2%a4a%c6%92sa%c6%92ya/</link>
		<comments>http://www.snippetsmania.com/as2-mdn-a%c6%92%e2%80%a0a%e2%80%9a%c2%ada%e2%80%9a%c2%b9a%c6%92%cb%86a%c6%92%e2%80%a2a%e2%80%9aa%c6%92%c2%bca%c6%92%c2%aba%c6%92%e2%80%b0a%e2%80%9a%e2%80%99a%c6%92ea%e2%80%9a%c2%a4a%c6%92sa%c6%92ya/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 05:01:00 +0000</pubDate>
		<dc:creator>snippets</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[field]]></category>
		<category><![CDATA[mdn]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[textmate]]></category>

		<guid isPermaLink="false">http://www.snippetsmania.com/?p=7852</guid>
		<description><![CDATA[source]]></description>
			<content:encoded><![CDATA[<pre class="qoate-code">/* ã“ã“ã‹ã‚‰ */
/*
MdN P039
ãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’ãƒ€ã‚¤ãƒŠãƒŸãƒƒã‚¯ã«ç”Ÿæˆ
*/
//åº§æ¨™ã¨ã‚µã‚¤ã‚ºã¯å¾Œã§å†å®šç¾©ã™ã‚‹ã®ã§ã€é©å½“ãªå€¤ã‚’å…¥ã‚Œã¦ãŠã&lt;1&gt;
this.createTextField(&quot;myTextField&quot;,1,0,0,0,0);

//çœŸä¸­æƒãˆ&lt;2&gt;
myTextField.autoSize = &quot;center&quot;;

//åº§æ¨™ã‚’ã‚¹ãƒ†ãƒ¼ã‚¸ã®ä¸­å¤®ã«åˆã‚ã›ã‚‹
myTextField._x = Stage.width/2 - myTextField._width/2;
myTextField._y = Stage.height/2 - myTextField._height/2;

//&lt;3&gt;
var format:TextFormat = new TextFormat();
format.size = 20;
myTextField.setNewTextFormat(format);
myTextField.border = true;

//&lt;4&gt;
setInterval(shiftText,1000);

var tangoArray:Array = new Array(	&quot;ã†ã¿&quot;,&quot;ã‹ãˆã‚‹&quot;,&quot;ã™ãšã‚€ã—&quot;,&quot;ã™ã„ã‹ã‚ã‚Š&quot;,&quot;ãƒ—ãƒ¼ãƒ«ã³ã‚ˆã‚Š&quot;,&quot;ãã†ã‚ã‚“ãªãŒã—&quot;);
function shiftText():Void{
var randomNum = Math.round(Math.random()*5);
var tango = tangoArray[randomNum];

//æ–‡å­—åˆ—ã‚’ä»£å…¥
myTextField.text = tango;
}
</pre>
<p><a href="/out.php?id=5008" rel="nofollow">source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.snippetsmania.com/as2-mdn-a%c6%92%e2%80%a0a%e2%80%9a%c2%ada%e2%80%9a%c2%b9a%c6%92%cb%86a%c6%92%e2%80%a2a%e2%80%9aa%c6%92%c2%bca%c6%92%c2%aba%c6%92%e2%80%b0a%e2%80%9a%e2%80%99a%c6%92ea%e2%80%9a%c2%a4a%c6%92sa%c6%92ya/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS2 MdN ãƒªã‚­ãƒƒãƒ‰ã‚µã‚¤ã‚º ã¨50ãƒ‘ãƒ¼ã‚»ãƒ³ãƒˆãƒœãƒƒã‚¯ã‚¹</title>
		<link>http://www.snippetsmania.com/as2-mdn-a%c6%92%c2%aaa%e2%80%9a%c2%ada%c6%92%c6%92a%c6%92%e2%80%b0a%e2%80%9a%c2%b5a%e2%80%9a%c2%a4a%e2%80%9a%c2%ba-a%c2%81%c2%a850a%c6%92%e2%80%98a%c6%92%c2%bca%e2%80%9a%c2%bba%c6%92%c2%b3a%c6%92/</link>
		<comments>http://www.snippetsmania.com/as2-mdn-a%c6%92%c2%aaa%e2%80%9a%c2%ada%c6%92%c6%92a%c6%92%e2%80%b0a%e2%80%9a%c2%b5a%e2%80%9a%c2%a4a%e2%80%9a%c2%ba-a%c2%81%c2%a850a%c6%92%e2%80%98a%c6%92%c2%bca%e2%80%9a%c2%bba%c6%92%c2%b3a%c6%92/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 04:01:00 +0000</pubDate>
		<dc:creator>snippets</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[listener]]></category>
		<category><![CDATA[mdn]]></category>
		<category><![CDATA[resize]]></category>
		<category><![CDATA[size]]></category>
		<category><![CDATA[stage]]></category>
		<category><![CDATA[textmate]]></category>

		<guid isPermaLink="false">http://www.snippetsmania.com/?p=7850</guid>
		<description><![CDATA[source]]></description>
			<content:encoded><![CDATA[<pre class="qoate-code">/*
ãƒªã‚­ãƒƒãƒ‰ã‚µã‚¤ã‚º
MdN P035
ã‚¹ãƒ†ãƒ¼ã‚¸ã«fiftyPer.boxã‚’ç”¨æ„ = 50%å›ºå®š
*/
Stage.scaleMode = &quot;noScale&quot;;
Stage.align=&quot;LT&quot;; // ã©ã“ã‚’ä¸­å¿ƒã«æ‹¡å¤§ç¸®å°ã™ã‚‹ã‹

//ãƒªã‚¹ãƒŠãƒ¼ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’ä½œæˆ
var myListener:Object = new Object();

//ãƒªã‚µã‚¤ã‚ºã•ã‚ŒãŸæ™‚ã®å‡¦ç†
myListener.onResize = function () {

var SW = Stage.width;
var SH = Stage.height;

//Xè»¸
LT._x = L._x = LB._x = 10;
T._x = B._x = fiftyPer._x = SW/2;
RT._x = R._x = RB._x = SW-10;

//Yè»¸
LT._y = T._y = RT._y = 10;
L._y = R._y = fiftyPer._y = SH/2;
LB._y = B._y = RB._y = SH - 10;

//æ‹¡å¤§ç¸®å°
fiftyPer.box._width = SW/2;
fiftyPer.box._height = SH/2;
}
//ãƒªã‚¹ãƒŠãƒ¼ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’ã‚¤ãƒ™ãƒ³ãƒˆãƒªã‚¹ãƒŠãƒ¼ã«ç™»éŒ²
Stage.addListener(myListener);</pre>
<p><a href="/out.php?id=5007" rel="nofollow">source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.snippetsmania.com/as2-mdn-a%c6%92%c2%aaa%e2%80%9a%c2%ada%c6%92%c6%92a%c6%92%e2%80%b0a%e2%80%9a%c2%b5a%e2%80%9a%c2%a4a%e2%80%9a%c2%ba-a%c2%81%c2%a850a%c6%92%e2%80%98a%c6%92%c2%bca%e2%80%9a%c2%bba%c6%92%c2%b3a%c6%92/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS2 3D ç«‹ä½“ã®é¢ã«ç”»åƒã‚’è²¼ä»˜ã‘ã¦å›žè»¢ã•ã›ã‚‹</title>
		<link>http://www.snippetsmania.com/as2-3d-c%c2%ab%e2%80%b9a%c2%bd%e2%80%9ca%c2%81%c2%aee%c2%9d%c2%a2a%c2%81%c2%abc%e2%80%9d%c2%bba%c6%92%c2%8fa%e2%80%9a%e2%80%99e%c2%b2%c2%bca%c2%bb%cb%9ca%c2%81%e2%80%98a%c2%81%c2%a6a%e2%80%baze%c2%bb/</link>
		<comments>http://www.snippetsmania.com/as2-3d-c%c2%ab%e2%80%b9a%c2%bd%e2%80%9ca%c2%81%c2%aee%c2%9d%c2%a2a%c2%81%c2%abc%e2%80%9d%c2%bba%c6%92%c2%8fa%e2%80%9a%e2%80%99e%c2%b2%c2%bca%c2%bb%cb%9ca%c2%81%e2%80%98a%c2%81%c2%a6a%e2%80%baze%c2%bb/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 03:01:00 +0000</pubDate>
		<dc:creator>snippets</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[Pic]]></category>
		<category><![CDATA[point]]></category>
		<category><![CDATA[rotation]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[textmate]]></category>

		<guid isPermaLink="false">http://www.snippetsmania.com/?p=7848</guid>
		<description><![CDATA[source]]></description>
			<content:encoded><![CDATA[<pre class="qoate-code">/* ã“ã“ã‹ã‚‰ */
/*
ãƒªãƒ³ã‚±ãƒ¼ã‚¸image0ã€œimage5ã®ç”»åƒã‚’ç”¨æ„
*/
Stage.scaleMode = 'noScale';

// 3D rotation is defined by an object
// which has rotation values for each axis
var rotations = {x:0, y:0, z:0};

// The points within the cube are defined
// in an array called boxPoints
var boxPoints = [
{x:-50, y:-50, z:-50},
{x:50, y:50, z:-50},
{x:-50, y:50, z:-50},
{x:-50, y:-50, z:50},
{x:50, y:-50, z:50},
{x:50, y:50, z:50}
];
/* Points
3 - 4
/   /|
0 -   5
|   |/
2 - 1

Notice that 2 points are missing, one in the front upper
right and one in the back lower left. These are not needed
since each side only requires 3 points to define its place
in 3D space.  Depending on intented image orientation,
though, these points may be necessary for your images to
go and face where you want them to
*/

// create a movie clip for the cube to reside
// place it in the center of the screen
this.createEmptyMovieClip(&quot;theScene&quot;, 1);
theScene._x = theScene._y = 150;

// generate each image for the cube
createImages();

// define enter frame event for rotating cube and
// positioning images within it
theScene.onEnterFrame = function(){
// adjust axis rotations based on mouse position
rotations.x -= this._ymouse/2000;
rotations.y += this._xmouse/2000;
// transform original 3D points to 2D based on rotations
var points2d = pointsTransform(boxPoints, rotations);

// for each image clip, use movieClip3PointTransform
// to alter its transform matrix so that it matches to
// 3 points within points2d
movieClip3PointTransform(this.image0, points2d[2], points2d[0], points2d[3]);
movieClip3PointTransform(this.image1, points2d[5], points2d[1], points2d[2]);
movieClip3PointTransform(this.image2, points2d[0], points2d[2], points2d[1]);
movieClip3PointTransform(this.image3, points2d[4], points2d[3], points2d[0]);
movieClip3PointTransform(this.image4, points2d[3], points2d[4], points2d[5]);
movieClip3PointTransform(this.image5, points2d[1], points2d[5], points2d[4]);
}

// create images as empty movie clips.  Each contains another
// empty movie clip in which each bitmap is attached. Using this
// inner movie clip, any sized bitmap can be used and it will
// stil conform to the size needed in the cube as this clip
// is referenced in movieClip3PointTransform.
function createImages(){
// for each side
var i = 6;
while(i--){
// create an image movie clip
theScene.createEmptyMovieClip(&quot;image&quot;+i, i);
// create a contents clip
theScene[&quot;image&quot;+i].createEmptyMovieClip(&quot;contents&quot;, i);
// attach the appropriate bitmap in the contents clip
theScene[&quot;image&quot;+i].contents.attachBitmap(
flash.display.BitmapData.loadBitmap(&quot;image&quot;+i),
1, false, true
);
}
}

// transforms 3d points into 2d points based
// on the rotation values provided
function pointsTransform(points, rotations){
var tpoints = new Array();
var sx = Math.sin(rotations.x);
var cx = Math.cos(rotations.x);
var sy = Math.sin(rotations.y);
var cy = Math.cos(rotations.y);
var sz = Math.sin(rotations.z);
var cz = Math.cos(rotations.z);
var x,y,z, xy,xz, yx,yz, zx,zy;

var i = points.length;
while (i--){
x = points[i].x;
y = points[i].y;
z = points[i].z;
// rotation around x
xy = cx*y - sx*z;
xz = sx*y + cx*z;
// rotation around y
yz = cy*xz - sy*x;
yx = sy*xz + cy*x;
// rotation around z
zx = cz*yx - sz*xy;
zy = sz*yx + cz*xy;
tpoints[i] = {x:zx, y:zy};
}
return tpoints;
}

// this function sets the transform for the image movie clips
// each a, b, c, and d of the transform matrix are simply
// based on the difference of positions of the points
// they need to match with.  The image movie clips' contents
// sizes are required to determine how much of that difference
// is actually applied to make the transform match
function movieClip3PointTransform(mc, a,b,c){
// deterimine visibility
mc._visible = pointsIsVisible(a,b,c);
// if not visible, exit function
if (!mc._visible) return;

// set values for matrix using point b as top left
var m = mc.transform.matrix;
m.tx = b.x;
m.ty = b.y;
m.a = (a.x - b.x)/mc.contents._width;
m.b = (a.y - b.y)/mc.contents._width;
m.c = (c.x - b.x)/mc.contents._height;
m.d = (c.y - b.y)/mc.contents._height;
mc.transform.matrix = m;
}

// using a 2D relationship between 3 points
// determine if a 3D face is visible
function pointsIsVisible(a,b,c){
var db = b.x - a.x;
if (!db) return (a.y &gt; b.y == c.x &gt; a.x);
var dc = c.x - a.x;
if (!dc) return (a.y &gt; c.y == b.x &lt; a.x);
return ((b.y-a.y)/db &lt; (c.y-a.y)/dc) != (a.x &lt; b.x == a.x &gt; c.x);
}
</pre>
<p><a href="/out.php?id=5006" rel="nofollow">source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.snippetsmania.com/as2-3d-c%c2%ab%e2%80%b9a%c2%bd%e2%80%9ca%c2%81%c2%aee%c2%9d%c2%a2a%c2%81%c2%abc%e2%80%9d%c2%bba%c6%92%c2%8fa%e2%80%9a%e2%80%99e%c2%b2%c2%bca%c2%bb%cb%9ca%c2%81%e2%80%98a%c2%81%c2%a6a%e2%80%baze%c2%bb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS2 CASA nãƒ•ãƒ¬ãƒ¼ãƒ å¾Œã«é–¢æ•°ã‚’å®Ÿè¡Œã™ã‚‹</title>
		<link>http://www.snippetsmania.com/as2-casa-na%c6%92%e2%80%a2a%c6%92%c2%aca%c6%92%c2%bca%c6%92%c2%a0a%c2%beoea%c2%81%c2%abe%e2%80%93%c2%a2ae%e2%80%a2%c2%b0a%e2%80%9a%e2%80%99a%c2%aeye%c2%a1oea%c2%81%e2%84%a2a%e2%80%9a%e2%80%b9/</link>
		<comments>http://www.snippetsmania.com/as2-casa-na%c6%92%e2%80%a2a%c6%92%c2%aca%c6%92%c2%bca%c6%92%c2%a0a%c2%beoea%c2%81%c2%abe%e2%80%93%c2%a2ae%e2%80%a2%c2%b0a%e2%80%9a%e2%80%99a%c2%aeye%c2%a1oea%c2%81%e2%84%a2a%e2%80%9a%e2%80%b9/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 02:01:00 +0000</pubDate>
		<dc:creator>snippets</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[CASA]]></category>
		<category><![CDATA[delay]]></category>
		<category><![CDATA[frame]]></category>
		<category><![CDATA[textmate]]></category>

		<guid isPermaLink="false">http://www.snippetsmania.com/?p=7846</guid>
		<description><![CDATA[source]]></description>
			<content:encoded><![CDATA[<pre class="qoate-code">/* ã“ã“ã‹ã‚‰ */
/*
nãƒ•ãƒ¬ãƒ¼ãƒ å¾Œã«é–¢æ•°ã‚’å®Ÿè¡Œã™ã‚‹
*/
import org.casaframework.time.FrameDelay;

// FrameDelayã§1ãƒ•ãƒ¬ãƒ¼ãƒ é…ã‚‰ã›ã‚‹ã¨èª­ã‚ã‚‹
var delay:FrameDelay = new FrameDelay( this, &quot;init&quot;, 1 );
delay.start();

function init() {
trace( mc.hogehoge ) //OK
}</pre>
<p><a href="/out.php?id=5004" rel="nofollow">source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.snippetsmania.com/as2-casa-na%c6%92%e2%80%a2a%c6%92%c2%aca%c6%92%c2%bca%c6%92%c2%a0a%c2%beoea%c2%81%c2%abe%e2%80%93%c2%a2ae%e2%80%a2%c2%b0a%e2%80%9a%e2%80%99a%c2%aeye%c2%a1oea%c2%81%e2%84%a2a%e2%80%9a%e2%80%b9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS2 Fuse ZigoEngine ãƒˆã‚¥ã‚¤ãƒ¼ãƒ³ã¨ã‚¤ãƒ¼ã‚¸ãƒ³ã‚°ã®ç¨®é¡žãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹</title>
		<link>http://www.snippetsmania.com/as2-fuse-zigoengine-a%c6%92%cb%86a%e2%80%9a%c2%a5a%e2%80%9a%c2%a4a%c6%92%c2%bca%c6%92%c2%b3a%c2%81%c2%a8a%e2%80%9a%c2%a4a%c6%92%c2%bca%e2%80%9a%c2%b8a%c6%92%c2%b3a%e2%80%9a%c2%b0a%c2%81%c2%aec%c2%a8/</link>
		<comments>http://www.snippetsmania.com/as2-fuse-zigoengine-a%c6%92%cb%86a%e2%80%9a%c2%a5a%e2%80%9a%c2%a4a%c6%92%c2%bca%c6%92%c2%b3a%c2%81%c2%a8a%e2%80%9a%c2%a4a%c6%92%c2%bca%e2%80%9a%c2%b8a%c6%92%c2%b3a%e2%80%9a%c2%b0a%c2%81%c2%aec%c2%a8/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 01:01:00 +0000</pubDate>
		<dc:creator>snippets</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[easing]]></category>
		<category><![CDATA[Fuse]]></category>
		<category><![CDATA[Penner]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[short]]></category>
		<category><![CDATA[simple]]></category>
		<category><![CDATA[textmate]]></category>
		<category><![CDATA[zigo]]></category>

		<guid isPermaLink="false">http://www.snippetsmania.com/?p=7844</guid>
		<description><![CDATA[source]]></description>
			<content:encoded><![CDATA[<pre class="qoate-code">stop();
import com.mosesSupposes.fuse.*;
ZigoEngine.simpleSetup(Shortcuts, PennerEasing);

// ã‚¤ãƒ¼ã‚¸ãƒ³ã‚°ã®ç¨®é¡žã¯æœ€ä¸‹éƒ¨ã«ã‚ã‚Šã¾ã™
// ã‚¹ãƒ†ãƒ¼ã‚¸ã«box1_mcã‚’ç”¨æ„
// 40ãƒ•ãƒ¬ãƒ¼ãƒ ã¾ã§ãƒ•ãƒ¬ãƒ¼ãƒ å»¶é•·

/*
çš†æ§˜
ç‰¹ã«åˆå¿ƒè€…ã®æ–¹ã€…

ã“ã®ã‚µãƒ³ãƒ—ãƒ«ã«ã¤ã„ã¦
ãƒ“ãƒ“ã‚‰ãªã„ã§ãã ã•ã„ï¼

ä¸‹ã®å¤§é‡ã®ã‚³ãƒ¼ãƒ‰ã¯ã€æ®µéšŽã‚’è¿½ã£ã¦å­¦ç¿’ã§ãã‚‹ã‚ˆã†ã«æ›¸ã‹ã‚ŒãŸã€ã¨ã¦ã‚‚ã‚·ãƒ³ãƒ—ãƒ«ãªã‚³ãƒ¼ãƒ‰ã§ã™ã€‚(^_^)

ã‚¹ãƒ†ãƒ¼ã‚¸ä¸Šã«box1_mcï¼ˆãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãƒ‘ãƒãƒ«ã‹ã‚‰è¨­å®šã—ã¾ã™ï¼‰ã¨ã„ã†åå‰ã®ãƒ ãƒ¼ãƒ“ãƒ¼ã‚¯ãƒªãƒƒãƒ—ãŒã‚ã‚Šã¾ã™ã€‚
ï¼ˆã‚‚ã†ä¸€ã¤ã€ã‚¿ã‚¤ãƒ ãƒ©ã‚¤ãƒ³ãŒãƒˆã‚¥ã‚¤ãƒ¼ãƒ³ã§ãã‚‹ã®ã‚’è¦‹ã›ã‚‹ãŸã‚ã®MCãŒé…ç½®ã•ã‚Œã¦ã„ã¾ã™ãŒã€ãã‚Œä»¥å¤–ã®ãƒ†ã‚¹ãƒˆã¯box1_mcã§è¡Œã„ã¾ã™ï¼‰

ã“ã“ã§ã¯ã€ä¸€é€£ã®ãƒˆã‚¥ã‚¤ãƒ¼ãƒ³ã®ã‚µãƒ³ãƒ—ãƒ«ã‚’ã”è¦§ã«ãªã‚Œã¾ã™ã€‚ãƒ ãƒ¼ãƒ“ãƒ¼ã‚¯ãƒªãƒƒãƒ—ã«ç›´æŽ¥ã€ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆãƒ¡ã‚½ãƒƒãƒ‰ã‚’æŒ‡å®šã—ã¦ã„ã¾ã™ã€‚

All the shortcuts accept around the same parameters - å„ä¾‹ã‚’è©¦ã—ã¦ã¿ã¦å­¦ç¿’ã—ã¦ã„ã£ã¦ãã ã•ã„ã€‚

ä½¿ã„æ–¹
å¥½ããªè¡Œã®ã‚³ãƒ¡ãƒ³ãƒˆã‚’å¤–ã—ã¦ä¸‹ã•ã„ã€è¡Œé ­ã®&quot;//&quot;ã‚’å‰Šé™¤ã™ã‚‹ã“ã¨ã§ã€å®Ÿè¡Œã•ã‚Œã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚
ã‚ˆãã‚ã‹ã‚‰ãªã„ã¨ã„ã†æ–¹ã¸ã®Tipsï¼š
- æ¬¡ã®è¡Œã‚’ãƒ†ã‚¹ãƒˆã—ãŸã„æ™‚ã¯&quot;//&quot;ã‚’æ‰“ã¡ç›´ã—ã¦ãŠã„ã¦ãã ã•ã„ã€ã§ãªã„ã¨ã€ã„ãã¤ã‹ã®å‘½ä»¤ãŒåŒæ™‚ã«å®Ÿè¡Œã•ã‚Œã¦ã—ã¾ã„ã¾ã™ã€‚
- //ã®ç›´å¾Œã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’åˆã‚ã›ãƒªã‚¿ãƒ¼ãƒ³ã‚­ãƒ¼ã§æ”¹è¡Œã•ã›ã‚‹ã¨ç°¡å˜ã§ã™ã€‚ãƒ†ã‚¹ãƒˆå¾Œã€æˆ»ã™æ™‚ã¯backspaceã‚­ãƒ¼ã§å…ƒã®å½¢ã«æˆ»ã—ã¦ãã ã•ã„ã€‚

*/

/* 1. æœ€å°é™ã®æŒ‡å®šã‚’ã—ãŸæ™‚ã¯ã€Shortcutsã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã‚ã‚‹ã€ï¼‘ç§’ã§ã€&quot;easeOutQuint&quot;ã¨ã„ã†ç¨®é¡žã®ãƒˆã‚¥ã‚¤ãƒ¼ãƒ³ã§å®Ÿè¡Œã•ã‚Œã¾ã™ã€‚
å„è¡Œã®ã‚³ãƒ¼ãƒ‰ã‚’è©¦ã—ã¦ã¿ã¦ãã ã•ã„ã€‚*/

//this.box1_mc.alphaTo(0);
this.box1_mc.slideTo(300,300);
//this.box1_mc.rotateTo(180);
//this.box1_mc.scaleTo(200);
//this.box1_mc.sizeTo(125);
//this.box1_mc.colorTo(&quot;#33FF00&quot;);
//this.box1_mc.tintTo(0x33FF00,50);
//this.box1_mc.brightnessTo(80);
//this.box1_mc.brightOffsetTo(100);
//this.box1_mc.contrastTo(200);
//this.box1_mc.invertColorTo(100);

/* bezierTo ã§ã¯ x, y, controlX, controlY ã‚’è¨­å®šã§ãã¾ã™ */
//this.box1_mc.bezierTo(400,100,300,200);

/* fadeInã¨fadeOutã§ã¯alphaã®å€¤ã‚’ãƒ•ã‚§ãƒ¼ãƒ‰ã•ã›ã€ã‚¢ãƒ«ãƒ•ã‚¡ãŒ0ã«ãªã£ãŸã‚‰_visibleã‚’falseã«ã™ã‚‹ã‚ˆã†ã«ãªã£ã¦ã„ã¾ã™ã€‚ */
//this.box1_mc.fadeOut();

/* æ¬¡ã®è¡Œã¯åŒæ™‚ã«å®Ÿè¡Œã—ã¦ãã ã•ã„ã€‚ */
//this.box1_mc._alpha = 0;
//this.box1_mc.fadeIn();

/* frameTo ã§ã¯ã‚¿ã‚¤ãƒ ãƒ©ã‚¤ãƒ³è‡ªä½“ã‚’ãƒˆã‚¥ã‚¤ãƒ¼ãƒ³ã§ãã¾ã™ã€‚ã“ã“ã§ã¯ã‚¿ã‚¤ãƒ ãƒ©ã‚¤ãƒ³ã‚’40ãƒ•ãƒ¬ãƒ¼ãƒ ã«é€²ã‚ã¾ã™ã€‚ */
//this.frameTo(40, 1);//çµæžœã¯ä¸‹ã®ãƒ ãƒ¼ãƒ“ãƒ¼ã‚¯ãƒªãƒƒãƒ—ã§ç¢ºèªã—ã¦ãã ã•ã„ã€‚

/* ã‚„ã‚„ã“ã—ã„ã®ã§ã‚ã¾ã‚Šä½¿ã„ãŸãŒã‚‰ãªã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ãŒã€flash7ã§ã®color transformæŒ‡å®šã‚‚ã§ãã¾ã™ã€‚ */
//this.box1_mc.colorTransformTo(0,100,100,50,100,50,50,0);

/* The granddaddy of them all is &quot;tween&quot;, which lets you pass any parameter, including some
added by the engine that you may not have seen yet. (You will in the other files here.)
(This only scratches the surface since you can also tween more than one property at once.) */
//this.box1_mc.tween('_xscale', 4000);

/* OKã€‚ä¸Šã®ä¾‹ã‚’å…¨éƒ¨è©¦ã—ãŸã‚‰æ¬¡ã„ã£ã¦ã¿ã‚ˆã†ã€‚ ---------------------------------------
2. &quot;ç›¸å¯¾æŒ‡å®šã«ã¤ã„ã¦çŸ¥ã‚‹&quot;
ZigoEngineã«ã¯ç›¸å¯¾å€¤ã§æŒ‡å®šã™ã‚‹æŠ€ãŒã‚ã‚Šã¾ã™ã€‚ç°¡å˜ã§ã™ã€‚å¼•ç”¨ç¬¦ã€Œ'ã€ã‚’ä½¿ã†ã ã‘ã§ã™ã€‚

ä¸‹ã®ã‚µãƒ³ãƒ—ãƒ«ã‚’è©¦ã—ã¦ã¿ã¦ãã ã•ã„ã€‚å„ãƒ–ãƒ­ãƒƒã‚¯ã®ï¼‘è¡Œç›®ã¨ï¼’è¡Œç›®ã‚’ãã‚Œãžã‚Œè©¦ã—ã¦ã€é•ã„ã‚’è¦‹ã¦ãã ã•ã„ã€‚
ç›¸å¯¾å€¤ï¼ˆã€Œ'ã€ã§å›²ã¾ã‚ŒãŸæ–¹ï¼‰ã§ã®æŒ‡å®šã§ã¯ã€ç¾åœ¨ã®ä½ç½®ã‹ã‚‰ã®&quot;ç›¸å¯¾çš„&quot;ãªä½ç½®ã‚’ç®—å‡ºã—ã¾ã™ã€‚
*/

//this.box1_mc.slideTo(100,100); // ã‚¹ãƒ†ãƒ¼ã‚¸å·¦ä¸Šï¼ˆåŽŸç‚¹ï¼‰ã‚’å…ƒã«ç§»å‹•ã—ã¾ã™ã€‚
//this.box1_mc.slideTo('100','100'); // ãƒ ãƒ¼ãƒ“ãƒ¼ã‚¯ãƒªãƒƒãƒ—ã®ç¾åœ¨ä½ç½®ã‹ã‚‰ãã‚Œãžã‚Œ100pxãšã¤ç§»å‹•ã—ã¾ã™ã€‚

//this.box1_mc.slideTo(-10, -10); // ã‚¹ãƒ†ãƒ¼ã‚¸å·¦ä¸Šï¼ˆåŽŸç‚¹ï¼‰ã‚’å…ƒã«ç§»å‹•ã—ã¾ã™ã€‚
//this.box1_mc.slideTo('-10','-10'); // ãƒ ãƒ¼ãƒ“ãƒ¼ã‚¯ãƒªãƒƒãƒ—ã®ç¾åœ¨ä½ç½®ã‹ã‚‰ãã‚Œãžã‚Œ-10pxãšã¤ç§»å‹•ã—ã¾ã™ã€‚

//this.box1_mc.bezierTo(150,50,100, 250);
//this.box1_mc.bezierTo('100','0','0','-50');

//this.box1_mc.scaleTo(300);
//this.box1_mc.scaleTo('300');

//this.box1_mc.sizeTo(100);
//this.box1_mc.sizeTo('100');

/* æ¬¡ã„ã£ã¦ã¿ã‚ˆã†ã€‚ -----------------------------------------------------------------------------------------
3. Tweens have a bunch more parameters that you can add, with commas of course.

Here they are:
- one or more destination parameters, depending on the shortcut
- number of seconds to tween
- easing style -- &quot;easeOutElastic&quot;, &quot;easeInOutExpo&quot;, or &quot;easeInBack&quot; etc. --
- delay before start
- a function to trigger when the tween is done, also called a &quot;callback&quot;.

Uncomment one example at a time below to see each parameter added.
*/

/* ã¯ã˜ã‚ã«åŸºæœ¬ã®slideToã§ã™ã€‚ç›¸å¯¾å€¤ã§ç§»å‹•ã•ã›ã¾ã™ã€‚ */
//this.box1_mc.slideTo('300', '0');

/* ç¶™ç¶šæ™‚é–“ã‚’ï¼’ç§’ã«è¨­å®šã—ã¾ã™ã€‚ - è¨­å®šã—ã¦ã„ãªã„æ™‚ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã®ï¼‘ç§’ã§ã—ãŸã€‚ */
//this.box1_mc.slideTo('300', '0', 2);

/* PennerEasingã®çœç•¥æŒ‡å®šã‚’ä½¿ã£ã¦ã€ã‚¤ãƒ¼ã‚¸ãƒ³ã‚°ã®ç¨®é¡žã‚’è¿½åŠ ã—ã¾ã™ */
//this.box1_mc.slideTo('300', '0', 2, 'easeOutElastic');

/* 1.5ç§’ã®å¾…æ©Ÿå¾Œã€ãƒˆã‚¥ã‚¤ãƒ¼ãƒ³ã‚’é–‹å§‹ã¾ã§ã™ã‚‹ã‚ˆã†ã«è¨­å®šã—ã¾ã™ã€‚ */
//this.box1_mc.slideTo('300', '0', 2, 'easeOutElastic', 1.5);

/* æœ€å¾Œã«ã€å‡ºåŠ›ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’è¡¨ç¤ºã™ã‚‹traceã‚³ãƒžãƒ³ãƒ‰ã‚’è¿½åŠ ã—ã¾ã™ã€‚
ï¼ˆã“ã‚Œã¯ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯é–¢æ•°ã‚’å®Ÿè¡Œã•ã›ã‚‹ç°¡å˜ãªæ–¹æ³•ã®ã²ã¨ã¤ã§ã™ã€‚ãœã²ä»–ã®ã‚µãƒ³ãƒ—ãƒ«ã‚‚ã”è¦§ä¸‹ã•ã„ã€‚ï¼‰ */
//this.box1_mc.slideTo('300', '0', 2, 'easeOutElastic', 1.5, &quot;trace('ãƒˆã‚¥ã‚¤ãƒ¼ãƒ³çµ‚ã‚ã£ãŸã‚ˆ')&quot;);

/* ã“ã‚Œã¾ã§å­¦ç¿’ã—ã¦ããŸã“ã¨ã‚’ä½¿ã£ã¦ã€ä¸Šã®æ–¹ã®ä¾‹ã«ã€ç¶™ç¶šæ™‚é–“ã‚„ã‚¤ãƒ¼ã‚¸ãƒ³ã‚°ã‚¿ã‚¤ãƒ—ã€å¾…æ©Ÿæ™‚é–“ã‚„ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã‚’
è¨­å®šã—ã¦ã€ã„ã‚ã„ã‚è©¦ã—ã¦ã¿ã¦ãã ã•ã„ã€‚

ã‚¤ãƒ¼ã‚¸ãƒ³ã‚°ã«ã¤ã„ã¦ã®è¿½è¨˜ï¼šã“ã®ãƒšãƒ¼ã‚¸ã®æœ€ä¸Šæ®µã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—ã®éƒ¨åˆ†ã§ã€
ZigoEngineã«PennerEasingãŒæ¸¡ã•ã‚Œã¦ã„ã‚‹äº‹ã«ã”æ³¨æ„ãã ã•ã„ã€‚ç™»éŒ²ã—ã¦ãŠãã“ã¨ã§ã€
&quot;easeInQuad&quot;ã¨ã„ã£ãŸçœç•¥æŒ‡å®šãŒä½¿ãˆã‚‹ã‚ˆã†ã«ãªã‚‹ã®ã§ã™ã€‚

ã§ã‚‚ã€ãƒ“ãƒ«ãƒˆã‚¤ãƒ³ã®mx easingã‚¯ãƒ©ã‚¹ã®æ–¹ãŒãŠå¥½ã¿ã§ã‚ã‚Œã°ã€setupéƒ¨åˆ†ã®PennerEasingã®ç™»éŒ²ã‚’å‰Šé™¤ã—ã€
import mx.transitions.easing.*;
ã¨è¿½åŠ ã—ã¦ã€ã‚¤ãƒ¼ã‚¸ãƒ³ã‚°ã®ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã¨ã—ã¦Strong.easeOutï¼ˆå¼•ç”¨ç¬¦ã¯ä¸è¦ï¼‰ç­‰ã‚’è¨­å®šã—ã¦ãã ã•ã„ã€‚

Zigoã®ãƒˆã‚¥ã‚¤ãƒ¼ãƒ³æ–¹æ³•ã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆæŒ‡å®šã‚’ã‚‚ã£ã¨çŸ¥ã‚ŠãŸã„æ–¹ã®ãŸã‚ã«ã€ä¸‹ã«å…¨ãƒªã‚¹ãƒˆã‚’è¼‰ã›ã¦ãŠãã¾ã™ã€‚
ï¼ˆå€‹äººçš„ã«ã‚‚ã€é¸ã¶ç¨®é¡žãŒå¤šã„ã®ã§é‡å®ã—ã¦ã¾ã™ã€‚ï¼‰
ã“ã‚Œã‚‰å…¨ã¦ã‚’ä½œã£ãŸäººã€ãã®åã¯Robert Penner - å½¼ã®æœ¬ã¯ãŠã™ã™ã‚ã§ã™ã€‚

è‰²ã€…è©¦ã—ã¦éŠã‚“ã§ã¿ã¦ãã ã•ã„ï¼

&quot;linear&quot;,
&quot;easeInQuad&quot;,&quot;easeOutQuad&quot;,&quot;easeInOutQuad&quot;,&quot;easeOutInQuad&quot;
&quot;easeInCubic&quot;,&quot;easeOutCubic&quot;,&quot;easeInOutCubic&quot;,&quot;easeOutInCubic&quot;
&quot;easeInQuart&quot;,&quot;easeOutQuart&quot;,&quot;easeInOutQuart&quot;,&quot;easeOutInQuart&quot;
&quot;easeInQuint&quot;,&quot;easeOutQuint&quot;,&quot;easeInOutQuint&quot;,&quot;easeOutInQuint&quot;
&quot;easeInSine&quot;,&quot;easeOutSine&quot;,&quot;easeInOutSine&quot;,&quot;easeOutInSine&quot;
&quot;easeInExpo&quot;,&quot;easeOutExpo&quot;,&quot;easeInOutExpo&quot;,&quot;easeOutInExpo&quot;
&quot;easeInCirc&quot;,&quot;easeOutCirc&quot;,&quot;easeInOutCirc&quot;,&quot;easeOutInCirc&quot;
&quot;easeInElastic&quot;,&quot;easeOutElastic&quot;,&quot;easeInOutElastic&quot;,&quot;easeOutInElastic&quot;
&quot;easeInBack&quot;,&quot;easeOutBack&quot;,&quot;easeInOutBack&quot;,&quot;easeOutInBack&quot;
&quot;easeInBounce&quot;,&quot;easeOutBounce&quot;,&quot;easeInOutBounce&quot;&quot;easeOutInBounce&quot;

*/</pre>
<p><a href="/out.php?id=5003" rel="nofollow">source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.snippetsmania.com/as2-fuse-zigoengine-a%c6%92%cb%86a%e2%80%9a%c2%a5a%e2%80%9a%c2%a4a%c6%92%c2%bca%c6%92%c2%b3a%c2%81%c2%a8a%e2%80%9a%c2%a4a%c6%92%c2%bca%e2%80%9a%c2%b8a%c6%92%c2%b3a%e2%80%9a%c2%b0a%c2%81%c2%aec%c2%a8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS2 CASA LoadGroup XML ä¸€æ‹¬èª­ã¿è¾¼ã¿ã¨ãƒ‘ãƒ¼ã‚»ãƒ³ãƒˆè¡¨ç¤º</title>
		<link>http://www.snippetsmania.com/as2-casa-loadgroup-xml-a%c2%b8eae%e2%80%b9%c2%ace%c2%aa%c2%ada%c2%81%c2%bfe%c2%be%c2%bca%c2%81%c2%bfa%c2%81%c2%a8a%c6%92%e2%80%98a%c6%92%c2%bca%e2%80%9a%c2%bba%c6%92%c2%b3a%c6%92%cb%86e%c2%a1%c2%a8c/</link>
		<comments>http://www.snippetsmania.com/as2-casa-loadgroup-xml-a%c2%b8eae%e2%80%b9%c2%ace%c2%aa%c2%ada%c2%81%c2%bfe%c2%be%c2%bca%c2%81%c2%bfa%c2%81%c2%a8a%c6%92%e2%80%98a%c6%92%c2%bca%e2%80%9a%c2%bba%c6%92%c2%b3a%c6%92%cb%86e%c2%a1%c2%a8c/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 00:01:01 +0000</pubDate>
		<dc:creator>snippets</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bytes]]></category>
		<category><![CDATA[CASA]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[percent]]></category>
		<category><![CDATA[textmate]]></category>
		<category><![CDATA[util]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.snippetsmania.com/?p=7842</guid>
		<description><![CDATA[source]]></description>
			<content:encoded><![CDATA[<pre class="qoate-code">/* ã“ã“ã‹ã‚‰ */
/*
CASAãƒ•ãƒ¬ãƒ¼ãƒ ãƒ¯ãƒ¼ã‚¯ç·åˆ
Twitterã®userã¨friendsã®RSSã‚’ã¾ã¨ã‚ã¦èª­ã¿è¾¼ã‚€ã‚µãƒ³ãƒ—ãƒ«

ã€ŒLoadGroupã€ã‚’ä½¿ã†ã¨è¤‡æ•°ã®xmlã‚„ç”»åƒã‚’ä¸€æ‹¬ç®¡ç†ã§èª­ã¿è¾¼ã‚€äº‹ãŒã§ãã‚‹ã€‚
ã€Œnew Percent(25)ã€ã®éƒ¨åˆ†ã€‚èª­ã¿è¾¼ã‚€å¯¾ç§°ã«å¯¾ã—ã¦å…¨ä½“ã®ä½•ãƒ‘ãƒ¼ã‚»ãƒ³ãƒˆã‚’å‰²ã‚Šå½“ã¦ã‚‹ã‹ã€ã‚’è¨­å®šã§ãã‚‹ã€‚ã“ã“ã§ã¯1ã¤ç›®ã®xmlã‚’èª­ã¿è¾¼ã‚“ã æ™‚ç‚¹ã§å…¨ä½“ã®25%èª­è¾¼å®Œäº†ã¨ãªã‚‹ã€‚
ã€ŒgetXML()ã€ã§xmlã«å¤‰æ›ã—ã¦ã‚„ã‚Štraceæ–‡ã«ã¯Twitterã®æœ€æ–°ã‚¿ã‚¤ãƒˆãƒ«ãŒãã‚Œãžã‚Œè¡¨ç¤º
ã¡ãªã¿ã«ç”»åƒã‚’ã¾ã¨ã‚ã¦èª­ã¿è¾¼ã‚€å ´åˆã¯ã€ŒMediaLoadã€ã‚¯ãƒ©ã‚¹ã‚’ä½¿ã„ã¾ã™ã€‚
*/

import org.casaframework.load.LoadGroup
import org.casaframework.load.base.BytesLoadInterface;
import org.casaframework.load.data.xml.XmlLoad;
import org.casaframework.load.media.MediaLoad;
import org.casaframework.math.Percent;
import org.casaframework.util.XmlUtil;

//-----[xmlã®å–å¾—å…ˆ]
var userXML:XmlLoad = new XmlLoad(&quot;http://twitter.com/statuses/user_timeline/6023282.rss?&quot;+getTimer());
var friendsXML:XmlLoad = new XmlLoad(&quot;http://twitter.com/statuses/friends_timeline/6023282.rss?&quot;+getTimer());
var myLoadGroup = new LoadGroup();

//-----[åˆæœŸåŒ–é–¢æ•°]
init();
function init()
{
//-----[ãƒ­ãƒ¼ãƒ‰ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’è¿½åŠ ]
myLoadGroup.addLoad(userXML, new Percent(25));
myLoadGroup.addLoad(friendsXML, new Percent(75));

//-----[ã‚ªãƒ–ã‚¶ãƒ¼ãƒãƒ¼ã®ç™»éŒ²]
myLoadGroup.addEventObserver(this, LoadGroup.EVENT_LOAD_PERCENT, &quot;onGroupLoadPercent&quot;);
myLoadGroup.addEventObserver(this, LoadGroup.EVENT_LOAD_ERROR, &quot;onGroupLoadError&quot;);
myLoadGroup.addEventObserver(this, LoadGroup.EVENT_LOAD_COMPLETE, &quot;onGroupLoadComplete&quot;);
myLoadGroup.start();
}

//-----[ãƒ­ãƒ¼ãƒ‰ã‚°ãƒ«ãƒ¼ãƒ—ã‚¤ãƒ™ãƒ³ãƒˆãƒãƒ³ãƒ‰ãƒ©ãƒ¼]
function onGroupLoadPercent(sender:LoadGroup, progress:Percent):Void
{
trace(&quot;My group is &quot; + progress.getPercentage() + &quot;% loaded.&quot;);
}

function onGroupLoadError(sender:LoadGroup, failedLoad:BytesLoadInterface):Void
{
myLoadGroup.removeLoad(failedLoad);
myLoadGroup.start();
}

function onGroupLoadComplete():Void
{
trace(&quot;xml complete&quot;);

var userObj:Object = XmlUtil.xmlToObject(userXML.getXml())['rss'][0]['channel'][0]['item'];
var friendsObj:Object = XmlUtil.xmlToObject(friendsXML.getXml())['rss'][0]['channel'][0]['item'];

trace(userObj[1].title[0].nodeValue);
trace(friendsObj[1].title[0].nodeValue);
}</pre>
<p><a href="/out.php?id=5002" rel="nofollow">source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.snippetsmania.com/as2-casa-loadgroup-xml-a%c2%b8eae%e2%80%b9%c2%ace%c2%aa%c2%ada%c2%81%c2%bfe%c2%be%c2%bca%c2%81%c2%bfa%c2%81%c2%a8a%c6%92%e2%80%98a%c6%92%c2%bca%e2%80%9a%c2%bba%c6%92%c2%b3a%c6%92%cb%86e%c2%a1%c2%a8c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS2 BitmapData loadBitmap ãƒ©ã‚¤ãƒ–ãƒ©ãƒªã‹ã‚‰ãƒ“ãƒƒãƒˆãƒžãƒƒãƒ—ã‚’ãƒ€ã‚¤ãƒŠãƒŸãƒƒã‚¯ã«é…ç½®</title>
		<link>http://www.snippetsmania.com/as2-bitmapdata-loadbitmap-a%c6%92%c2%a9a%e2%80%9a%c2%a4a%c6%92%e2%80%93a%c6%92%c2%a9a%c6%92%c2%aaa%c2%81%e2%80%b9a%e2%80%9a%e2%80%b0a%c6%92%e2%80%9ca%c6%92%c6%92a%c6%92%cb%86a%c6%92za%c6%92%c6%92a/</link>
		<comments>http://www.snippetsmania.com/as2-bitmapdata-loadbitmap-a%c6%92%c2%a9a%e2%80%9a%c2%a4a%c6%92%e2%80%93a%c6%92%c2%a9a%c6%92%c2%aaa%c2%81%e2%80%b9a%e2%80%9a%e2%80%b0a%c6%92%e2%80%9ca%c6%92%c6%92a%c6%92%cb%86a%c6%92za%c6%92%c6%92a/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 23:01:00 +0000</pubDate>
		<dc:creator>snippets</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[attach]]></category>
		<category><![CDATA[bit]]></category>
		<category><![CDATA[bitmapData]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[loadBitmap]]></category>
		<category><![CDATA[map]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[textmate]]></category>

		<guid isPermaLink="false">http://www.snippetsmania.com/?p=7840</guid>
		<description><![CDATA[source]]></description>
			<content:encoded><![CDATA[<pre class="qoate-code">/* ã“ã“ã‹ã‚‰ */
/*
ãƒ©ã‚¤ãƒ–ãƒ©ãƒªã«ãƒªãƒ³ã‚±ãƒ¼ã‚¸Penã¨ã„ã†ãƒ“ãƒƒãƒˆãƒžãƒƒãƒ—ãƒ‡ãƒ¼ã‚¿ã‚’ç”¨æ„
*/
import flash.display.BitmapData;
var myBitmapData:BitmapData = BitmapData.loadBitmap(&quot;Pen&quot;);
var _mc:MovieClip = this.createEmptyMovieClip(&quot;mc&quot;, this.getNextHighestDepth());
_mc.attachBitmap(myBitmapData, _mc.getNextHighestDepth());</pre>
<p><a href="/out.php?id=5001" rel="nofollow">source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.snippetsmania.com/as2-bitmapdata-loadbitmap-a%c6%92%c2%a9a%e2%80%9a%c2%a4a%c6%92%e2%80%93a%c6%92%c2%a9a%c6%92%c2%aaa%c2%81%e2%80%b9a%e2%80%9a%e2%80%b0a%c6%92%e2%80%9ca%c6%92%c6%92a%c6%92%cb%86a%c6%92za%c6%92%c6%92a/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

