I’m trying to:
[LIST]
[]Jump from frame 1 to a frame later in the main timeline
[]Reference an object that exists on the stage in that frame, but not in frame 1
[/LIST]
Like so:
function endGame():void {
gotoAndPlay("gameOver");
scoreField.visible = false;
}
A movieclip with the instance name ‘scorefield’ exists in the “gameOver” frame, yet for some reason, I just get a “Cannot access a property or method of a null object reference.” This code is all within a function. By the time the reference to scoreField is executed, the timeline is at the right frame.
This goes for all objects I try to reference this way. Any ideas?