![]() ![]() | |
Class members propagate to subclasses of the superclass that defines those members. In the previous example (see Using class members: a simple example), you used a class property to keep track of the number of instances of that class you created. You could create a subclass of the Widget class, as shown below.
class SubWidget extends Widget {
function SubWidget() {
trace("Creating subwidget # "+Widget.widgetCount);
}
}
![]() ![]() | |