3 Replies Latest reply on Oct 1, 2007 12:20 PM by kglad

    Using my Custom Package?

    Level 7
      Hi --

      I have created some code in Flash CS3 using AS 3.0 to create form elements
      dynamically but now I am having trouble accessing the package I have created
      from another Flash movie.

      My package setup is like this...

      package formbuilder
      public class forms

      public function createCheckBox() {



      The AS file is saved as FormElements.as

      and I am attempting to call the package like this

      import FormElements

      This seems to work as the IDE had me make some small changes to the code
      when I first tested my movie.

      However, once I have added this code:

      var useForm:forms = new forms()

      I get an error, "1046: Type was not found or was not a compile-time
      constant: forms."

      I am not sure if I need to have my package name and my file name the same?
      Do I need to change my import statement? Do I need to change my call? Do I
      need to add a constructor to the package?

      Please help!!