When using custom typing like var xyz:SpecialItem; and you are inside
a package with the custom typing containing class, you'll get an error, when using autoformat (ctrl-shift-f). "Check Syntax" and compiling give no errors.
Example :
Code:
class com.mcusher.SpecialItem
{
function SpecialItem ()
{
}
}
In my Main class in the same package i try to use it:
Code:
import com.mcusher.SpecialItem;
class com.mcusher.Main
{
private var item:SpecialItem;
function Main ()
{
}
}
Autoformat says: "Syntax error" but there is none. (Syntax check is fine, and compiling as well).
If the import statement is omitted (as both classes are in the same package) or in FlashMX2004 pressing autoformat, the compiler shows the following error:
**Error** D:\Projekte\Weidmueller\testproject\com\mcusher\Sp ecialItem.as: Line 2: The class being compiled, 'com.mcusher.SpecialItem', does not match the class that was imported, 'SpecialItem'.
{
According to our Java ppl, i am doing everything ok...
Is it a flash bug?
It is not about deleting ASO files!
My letters on the F1 key have faded, how are yours today?
Doesn't bother me though as I never write any classes with the Flash interface. Use another editor, Flash is a poor code editor.
www.lexicon-design.co.uk
If we aren't supposed to eat animals, then why are they made of meat?
If Vegetarians like animals so much, why do they eat all their food?
Thanx Lex.
I am currently testing FDT... much more fun programming classes/packages with it...
AS3 will have an Eclipse Plugin as Authoring tool, if i remember correctly..
So i would have to get used to it some time anyways
My letters on the F1 key have faded, how are yours today?
I think it might be just a classpath thing...when I tried autoformatting the Main.as file directly from the zip file you provided, I got the AutoFormat error you descibe - but I also got a syntax error that the SpecialItem class could not be loaded...
Once I moved the files into a directory recognized by Flash as my classpath, I got no errors at all..