In the game score sample, you can declare two variables in Action Script, providing they are "playerName" and "score" in level 0,
To get the value of the variables from Action Script
score.playerName = FlashPlayer.getVariable(
"_level0.playerName");
score.score = parseInt(FlashPlayer.getVariable(
"_level0.score"));
To update the value of the variables in Action Script
FlashPlayer.setVariable("_level0.playerName",
score.playerName.toString());
FlashPlayer.setVariable("_level0.score",
score.score.toString());