ActionScript 3.0 Design Patterns
20 | Chapter 1: Object-Oriented Programming, Design Patterns, and ActionScript 3.0 Wait! There’s more! Later in this chapter you ...
Encapsulation | 21 Example 1-9. EncapSet.as package { //This is BETTER OOP -- It's got encapsulation //plus a decent interface f ...
22 | Chapter 1: Object-Oriented Programming, Design Patterns, and ActionScript 3.0 As you can see in Example 1-9, the setter met ...
Encapsulation | 23 Example 1-11 and Example 1-12 show how you can lock up your encapsulated objects using getters and setters wi ...
24 | Chapter 1: Object-Oriented Programming, Design Patterns, and ActionScript 3.0 Using Encapsulation and Design Patterns This ...
Inheritance | 25 class inherits everything in theSpriteclass, the application should still work. As you will see, it works just ...
26 | Chapter 1: Object-Oriented Programming, Design Patterns, and ActionScript 3.0 Any class that uses theextendsstatement to de ...
Inheritance | 27 In addition to invoking themakeSound( )method, theDogandCatinstances invoke their own methods,bark( ) andmeow( ...
28 | Chapter 1: Object-Oriented Programming, Design Patterns, and ActionScript 3.0 Using Interfaces and Abstract Classes in Acti ...
Inheritance | 29 Looking at Example 1-19 and theBongoclass, at first you may think that the method is built incorrectly. It’s wh ...
30 | Chapter 1: Object-Oriented Programming, Design Patterns, and ActionScript 3.0 interface. You’ll need an MP3 file namedbongo ...
Inheritance | 31 Abstract classes and overriding inheritance As you become familiar with design patterns, you’ll see more and mo ...
32 | Chapter 1: Object-Oriented Programming, Design Patterns, and ActionScript 3.0 When the application finally implements the m ...
Inheritance | 33 Why use interfaces and abstract classes? To understand why to use interfaces and abstract classes, we need to c ...
34 | Chapter 1: Object-Oriented Programming, Design Patterns, and ActionScript 3.0 All the changes are revealed in the line, doD ...
Polymorphism | 35 class with a method set up to show a person’s musical tastes, and then build your application using that metho ...
36 | Chapter 1: Object-Oriented Programming, Design Patterns, and ActionScript 3.0 When you test the program, you’ll see the fol ...
Polymorphism | 37 instantiated using the subclasses, and each launched the same method,myMusic( ). However, with each usage, eve ...
38 | Chapter 1: Object-Oriented Programming, Design Patterns, and ActionScript 3.0 Example 1-33 introduces something new. ThePla ...
Polymorphism | 39 In comparing Example 1-33 with Example 1-34, both theproductDescribe( )and productPrice( )methods look pretty ...
«
1
2
3
4
5
6
7
8
9
10
»
Free download pdf