You can make GlobalColors a class and import it instead.

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of lhy90936
Sent: Monday, September 03, 2007 3:09 AM
To: [email protected]
Subject: [flexcoders] Global include file



Hi,

I've created a global include file which contains some const definition:

"GlobalColors.as"
public static const RED:Number = 0xff0000;
public static const ORANGE:Number = 0xFFA500;
......

When I tried to include the file into another class:
"myRenderer.as"
package myClass.renderer
{
include "../global/GlobalColor.as";

public class myRenderer extends Text
{
......
}

}

I get the following error during compilation:
A file found in a source-path can not have more than one externally 
visible definition. 
myClass.renderer:RED; myClass.renderer:ORANGE; ...... 
myClass.renderer:myRenderer 

Can anyone point out where is the problem?
Am I including the .as file wrongly?

Thank you.



 

Reply via email to