flash on 2010-5-13

by kappaLab
♥0 | Line 1 | Modified 2010-05-13 00:37:39 | MIT License
play

ActionScript3 source code

/**
 * Copyright kappaLab ( http://wonderfl.net/user/kappaLab )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/8MYD
 */

import flashx.textLayout.elements.*;import flashx.textLayout.container.ContainerController;import flashx.textLayout.edit.EditManagerimport flash.display.Sprite;var tfw:TextFlow = new TextFlow();tfw.interactionManager = new EditManager();tfw.fontSize = 18;var p:ParagraphElement = new ParagraphElement();tfw.addChild(p)var span:SpanElement = new SpanElement()span.text = "hello world TLF";p.addChild(span)var sp:Sprite = addChild(new Sprite) as Spritesp.x = 10sp.y = 10;tfw.flowComposer.addController(new ContainerController(sp,200,20))tfw.flowComposer.updateAllControllers();import flash.text.TextField;import flash.text.TextFormat;import flash.text.TextFieldType;var tf:TextField = addChild(new TextField) as TextField;tf.defaultTextFormat = new TextFormat(null,18)tf.type = TextFieldType.INPUT;tf.text= "hello world TextField"tf.width = 200tf.x = 10tf.y = 40;import fl.text.TLFTextField;var tlf:TLFTextField = addChild(new TLFTextField) as TLFTextField;tlf.textFlow.fontSize = 18tlf.type = TextFieldType.INPUT;tlf.text= "hello world TLFTextField"tlf.width = 200tlf.x = 10tlf.y = 80;

Forked