I've seen this before, but can't clearly understand the root cause. Most likely it is the cross-referencing bytecode compile bug that plagues Flash 8. Deleting ASO files does not work in many cases.

I solve it by using my devilishly simple Compile class, as pointed out in the recent "Flash 8 OSX - Classpath woes" thread. Here again is the class, with usage help in the comments:


// -----------------------------

/**
* Compiler class
*
* This is a simple class to aid in compiling other self-referential classes that stubbornly refuse to compile. This frequently occurs when a class (A) refers to another class (B) which then refers back to the first class (A), giving the following compile error: "The name of this class, 'x', conflicts with the name of another class that was loaded, 'x'". To address this issue, just change the import reference in this class to refer to the problem class, and check syntax on this class.
*
* The logic behind this fix is explained here: http:// ericlin2.tripod.com/as2/conflict.html
*
* @author Stephen Downs <[EMAIL PROTECTED]>
* @version 1.0
* @langversion ActionScript 2.0
* @playerversion Flash 8
*/
// Change this reference to target the stubborn class.
import com.plasticbrain.dir.MyStubbornClass;
//
class com.plasticbrain.tools.Compiler  { }

// -----------------------------




On 2007-05-07, at 10:57 AM, Matt Samet wrote:

Hi,



I have a project I'm working on that contains multiple class files.
Every now and then someone is working on these files who is located in a
different time zone.  They check in their changes, I get them, and all
hell breaks loose with Flash.



It's always the same error:



**Error** C:\Users\Matt\AppData\Local\Macromedia\Flash
8\en\Configuration\Classes\FP8\System\capabilities.as: Line 7: The name of this class, 'System.capabilities', conflicts with the name of another
class that was loaded, 'System'.



... where the actual class name in the error depends on what's being
compiled at the time.



Also, I don't even have to touch anything - go to the main .fla file,
select Delete ASO files, and I get that particular error again (the one
about System.capabilities).  I haven't even modified the
System.capabilities class! (but I use system.capabilities in the code
in various places)

This happens when I try to publish the SWF.



Try to publish it again, and it magically works!  WTF!



I've tried to work around this issue by changing my system date to a few days in the future. This seems to temporarily work, but then sometimes
it gets all weird again.



For a few classes that are being worked on, it's gotten to the point
where I can't even modify the class and see the changes when I reload
the browser without deleting the class's ASO file (at which point, I get
the "conflicts with the name of another class that was loaded" error -
2nd publish attempt works fine).



Anyone know what's going on? Macrodobe, please fix this in CS3 if it's
not already!!!



Thanks,

-=matt

_______________________________________________
[email protected]
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


_______________________________________________
[email protected]
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