Hi
I have a 'For' loop in a Window to fade music out:
for(a=100; a<1; a=a-1)
{
Game.Msg("MusicFade"+a);
Game.SetMusicChannelVolume(3, a);
Sleep(100);
}
Game.StopMusicChannel(3);
I've made it extreme - a ten second fade - just to check it. It jumps straight to the 'Stop' - I get nothing from the Game.Msg so it's not going through the loop at all.
I guess I must have made some stupid syntactical error. I hope someone can spot it because it will probably also explain why my Static fades don't work either;
TextAlone = this.GetControl("TextAlone");
TextAlone.Visible = true;
TextAlone.AlphaColor = MakeRGBA(255,255,255,1);
// Fade up
for(a=1; a<256; a=a+1)
{
WMLogo.AlphaColor = MakeRGBA(255,255,255,a);
TextAlone.AlphaColor = MakeRGBA(255,255,255,a);
Sleep(5);
}
Sleep(1000);
// Fade down
for(a=255; a<1; a=a-1)
{
WMLogo.AlphaColor = MakeRGBA(255,255,255,a);
TextAlone.AlphaColor = MakeRGBA(255,255,255,a);
Sleep(5);
}
TextAlone.Visible = false;
Cheers