/* No, don't copy this, it's just a shell. But it's a handy way to discuss code, don't you think? */ // example package shell package { import flash.display.Sprite; // or other imports as needed public class ExampleApplication extends Sprite // ExampleAplication matches name of the .as file // we also might not extend an existing class. If tha // we would delete the extends part. Just because we // import (use) a class, doesn't mean we are extending it // it depends on if we are adding to the functionality. { // Here we have the constructor that is run when // an instance is created. public function ExampleApplication ():void { private var _somePrivateNumber:Number = new Number(); // we use private variables to hold information that // isn't needed outside of the class. The underscore // is traditional. // blah code goes here. } private function SomeFunctionCalledInPackage():void { // blah } } } // ActionScript 3.0 Cookbook, by Joey Lott, et al; O'Reilly