あなたがすべき:
//document class
package
{
import flash.display.Sprite;
import flash.events.Event;
public class DocumentClass extends Sprite
{
public static var GAME;
public function DocumentClass() {
addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event){
removeEventListener(Event.ADDED_TO_STAGE, init);
GAME = new Game();
}
}
}
//Game class
package
{
import flash.display.Sprite;
import flash.events.Event;
public class Game extends Sprite
{
public var score:int;
public function Game() {
addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event){
removeEventListener(Event.ADDED_TO_STAGE, init);
//some functions/listeners & variable settings.
score = 0;
}
private function someFunction() {
stage.addChild(new HighscoreTable(score));//passing score to the highscore table...
}
}
}
静的クラス (コンストラクターなしで静的変数と関数のみを含む) は役に立たないことがよくあります.. 他の「トリック」と組み合わせてみてください。