A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Dont know where to put class to be imported...

  1. #1
    flashguy
    Join Date
    May 2005
    Location
    In the mountains
    Posts
    341

    Dont know where to put class to be imported...

    I have received a partially done project in CS4/AS3 and my client sent to me a FLA and an AS file.

    The AS file is a class that starts like this:

    Code:
    package ascb.util {
    
      public class NumberUtilities {
    And at the FLA, there is the import clause like this:

    Code:
    import ascb.util.NumberUtilities;
    I have tried to put the class in several different places within the Flash CS4 install folder, but when I try to compile the application I always get the very same error:

    5001: The name of package 'ascb.util' does not reflect the location of this file. Please change the package definition's name inside this file, or move the file. C:\Documents and Settings\Drika\Desktop\TRABALHO\www\hooda\Number Eaters\NumberUtilities.as

    Any advice welcome!
    Last edited by yanmoura; 01-02-2010 at 05:01 PM.
    Visit my business at http://www.ballooncreator.com - Software Tool For Party Balloons Online Design!

  2. #2
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    The class needs to be relative to your fla, following the name of the package declaration:

    PHP Code:
    projectFolder/project.fla
    projectFolder
    /ascb/util/NumberUtilities.as 
    Please use [php] or [code] tags, and mark your threads resolved 8)

  3. #3
    flashguy
    Join Date
    May 2005
    Location
    In the mountains
    Posts
    341
    That's weird. I have done that but it still doesnt work...

    Visit my business at http://www.ballooncreator.com - Software Tool For Party Balloons Online Design!

  4. #4
    flashguy
    Join Date
    May 2005
    Location
    In the mountains
    Posts
    341
    Thank you very much! It was simpler than I supposed and than what I was trying!
    Visit my business at http://www.ballooncreator.com - Software Tool For Party Balloons Online Design!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center