forked from: flash on 2012-1-14
♥0 |
Line 26 |
Modified 2012-01-15 01:28:59 |
MIT License
archived:2017-03-20 01:19:10
ActionScript3 source code
/**
* Copyright koshitarou ( http://wonderfl.net/user/koshitarou )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/5E9h
*/
// forked from ting_layhort's flash on 2012-1-14
package {
import flash.text.TextFormat;
import flash.text.TextField;
import flash.display.Sprite;
import caurina.transitions.Tweener;
public class FlashTest extends Sprite {
public function FlashTest() {
// write as3 code here..
var tf:TextField=new TextField;
var sth:int=stage.stageHeight;
var stw:int=stage.stageWidth;
tf.text="Hello world!!";
addChild(tf);
tf.width=stw;
tf.x=stw;
tf.y=(sth-tf.height)/2;
tf.selectable=false;
//テキストのフォーマットの設定
var fmt:TextFormat=new TextFormat();
fmt.size=80;//フォントサイズ
fmt.color=0xff0000;//色
fmt.align="center";
tf.setTextFormat(fmt);
Tweener.addTween(tf, {x:0,delay:1,time:1,transition:"easeOutBack"});
Tweener.addTween(tf, {x:-stw,delay:5,time:1,transition:"easeOutBack"});
}
}
}