 
 	// 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) {
+		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);
-        }
+			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.


	/** Get/Set the playhead position. */
	public function get position():Number {
        if (channel != null && !_paused) {
            return channel.position - this._startTime;
        }
        return offset;
    }

	/** @private */
	public function set position(value:Number):void {
        if (channel != null) {
            channel.stop();
        }
		startSound(value);
	}


				for (var n:String in map) {
					ExternalInterface.addCallback(n, map[n]);
				}
				// NOTE this is in an ENTER_FRAME to deal with a race issue in IE caused by caching
				this.addEventListener(Event.ENTER_FRAME, handleReady, false, 0, true);
			} catch (e:*) {
				handleError(e);
