forked from: flash on 2010-7-6
forked from Hello, XML! (diff: 1)
ActionScript3 source code
/**
* Copyright aasdb ( http://wonderfl.net/user/aasdb )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/z6l5
*/
// forked from funatti's flash on 2010-7-6
package {
import flash.text.TextFormat;
import flash.text.TextField;
import flash.display.Sprite;
public class FlashTest extends Sprite {
public function FlashTest() {
var xml:XML =
<sample>
<message>Hi!</message>
<from>Hello, XML!</from>
</sample>
var t:TextField = new TextField;
var tf:TextFormat = new TextFormat;
t.text = xml.message + "\n" + "A"
t.x = 60;
t.y = 150;
t.width = 400;
t.height = 300;
tf.size = 50;
tf.italic = true;
t.setTextFormat(tf);
addChild(t);
}
}
}
