forked from: flash on 2009-11-11
forked from flash on 2009-11-11 (diff: 25)
ActionScript3 source code
/**
* Copyright hacker_nmyze_52 ( http://wonderfl.net/user/hacker_nmyze_52 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/9FeG
*/
package {
import flash.display.Sprite;
public class DisplayObjectExample extends Sprite {
public function DisplayObjectExample() {
import flash.text.TextField;
var tf1:TextField = new TextField();
tf1.text = "Text Field 1";
tf1.border = true;
tf1.wordWrap = true;
tf1.width = 40;
tf1.height = tf1.textHeight + 5;
addChild(tf1);
var tf2:TextField = new TextField();
tf2.text = "Text Field 2";
tf2.border = true;
tf2.wordWrap = true;
tf2.width = 40;
tf2.height = tf2.textHeight + 5;
tf2.y = tf1.y + tf1.height + 5;
addChild(tf2);
}
}
}
