OK, I have my custom class defined in a file called "rootInstace.as". This is what it contains:
public class CRoot extends MovieClip
public static var _root:MovieClip;
public function CRoot ()
_root = this;
this file is located at C:\Flash_Files\rootStuff\.
I have this directory included in my Flash Edit\Preferences\ActionScript 3.0 Languages\Source Path for Source files. The path I gave it was C:\Flash_Files\
when I try to use the CRoot class in the first frame of my main .fla like this:
var rt:CRoot = new CRoot();
, it throws errors:
1046: Type was not found or was not a compile-time constant: CRoot.
1180: Call to a possibly undefined method CRoot.
what, I ask you, am I doing wrong?!
the name of the file must match the class name. ie, save that file as CRoot.as
Thank you. I also had to add a package name to reflect its location, but that was simple as well and I managed to figure it out.