flash on 2011-8-24
♥0 |
Line 16 |
Modified 2011-08-24 13:56:37 |
MIT License
archived:2017-03-20 07:30:37
ActionScript3 source code
/**
* Copyright momolab ( http://wonderfl.net/user/momolab )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/2TTw
*/
package {
import flash.display.Sprite;
import flash.text.engine.*;
public class FTEBasicSample extends Sprite {
public function FTEBasicSample() {
var elementFormat:ElementFormat = new ElementFormat();
var textElement:TextElement = new TextElement("Hello Flash", elementFormat);
var textBlock:TextBlock = new TextBlock();
textBlock.content = textElement;
var textLine:TextLine = null;
while(textLine = textBlock.createTextLine(textLine)) {
addChild(textLine);
}
}
}
}