Sorry, Willem - you must still have something set up incorrectly.

Without seeing your project files, I can't help further.

To recap:
- The class path should be set to the folder _above_ 'nl'
- The package definition should read 'package nl.geografiek.utilities {'
- The class definition (inside the package definition) should read 'class
FormatDecimalen {'
- The import should be 'import nl.geografiek.utilities.FormatDecimalen;'

If all those are correct, it should work - check for spelling and
capitalisation errors, too.

Cheers,
   Ian

On 8/15/07, Geografiek <[EMAIL PROTECTED]> wrote:
>
> Thanks again Ian,
> This works (but....)
> I removed all class paths but the path to the native flash classes
> and the path to my own classes (i.e. the parent of 'nl')
> This removed the 5001 error.
> instead I get another error:
> '1046: Type was not found or was not a compile-time constant:
> FormatDecimalen.'
>
> (my fla contains
> import nl.geografiek.utilities.FormatDecimalen;
> var mijnFormat:FormatDecimalen = new FormatDecimalen();)
>
> I can get rid of it only if I add the class path to the parent of
> the .as file ('utilities'), but this introduces the 5001 error again.
> Willem
>
> Op 15-aug-2007, om 15:06 heeft Ian Thomas het volgende geschreven:
>
> > Hi Willem,
> >    Your class path shouldn't point to the folder that the class is
> > in - only
> > to the parent folder of 'nl'.
> >
> > HTH,
> >    Ian
> >
> > On 8/15/07, Geografiek <[EMAIL PROTECTED]> wrote:
> >>
> >> Hi Ian,
> >> Thanks for your quick response.
> >> This is AS3 actually.
> >> Class paths point to both the folder the class file is in and the
> >> 'parentfolder' of 'nl': 'myProjects'
> >> The package definition reads: 'package nl.geografiek.utilities {'
> >> (I get the same error when I change this to 'package utilities {'
> >> btw)
> >> But still no luck.
> >> Willem
> >>
> >> Op 15-aug-2007, om 14:28 heeft Ian Thomas het volgende geschreven:
> >>
> >>> Make the .fla classpath point to: 'myHD/myProjects'
> >>>
> >>> f you're using AS2, in your FormatDecimalen.as file change the line:
> >>>   class FormatDecimalen {
> >>> to read:
> >>>   class nl.geografiek.utilities.FormatDecimalen {
> >>>
> >>> If you're using AS3, in your FormatDecimalen.as file change the
> >>> line:
> >>>   package {
> >>> to read:
> >>>   package nl.geografiek.utilities {
> >>>
> >>> Hope that's helpful,
> >>>    Ian
> >>>
> >>> On 8/15/07, Geografiek <[EMAIL PROTECTED]> wrote:
> >>>>
> >>>> Hi list,
> >>>> I have al class named 'FormatDecimalen' in a file named
> >>>> 'FormatDecimalen.as'
> >>>> The class is wrapped in an unnamed package. All is well when i call
> >>>> the class from a .fla-file.
> >>>> The .fla is in another location on my HD and points to the class
> >>>> path
> >>>> 'myHD/myProjects/nl/geografiek/utilities'
> >>>>
> >>>> Now I want to name the package containing 'FormatDecimalen' to
> >>>> 'nl.geografiek.utilities'.
> >>>> My file structure is as follows:
> >>>> myHD
> >>>> |_ myProjects
> >>>>         |_ nl
> >>>>                 |_ geografiek
> >>>>                         |_ utilities
> >>>>                                 |_ FormatDecimalen.as
> >>>>
> >>>>
> >>>> When I wrap the class in a named package it breaks. When I compile
> >>>> the .fla get an error:
> >>>> "5001:
> >>>> The name of package 'nl.geografiek.utilities' does not reflect the
> >>>> location of this file.
> >>>> Please change the package definition's name inside this file, or
> >>>> move
> >>>> the file.
> >>>> /Volumes/myHD/ myProjects/nl/geografiek/utilities/
> >>>> FormatDecimalen.as"
> >>>>
> >>>> What am I doing wrong?
> >>>> thanks,
> >>>> Willem van den Goorbergh
> >>>>
>
>
>
> =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
> Geografiek is een in Utrecht gevestigd kartografisch bureau
> Willem van den Goorbergh is telefonisch bereikbaar onder nummer
> 030-2719512
> of mobiel: 06-26372378
> Faxen kun je sturen naar: 030-2719687
> postadres: Hooghiemstraplein 89 3514 AX UTRECHT
> Bezoek onze website op: http://www.geografiek.nl
> =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
>
>
>
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to