MarionC
03-05-2008, 08:07 PM
Hello all,
I am very puzzled why I am receiving this error. I wanted to experiment with the document class and created just the bare minimum (to test compiling) and received the error:
5006: An Actionscript file can not have more than one externally visible definition: Main, startPlay
I don't have multiple classes defined and Main has been defined as a document class from the property inspector menu.
My code as follows:
myMain.fla:
startPlay();
Main.as file:
package {
import flash.display.MovieClip;
public class Main extends MovieCip{
public function startPlay(){
trace ("started it");
}
}
}
I don't see how I have multiple external definitions. :x I only have one class defined. It seems like the document class cannot have any functions within it with this error and that seems wrong somehow. What am I missing?
Any help is appreciated.
-m
I am very puzzled why I am receiving this error. I wanted to experiment with the document class and created just the bare minimum (to test compiling) and received the error:
5006: An Actionscript file can not have more than one externally visible definition: Main, startPlay
I don't have multiple classes defined and Main has been defined as a document class from the property inspector menu.
My code as follows:
myMain.fla:
startPlay();
Main.as file:
package {
import flash.display.MovieClip;
public class Main extends MovieCip{
public function startPlay(){
trace ("started it");
}
}
}
I don't see how I have multiple external definitions. :x I only have one class defined. It seems like the document class cannot have any functions within it with this error and that seems wrong somehow. What am I missing?
Any help is appreciated.
-m