Thursday, August 4, 2011

Notes from the Reading

Classes collect related functions (methods), variables (properties), and other relevant items.

Document Class
allows you to create a custom class that can be used as a type of timeline

1:  package {  
2:  import flash.display.MovieClip;  
3:  public class Main extends MovieClip {  
4:  public function Main() {  
5:  trace("Flash");  
6:  }  
7:  }  
8:  }  

To use a class in a
specific subdirectory, you need to import the class, including the classpath
import flash.display.MovieClip;
import myapp.effects.Water;

package myapp.effects {
public class Water {
public function Water() {


Composition says that an object can be composed of other objects, rather
than descend from other objects.

No comments:

Post a Comment