Document Class
allows you to create a custom class that can be used as a type of timeline
replacement
1: package {
2: import flash.display.MovieClip;
3: public class Main extends MovieClip {
4: public function Main() {
5: trace("Flash");
6: }
7: }
8: }
Classpaths
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;
import flash.events.*;
import myapp.effects.Water;
import flash.events.*;
package myapp.effects {
public class Water {
public function Water() {
}
}
}
public class Water {
public function Water() {
}
}
}
Composition
aggregation
Composition says that an object can be composed of other objects, rather
than descend from other objects.
No comments:
Post a Comment