public class AlarmClock {
public static const MODE_VISUAL = 1;
public static const MODE_AUDIO = 2;
public static const MODE_BOTH = 3;
private var mode = AlarmClock.MODE_AUDIO;
private function signalAlarm ( ) {
if (mode == MODE_VISUAL) {
// Display icon
} else if (mode == MODE_AUDIO) {
// Play sound
} else if (mode == MODE_BOTH) {
// Display icon and play sound
}
}
}