ナベアツ
♥0 |
Line 17 |
Modified 2010-04-07 11:45:38 |
GPLv3 License
archived:2017-03-20 07:40:34
ActionScript3 source code
/**
* Copyright pasodania ( http://wonderfl.net/user/pasodania )
* GNU General Public License, v3 ( http://www.gnu.org/licenses/quick-guide-gplv3.html )
* Downloaded from: http://wonderfl.net/c/d2ui
*/
package {
import flash.display.Sprite;
import flash.text.TextField;
public class FlashTest extends Sprite {
public function FlashTest() {
var txt:TextField = addChild(new TextField()) as TextField;
txt.autoSize = "left";
for(var i:int = 1; i <= 100; i++) txt.appendText(i + ":" + ["(-_-)","(^o^)","(^q^)" ][nabeatu(i)] + (i%10 == 0 ? "\n" : ""));
}
private function nabeatu(num:int):int{
var type:int = 0;
if( num.toString().indexOf("3") != -1 ){type = 1;}
else if( num%3 == 0 || num%5 == 0 ){type = 2;}
return type;
}
}
}