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

Flash Text Experiment (2011-1-11)

There isn't much code here yet. But it will be an attempt to explore the many features for text.
Get Adobe Flash player
by easeindesign 12 Jan 2011
    Embed
/**
 * Copyright easeindesign ( http://wonderfl.net/user/easeindesign )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/fRro
 */

package {
    import flash.text.TextFormat;
    import flash.text.TextFormatAlign;
    import flash.text.TextField;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
            var txtFormat:TextFormat = new TextFormat();
            txtFormat.size = 20;
            txtFormat.font = "arial";
            txtFormat.leading = 10;
            txtFormat.letterSpacing = 5;
            txtFormat.align = TextFormatAlign.CENTER;
            
            var txtField:TextField = new TextField();
            txtField.defaultTextFormat = txtFormat;
            txtField.text = "Some text to keep the field company.";
            
            txtField.border = true;
            txtField.wordWrap = true;
            txtField.width = stage.stageWidth/2;
            txtField.appendText("");
            txtField.height = txtField.textHeight+txtFormat.leading;
            
            txtField.x = 50;
            txtField.y = 100;
            txtField.rotationY = 30;
            txtField.rotationX = 20;
            txtField.rotationZ = 15;
            
            addChild(txtField);
        }
    }
}
// stageWidth and stageHeight = 465