Saturday, 29 March 2008

Action Script 2: Hello World

Actionscript tutorial sites:
http://www.actionscript.org/resources/categories/Tutorials/
http://www.kirupa.com/developer/flash/index.htm

//Hello World in Actionscript (Flash MX onwards)
_root.createTextField("mytext",1,100,100,300,100);
mytext.multiline = true;
mytext.wordWrap = true;
mytext.border = false;
myformat = new TextFormat();
myformat.color = 0xff0000;
myformat.bullet = false;
myformat.underline = true;
mytext.text = "Hello World!";
mytext.setTextFormat(myformat);

Interestingly, here is a link to a page for helloworld code in a billion different languages!

http://www.roesler-ac.de/wolfram/hello.htm#Actionscript-FlashMX

No comments: