TestBase
♥0 |
Line 28 |
Modified 2010-02-24 02:01:51 |
MIT License
archived:2017-03-20 15:46:02
ActionScript3 source code
/**
* Copyright toburau ( http://wonderfl.net/user/toburau )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/iQ0W
*/
package {
import flash.display.Sprite;
import flash.events.Event;
import flash.text.TextField;
[SWF(frameRate="30", width="465", height="465")]
public class Test extends Sprite {
public function Test() {
// 毎フレームのイベントハンドラを登録
addEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
private var TextY:int = 0;
public function Print(str:String):void {
var tf:TextField = new TextField;
tf.text = str;
tf.y = TextY;
TextY += 12;
addChild(tf);
}
public function PrintXY(x:int,y:int,str:String):void {
var tf:TextField = new TextField;
tf.text = str;
tf.x = x;
tf.y = y;
addChild(tf);
}
// フレーム毎に行われる処理
private function enterFrameHandler(e:Event):void {
}
}
}