Hello-world in Flash/Flex
Aug. 3rd, 2006 | 03:19 am
It's a popular misconception that writing applications for the Flash platform is extremely difficult and requires one to use an IDE and be intimately familiar with timeline-based development.
In reality, you can write the most feature-rich Flash applications with just a text editor and a command-line compiler.
Here's what a simple hello-world application looks like in plain Flash (version 9):
package {
import flash.display.Sprite;
import flash.text.TextField;
public class HelloWorld extends Sprite {
public function HelloWorld() {
var textField:TextField = new TextField();
textField.text = "Hello, world!";
addChild(textField);
trace("Hello, world!");
}
}
}
( Compile it... )