Skip to content

Instantly share code, notes, and snippets.

@jasonallen
Created November 8, 2011 01:25
Show Gist options
  • Save jasonallen/1346753 to your computer and use it in GitHub Desktop.
Save jasonallen/1346753 to your computer and use it in GitHub Desktop.
package { // no special packages needed to organize this single file project
[SWF(width="640", height="480", frameRate="60", backgroundColor="#FFFFFF")]
import flash.display.Sprite; // the application is built upon Sprite
import flash.text.TextField; // needed to display the project's text
import flash.display.Stage3D;
public class Main extends Sprite // must match the file's name!
{
// initialize text label
private var ourExampleText:TextField = new TextField();
//[Embed(source="assets/images/background.jpg")]
public function Main() // program execution begins here
{
ourExampleText.text = "Hello Flash Player: "; // + Capabilities.version + "\n";
addChild(ourExampleText); // add text to the application
} // end of ShortExample() function
} // end of Main class definition
} // end of file/program
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment