I've been searching all over for the proper way to create classes and objects in Flash. Most of what I've found is inconsistant and for Flash 5, so I'm just curious if this has gotten any cleaner in MX.

I'm mostly familiar with PHP OOP, so I guess I'll use that as an example.

Here's a simple class and a class exntension in PHP

class Vegetable {
var $edible;

function is_edible() {
return $this->edible;
}
}

class Spinach extends Vegetable {
var $cooked = false;

function cook_it() {
$this->cooked = true;
}

function is_cooked() {
return $this->cooked;
}
}

I'd love to know the proper way to go about creating this in Flash. Should I say Vegetable = new Object(); and then do stuff like Object.addProperty? Or I've seen people creating objects by using a basic function definition. And then extending a class, do I use the .prototype to do that?

Any help would be appreciated, or some pointers to online references about this.