< Day Day Up > |
Understanding the Role of Methods in ActionScript 2.0ActionScript has had a very interesting and unique history. It started in Flash 4 as a procedural language with limited syntax and functionality. It is now an object-oriented language that is similar to Java and known as ActionScript 2.0.
ActionScript 2.0 is utilized by both designers and developers and these two audiences have very different needs. For example, when a designer uses a gotoAndPlay method on the main timeline, there is no need to instantiate an object because the main timeline is always instantiated . A developer may also create a user -defined function in ActionScript 2.0 on the main timeline; this is really a method of the main timeline object. As we will see throughout this book, it can be inefficient to attach code to timelines , and in many cases, pure class-based development can make more sense because it makes sense to include methods as parts of classes. |
< Day Day Up > |