# Display score in Game Over screen?

**URL:** <https://forum.kirupa.com/t/display-score-in-game-over-screen/322329>\
**Category:** programming\
**Created:** [May 18, 2011, 5:10am UTC](https://forum.kirupa.com/t/display-score-in-game-over-screen/322329 "2011-05-18T05:10:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![designCannon](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@designCannon](https://forum.kirupa.com/u/designCannon)\
**Post date:** [May 18, 2011, 5:10am UTC](https://forum.kirupa.com/t/display-score-in-game-over-screen/322329/1 "2011-05-18T05:10:59Z")

</div>

I’m making my first AS3 Flash game. It’s a little side-scroller that is working perfectly, based on the structure from this [tutorial](http://www.emanueleferonato.com/2008/12/17/designing-the-structure-of-a-flash-game-as3-version/).  
Basically I have different movie clips for the splash screen, the game itself, and the gameover screen. But I’m having a tiny problem where I am trying to get the score, which is working on the game screen movieclip, to show up on the gameover movie clip.

Score is calculated in the\_game\_itself.as like this:

```auto
if (event.target.hitTestObject(hitMc)) {
		event.target.width = 0;
		event.target.height = 0;
		preyCount++;
		//trace("score +1");
		score.text = String(preyCount);

	}

```

And the gameover screen has a dynamic text box called gameScore. How do I transfer over the value of score to the gameover movieclip? I’m not sure how to call it in gameover.as Class file without getting “Access of Undefined property”.
