# Small game

**URL:** <https://forum.kirupa.com/t/small-game/286346>\
**Category:** flash\
**Created:** [April 14, 2009, 8:38am UTC](https://forum.kirupa.com/t/small-game/286346 "2009-04-14T08:38:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RebeccaLessay](https://avatars.discourse-cdn.com/v4/letter/r/ee7513/32.png) [@RebeccaLessay](https://forum.kirupa.com/u/RebeccaLessay)\
**Post date:** [April 14, 2009, 8:38am UTC](https://forum.kirupa.com/t/small-game/286346/1 "2009-04-14T08:38:17Z")

</div>

Hi beginnner AS3 here again,

Right now I’m working on a school project (which is due friday :crying:)  
I keep having problems with my score and for some reason it doesn’t go to frame 9.

Here’s what I have:

> //Siesta level\_1  
> stop();

var Score = 0;

var juistMuziekje = -1;

var namesArray:Array = new Array(“koe”,“kat”,“kip”,“hond”);

speelmp3();  
trace(juistMuziekje);  
function speelmp3() {  
var rndGeluid = Math.floor(Math.random()\*4);  
var mp3 = namesArray[rndGeluid]+“.mp3”;  
juistMuziekje = namesArray[rndGeluid];  
trace(mp3);  
var snd:Sound = new Sound();  
var req:URLRequest = new  
URLRequest(mp3);  
snd.load(req);  
snd.play();  
}

addEventListener(MouseEvent.CLICK,vergelijk);  
function vergelijk(e:MouseEvent) {  
var naam = e.target.name;  
if (naam == juistMuziekje) {  
trace(“goedzo”);  
Score += 1;}  
else{  
trace(“helaas”);  
Score -= 1;  
}  
if Score = -5;  
gotoAndPlay(9);  
}

Some things are in dutch, I apologize for that. I tried changing it but it only ended up with more errors. I hope it’s not too confusing.

I appriciate any help ^^
