 
 			lookup[id] = wrapper;
 			wrapper.addEventListener(Event.SOUND_COMPLETE, handleSoundFinished, false, 0, true);
-            wrapper.addEventListener("loop", handleSoundLoop, false, 0, true);
+			wrapper.addEventListener("loop", handleSoundLoop, false, 0, true);
 			wrapper.addEventListener("interrupt", handleSoundInterrupt, false, 0, true);
 			log("Play Sound", id, src, "o:",offset, "l:",loop, "v:",volume, "p:",pan, "sT:",startTime, "d:",duration, "mv:",masterVolume);
 			return id;


	// Sound playback has completed.
	protected function handleSoundComplete(event:Event):void {
        offset = 0;  // have to set this as it can be set by pause during playback
        if (loop != 0) {
			//only decrement loop if it is not -1
            if(loop > 0) loop--;  // NOTE this introduces a theoretical limit on loops = float max size x 2 - 1

            startSound(offset);

            dispatchEvent(new Event("loop"));
        } else {
            dispatchEvent(event);
        }
	}

	// An error has occurred.

			log("Complete", wrapper.id, "Remaining:", activeSoundCount);
		}

		// An instance loop callback.
		protected function handleSoundLoop(event:Event):void {
			var wrapper:SoundWrapper = event.target as SoundWrapper;
			ExternalInterface.call(SOUND_CALLBACK, wrapper.id, "handleSoundLoop");
			log("Loop", wrapper.id, "Remaining:", wrapper.loop);
		}

		protected function handleSoundInterrupt(id:String):void {
			var wrapper:SoundWrapper = getWrapper(id, true);
			if (wrapper != null) {
				log("Interrupted", wrapper.id);
