flash on 2010-10-28
♥0 |
Line 41 |
Modified 2010-10-28 17:04:29 |
MIT License
archived:2017-03-20 05:36:25
ActionScript3 source code
/**
* Copyright enecre ( http://wonderfl.net/user/enecre )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/amEf
*/
package {
import flash.text.TextField;
import flash.display.Sprite;
import flash.utils.*;
public class FlashTest extends Sprite {
private var tf:TextField = new TextField();
public function FlashTest() {
// write as3 code here..
tf.width = tf.height = 465;
addChild(tf);
var hoge:Int = new Int(11);
var vec1:Vector.<Int> = Vector.<Int>([new Int(1), new Int(2)]);
var vec2:Vector.<Int> = Vector.<Int>([new Int(1), new Int(2)]);
var vec3:Vector.<Int> = Vector.<Int>([new Int(5),new Int(6),hoge]);
var a:int = getTimer();
vec1 = vec1.concat(vec3);
tr(vec1);
tr(getTimer() - a + "ms");
tr("///");
hoge.num = '50';
//hoge = new Int(50);
tr(vec1);
tr("///");
try{
vec2.push(vec3);
}catch(e){tr(e);}
tr(vec2);
}
private function tr(...o):void{
tf.appendText(o + "\n");
tf.scrollV = tf.maxScrollV;
}
}
}
class Int {
public var num:String;
public function Int(n:int){
num = String(n);
}
public function toString():String{
return num;
}
}