package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
var example:Example = new Example( );
trace(example.getId( )); // Displays: Example Class
}
}
}
class Example {
private var _id:String;
public function Example( ) {
_id = "Example Class";
}
public function getId( ):String {
return _id;
}
}
|