                 
                 dispatchEvent(new ModuleEvent(ModuleEvent.ERROR, false, false, 
                               0, 0, errorMessage));
+                
+                loaderInfo.removeEventListener(Event.COMPLETE, moduleCompleteHandler);
                 break;
 			}
         }


	    var docFrame:int = totalFrames == 1 ? 0 : 1;

		addFrameScript(docFrame, docFrameHandler);

		// Frame 1: module factory
		// Frame 2: document class
		// Frame 3+: extra classes
	    for (i = docFrame + 1; i < totalFrames; i++)
	    {
		    addFrameScript(i, extraFrameHandler);
		}

		timer = new Timer(100);
		timer.addEventListener(TimerEvent.TIMER, timerHandler);

        			timer.reset();

                    dispatchEvent(new Event("ready"));
                    
                    loaderInfo.removeEventListener(Event.COMPLETE, moduleCompleteHandler);
                }
                break;
			}
