 
       if (idleQue.length > 0)
       {
-        loader = idleQue.shift() as MJPGImage;
-        loadImage(loader, imgBuf.shift());
-      }
-    }
-
-    private function onLoadComplete(event:Event):void
-    {
-      if (!playing)
-      {
-        return;
-      }
-
-      var arr:Array = getChildren();
-      var loader:MJPGImage = event.currentTarget.loader as MJPGImage;
-      var bitmap:Bitmap = event.currentTarget.content;
-      if (bitmap != null)
-      {
-        bitmap.smoothing = true;
-      }
-      loader.data.loading = false;
-
+        loadImage(idleQue.shift(), imgBuf.shift());
+      }
+    }
+
+    private function scaleAndPosition(loader:MJPGImage):void
+    {
       // Scale to fit stage
       var loaderAspectRatio:Number = loader.width / loader.height;
       var stageAspectRatio:Number = stage.stageWidth / stage.stageHeight;

        updateDecFrames(0);
        updatePlaying(true);

        var arr:Array = getChildren();
        var loader:MJPGImage = null;
        for each (loader in arr)
        {
          loader.data.inQue = true;
          idleQue.push(loader);

        loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onImageError);
        this.addChild(loader);
      }
      stage.addEventListener(Event.RESIZE, resizeListener);
    }

    private function resizeListener(e:Event):void {
      for each (var loader:MJPGImage in getChildren())
      {
        scaleAndPosition(loader);
      }
    }

    public function getChildren():Array
    {
       var children:Array = [];
       for (var i:uint = 0; i < this.numChildren; i++)
       {
        children.push(this.getChildAt(i));
       }
       return children;
    }

