The first thing you should have is either a Macromedia Director or a Macromedia Flash application. Such tools are programs used to develop Flash animations and Flash sites using the Flash programming language. The demonstration versions of Macromedia Director and Macromedia Flash applications, intended for evaluation purposes, are readily
available for download from the Macromedia website.
In creating a simple object, you must use the command MM-New in the Flash tools you have, be it either Macromedia Director or Macromedia Flash. This command would call on a set of codes known as a constructor. The constructor is a
code set which creates, based on the class template, an instance of the object. Fundamentally, these set of codes draw a reference to the object before allocating memory for it. Finally, it initializes the object. The constructor is not limited to these functions - it could do anything you want it to.
So, you could think of the constructor as the set of codes which created the instance of the object. You should also know that the
class script is a special purpose function in Action Scripts. On the other hand, class is a parent script for Lingo objects. With this, the sample code below is a good example of simple classes for a Lingo object:
<! - sample code - !>
Macromedia Director Lingo Object Class and Constructor
on new(me)
return (me)
end
<! - end sample - !>