flash on 2010-11-2
♥0 |
Line 26 |
Modified 2010-11-02 14:37:25 |
MIT License
archived:2017-03-20 05:36:15
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/li0a
*/
package {
import flash.text.TextField;
import flash.display.Sprite;
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:* = test(0);
if(hoge is int)tr("intです");
else if(hoge is Object){
if(hoge.type == (5 || 7))tr("許す");
else tr("donmai");
}
else tr("Error");
}
private function test(arg:int):*{
if(arg == 0)return {"type": 7};
else return 4;
}
private function tr(...o:Array):void{
tf.appendText(o + "\n");
tf.scrollV = tf.maxScrollV;
}
}
}