Reputation: 27685
I'm having problems with a class and it's path...
Player.as, Line 4 1172: Definition Stream could not be found.
/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(){
}
}
}
Upvotes: 0
Views: 52
Reputation: 740
Your import statement should be
import player.Stream;
Imports always use the convention [package(s)].[Class]. Using a tool like FlashDevelop which automatically creates the import statements for you can make this problem much easier to avoid.
Upvotes: 0