Hello world
初めての投稿なのでまずはHello worldから。
「d」を付け足せばHello worldの完成です。
♥0 |
Line 26 |
Modified 2011-04-10 23:11:51 |
MIT License
archived:2017-03-20 00:46:28
ActionScript3 source code
/**
* Copyright 0rafu0 ( http://wonderfl.net/user/0rafu0 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/rOAE
*/
//何がしたかったのかは自分でも謎
package {
import flash.events.Event;
import flash.text.*;
import flash.display.Sprite;
public class FlashTest extends Sprite {
var txt:TextField = new TextField();
public function FlashTest() {
txt.text ="Hello Worl"
txt.type = TextFieldType.INPUT;
txt.width = 400;
txt.height = 600;
txt.wordWrap = true;
txt.multiline = true;
addChild(txt);
txt.addEventListener(Event.CHANGE,plusText);
}
function plusText(e:Event):void{
txt.appendText(" Hello world");
addEventListener(Event.ENTER_FRAME,plusText);
if (txt.numLines == 30) {
txt.text = "Hello world!!";
removeEventListener(Event.ENTER_FRAME,plusText);
}
}
}
}