I can’t figure out what is wrong with my code. I’m trying to get it so that if the user moves the cursor over a movieclip that it plays a sound. But I don’t the sound to be played the next time they roll over the movieclip.
This is the code I’m tried making myself, I put it on the movieclip instance…
[AS]onClipEvent(load){
PlayOnce= true;
}
on(rollOver){
if (PlayOnce=true){
ZolagSound = new Sound(this);
ZolagSound.attachSound(“zolag”);
ZolagSound.start();
}
}
on(rollOut){
PlayOnce=false;
}[/AS]
What the code does right now, is plays the sound regardless of whether it’s been played before.
Any help, and an explanation of why my code isn’t working would be great!
I’m using flash MX at home, but need the code to work on Flash 5 at uni.
Thanks