1 Reply Latest reply on Oct 16, 2010 9:23 PM by Radhakrishna Bhat

    Import user defined actionscript classes in mxml

    poojagupta Level 1

      Hi,

       

      I have an mxml file -- A.mxml

      I have an actionscript file asfile.as  This file has a class definition. Package name - 'MyPackage' Class name - 'asfile'

       

      I want to import this class into A.mxml

       

      So, I write "import MyPackage.asfile.*;" in the Script block of A.mxml. Please note that both A.mxml and asfile.as are part of the same FlashBuilder project and  are present at the same level (i.e. inside the same folder) in Package Explorer.

       

      I get a compiler error "A file found in a source-path must have the same package structure '', as the definition's package, 'MyPackage'."

       

      Please help me solve this issue.

       

      Regards,

      Pooja