 
 	    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);
-		}
+        addEventListener(Event.ENTER_FRAME, docFrameListener);
 
 		timer = new Timer(100);
 		timer.addEventListener(TimerEvent.TIMER, timerHandler);

                
                dispatchEvent(new ModuleEvent(ModuleEvent.ERROR, false, false, 
                              0, 0, errorMessage));
                break;
			}
        }

        			timer.reset();

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