void playSound(String clipName) {
		stopSound();
		File f = null;
		if (isRemote()) {
			URL u = null;
			try {
				u = new URL(FileUtilities.getCodeBase(pageAddress) + clipName);
			} catch (MalformedURLException e) {
				e.printStackTrace();
				return;
			}
			try {
				f = ConnectionManager.sharedInstance().shouldUpdate(u);
				if (f == null)
					f = ConnectionManager.sharedInstance().cache(u);
			} catch (IOException e) {
				e.printStackTrace();
				return;
			}
		} else {
			f = new File(FileUtilities.getCodeBase(pageAddress), clipName);
		}
		try {
			if (clipName.toLowerCase().endsWith(".mid")) {
				if (midiPlayer == null)
					midiPlayer = new MidiPlayer();
				midiPlayer.setLoopCount(loopBackgroundSound ? -1 : 0);
				midiPlayer.play(f);
			} else {
				if (sampledAudioPlayer == null)
					sampledAudioPlayer = new SampledAudioPlayer();
				sampledAudioPlayer.setLoopCount(loopBackgroundSound ? Clip.LOOP_CONTINUOUSLY : 0);
				sampledAudioPlayer.play(f);
			}
		} catch (Throwable t) { // in case the players have unexpected errors
			t.printStackTrace();
		}
	}