乱数のテスト
♥0 |
Line 21 |
Modified 2011-11-14 19:48:10 |
MIT License
archived:2017-03-20 08:57:07
ActionScript3 source code
/**
* Copyright gaziya ( http://wonderfl.net/user/gaziya )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/gRYA
*/
package {
import flash.utils.setInterval
import flash.text.TextField
import flash.display.Sprite
public class FlashTest extends Sprite {
public function FlashTest() {
x = stage.stageWidth/2
y = stage.stageHeight/2
var text:TextField = addChild(new TextField) as TextField
var num:int
text.autoSize = "left"
text.textColor = 0x0
setInterval(function():void {
num = Math.random()*0x100*0.3
num = Math.random()*0x100 << 16 | Math.random()*0x100 << 8 | Math.random()*0x100
num = Math.random()*3 <<16
text.htmlText = "<font size='+20'>"+num+"</font>"
},500)
}
}
}