argument error #2068: Invalid sound
Hi,
I'm trying to use the static variables and methods for the first time.
So I took the code, I had previously on an upper level component, down to the related class file.
Its all working fine, but the sound does not want to play.
Gives the error: Invalid sound. The row is marked bold.
What is causing that error?
Many thanks in advance!
private static var numberForFlowerSound: uint = 0;
private static var flowerSound01: BellLoop01Multitrack = new BellLoop01Multitrack();
private static var flowerSound02: BellLoop02Multitrack = new BellLoop02Multitrack();
private static var flowerSound03: BellLoop03Multitrack = new BellLoop03Multitrack();
private static var flowerSound04: BellLoop04Multitrack = new BellLoop04Multitrack();
private static function countForFlowersSound(): void
{
numberForFlowerSound++;
if (numberForFlowerSound == 1)
{
flowerSound01.play();
}
else if (numberForFlowerSound == 2)
{
flowerSound02.play();
}
else if (numberForFlowerSound == 3)
{
flowerSound03.play();
}
else if (numberForFlowerSound == 4)
{
flowerSound04.play();
numberForFlowerSound = 0;
}
}
