flash on 2010-5-17
♥0 |
Line 25 |
Modified 2010-05-17 21:09:29 |
MIT License
archived:2017-03-30 10:08:00
ActionScript3 source code
/**
* Copyright 9re ( http://wonderfl.net/user/9re )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/cwp9
*/
package {
import flash.display.Sprite;
import flash.utils.getTimer;
import flash.text.TextField;
public class FlashTest extends Sprite {
public function FlashTest() {
// write as3 code here..
var tf:TextField = new TextField;
addChild(tf);
var count:int = 1 << 18;
trace(<>for : {count} times</>);
var i:int = 0;
var t:int = getTimer();
while (i++ < count) {
//callTimer();
getTimer();
}
trace(getTimer() - t, ' ms');
function callTimer():void {
getTimer();
}
function trace(...args):void {
tf.appendText(args + '\n');
}
}
}
}