Posts Tagged ‘tutorials’

Beginning ActionScript 3.0 –Summary of OOP

Myspace-256x256 Ok, we have finished our small discussion about the big topic, OOP. Our discussion here is just want to give you some basic ideas about OOP. For more details you need to read some other books.

Let’s do some reviews.

(more…)

Beginning ActionScript 3.0 – Interface

Bear-User-256x256 So, when you fill the blank, eh, which we discuss in the polymorphism, the concrete instance should be a Person, a Cook, an Author or a Driver. Have you ever think that what if the concrete class can’t be Person? That is the concrete class should be the subclasses, not the super one.

(more…)

Beginning ActionScript 3.0 – Polymorphism

Sun-128x128 When we discussion the overload, we said it can provide a uniform interface for the user to use the function without consider the exactly type of the parameters.

(more…)

Beginning ActionScript 3.0 – Override&Overload

Admistrative-256x256 In the discussion of set and get accessor methods, I said, I left one advantage of using the set and get accessor methods to this post. Of course, I’ll show you. But, I won’t show you the answer directly. You know, show you the answer directly won’t impress you, so, let’s see some code first, :)

(more…)

Beginning ActionScript 3.0 – super, this, setter/getter

Connect-256x256 In the last part of Constructor(@see Beginning ActionScript 3.0 – Constructor), we do a simple experiment. And the experiment shows that the constructor of the superclass will also be inherited to the subclass. If you don’t call the superclass’s constructor in the subclass’s constructor, then the compile will add some code to the subclass’s constructor automatically.

(more…)

Beginning ActionScript 3.0 – Constructor

Help-and-support-256x256 When we introduce the basic OOP concepts, we use an example to illustrate the OOP-style code(@see Beginning ActionScript 3.0 – Introduction to OOP). Inside the example, we use the new operator. Did you still remember the function of “new” operator?

(more…)

Beginning ActionScript 3.0 – Attributes 2

Help-File-256x256 If you don’t use the keyword “private” to modify the properties, then you can use the properties in the subclass in most cases. That’s the conclusion we ade in last section. Now, we’re going to talk about the exception situation.

(more…)

Beginning ActionScript 3.0 – Attributes 1

Blue-04-256x256 From previou post Beginning ActionScript 3.0 – Inheritance, we have know that a key advantage of inheritance is that it allows you to reuse code from a base class yet leave the existing code unmodified. For example, you can build a new subclass Cook to extend from the class Person, and then the class Cook can have the method “haveBreakfast” automatically.

(more…)