我遇到班级问题而且路径......
Player.as,第4行1172:无法找到定义流。
/main.as
import player.Player;
var _Player = new Player();
/player/Player.as
package player {
import flash.display.Sprite;
import Stream; // Can't find Steam
public class Player extends Sprite {
public var _Stream = null;
public function Player(){
var _Stream = new Stream();
}
}
}
/player/Stream.as
package player {
import flash.display.Sprite;
public class Stream extends Sprite {
public function Stream(){
}
}
}
答案 0 :(得分:2)
import player.Stream;
我希望这会有所帮助
答案 1 :(得分:0)
您的导入声明应为
import player.Stream;
Imports始终使用约定[package(s)]。[Class]。使用像FlashDevelop这样自动为您创建导入语句的工具可以更容易避免这个问题。