ActionScript 3.0 Design Patterns
340 | Chapter 9: Template Method Pattern tions in the main algorithm that you want to be detailed by the subclasses, you leave a ...
Employing Flexibility in the Template Method | 341 Employing Flexibility in the Template Method Now that you have a better idea ...
342 | Chapter 9: Template Method Pattern Example 9-4. ShedMaker.as package { //Abstract Class class ShedMaker { public final fun ...
Employing Flexibility in the Template Method | 343 In both concrete classes, atrace( )statement indicates which class is instant ...
344 | Chapter 9: Template Method Pattern Both instances employ thetemplateMethod( )function, but as you will see when you test t ...
Selecting and Playing Sound and Video | 345 ActionScript file, copy the contents of Example 9-8, and save it using the caption n ...
346 | Chapter 9: Template Method Pattern Not-So-Concrete Concrete Classes The next step is to add a couple of concrete classes f ...
Selecting and Playing Sound and Video | 347 The process of actually playing a video or sound file has been farmed out to classes ...
348 | Chapter 9: Template Method Pattern addChild(vidNow); ns.addEventListener(NetStatusEvent.NET_STATUS, stopClear); //MetaData ...
Selecting and Playing Sound and Video | 349 In setting up the video play, not only did we create a play trigger, we also added f ...
350 | Chapter 9: Template Method Pattern Most of the work in this application has been done with ActionScript, but a Flash doc- ...
Hooking It Up | 351 Hooking It Up Controlling subclass extensions is one use for the Template Method. In discussing applicabilit ...
352 | Chapter 9: Template Method Pattern When to Hook? The hook’s useful when only part of your algorithm needs to have detailed ...
Hooking It Up | 353 new ActionScript files, and enter the code for Examples 9-14 to 9-17, saving them as the caption name. The h ...
354 | Chapter 9: Template Method Pattern Because both thecheckAirplane( )andfileVFR( )operations are abstract functions (in inte ...
Hooking It Up | 355 In Example 9-16, thefileVFR( )function shows code that has been overridden, and it contains the exact same c ...
356 | Chapter 9: Template Method Pattern Open a new Flash document, and typeTestFlightinto the document class window. You should ...
357 Chapter 10 CHAPTER 10 State Pattern 10 A State without the means of some change is without the means of its conservation. —E ...
358 | Chapter 10: State Pattern One application where the state pattern’s popular is device simulation. Devices that change an o ...
Design Pattern to Create a State Machine | 359 Running and Application-Not-Running states, or we could place the whole hierar- c ...
«
14
15
16
17
18
19
20
21
22
23
»
Free download pdf