Thanks for the tip on cleaning up the switch statement. I think this is a better way to write it, but I'm still not sure I understand the "break" statements, and whether I need one in each case:
function fade_transitions( ttype, var, ttime ) {
switch ( ttype ) {
case Transition.ToGame:
local sound = fe.add_sound("sounds/Burgertime_Dies.wav");
sound.playing=true;
break;
case Transition.ToNewList:
local Wheelclick = fe.add_sound("sounds/Asteroids_Tone02.wav");
Wheelclick.playing=true;
break;
case Transition.ToNewSelection:
local Wheelclick = fe.add_sound("sounds/clicked.wav");
Wheelclick.playing=true;
break;
}
return false;
}
fe.add_transition_callback( "fade_transitions" );
But still no joy.
And substituting the whole block for the code that @jedione posted also doesn't work for me.
Any idea why?