In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

forked from: TextFieldのアルフィー

// forked from hirossy's TextFieldのアルフィー
// write as3 code here..
package {
    import flash.display.BlendMode;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.text.TextField;
    import flash.text.TextFormat;
    import caurina.transitions.Tweener;

    public class Test extends Sprite
    {
        private var _textField:TextField;

        public function Test()
        {
            // これしないとアルファかかんねえ
            blendMode = BlendMode.LAYER;

            var format:TextFormat = new TextFormat();
            format.size = 30;
            _textField = new TextField();
            _textField.defaultTextFormat = format;
            _textField.x = 10;
            _textField.y = 10;
            _textField.width = 400;
            _textField.text = "TextFieldのアルファ指定";
            addChild(_textField);

            _hide();
        }
        
        private function _show():void
        {
            Tweener.addTween(_textField,{alpha:1,time:.2,onComplete:_hide});
        }
        private function _hide():void
        {
            Tweener.addTween(_textField,{alpha:0,time:.2,onComplete:_show});
        }
    }
}