我的 .as 类似乎没有很好地链接,因为我收到以下错误
A file found in a source-path must have the same package structure '', as the definition's package, 'MyPlayerd'. MyPlayerd.as /MyApp/src Unknown Flex Problem
这是我的类文件
package MyPlayerd
{
public class MyPlayerd
{
public static var spelerID:String = new String();
private static var _voornaam:String = new String();
public static var famnaam:String = "";
public static var land:String = "";
public static var gebdatum:Date;
public static var speeltsinds:Date;
public static var gewicht:int = new int();
public static var win:int=0;
private static var _loss:int=0;
public function MyPlayerd()
{
}
public static function get voornaam():String
{
return _voornaam;
}
public static function set voornaam(value:String):void
{
_voornaam = value;
}
public static function get loss():int
{
return _loss;
}
public static function set loss(value:int):void
{
_loss = value;
}
}
}
我这样导入
import MyPlayerd.*;
并像这样创建变量
public var p1:MyPlayerd = new MyPlayerd();