3 Replies Latest reply on May 31, 2010 12:08 AM by kglad Branched to a new discussion.

    Import of custom class doesn't seem to work...

    imanoutkast

      OK, I have my custom class defined in a file called "rootInstace.as". This is what it contains:

       

      package

      {

      import flash.display.MovieClip;

      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:

       

      import rootStuff.*;

      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?!