flash on 2011-7-20
♥0 |
Line 17 |
Modified 2011-07-20 00:43:17 |
MIT License
archived:2017-03-20 15:21:00
ActionScript3 source code
/**
* Copyright kappa-lab ( http://wonderfl.net/user/kappa-lab )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/lVpN
*/
package {
import flash.text.TextField;
import flash.display.Sprite;
import flash.events.*;
public class FlashTest extends Sprite {
public function FlashTest() {
// write as3 code here..
this.graphics.beginFill(0);
this.graphics.drawRect(0,0,400,100);
var tf:TextField = addChild(new TextField()) as TextField
tf.text = "test";
tf.y = 130;
stage.doubleClickEnabled = true;
stage.addEventListener(MouseEvent.CLICK,function():void{tf.text = "CLICK"});
stage.addEventListener(MouseEvent.DOUBLE_CLICK,function():void{tf.text = "DOUBLE_CLICK"});
}
}
}