我做错了什么
SpawnTeams();
var Redone:RedTeam = new RedTeam();
function SpawnTeams():void{
addChild(Redone);
}
我收到此错误:
Type error 2007
答案 0 :(得分:0)
我的猜测是你在宣布Redone之前调用了SpawnTeam。使用'SpawnTeams();'
将'var Redone:RedTeam ...'换行var Redone:RedTeam = new RedTeam();
SpawnTeams(); //This line is moved
function SpawnTeams():void{
addChild(Redone);
}