Adobe Documentation regarding AS3 Classes
Hello,
At this link from Adobe's own website:
It discusses Constructor Methods. They give this as an example (see below):
class Example
{
public var status:String;
public function Example()
{
status = "initialized";
}
}
var myExample:Example = new Example();
trace(myExample.status); // output: initialized
The question is can this code run as is, or am I supposed to know I am to do the following:
1. Rewrite the class and put it in a package statement and save it as Example.as
2. Create an Fla file and place in it an import statement and the code where the instance is created.
Thanks,
Jim
P.S. If the code can run as is, how do you do that by merely pasting all the code into a FLA file.