 				out = '0' + out;
 			}
 			return out;
-		}
-
-		private function calculateBBox():void {
-			stopClip(loadedSwf);
-			goToFrame(loadedSwf, 0);
-
-			var boundsArray:Object = {
-				"x" : new Array(),
-				"y" : new Array(),
-				"w" : new Array(),
-				"h" : new Array()
-			}
-			var r:Rectangle;
-			for(var currentFrame:int = 0; currentFrame < totalFrames; currentFrame++) {
-				goToFrame(loadedSwf, currentFrame);
-				r = loader.content.getRect(stage);
-				boundsArray.x.push(r.x);
-				boundsArray.y.push(r.y);
-				boundsArray.w.push(r.width);
-				boundsArray.h.push(r.height);
-			}
-
-			boundsArray.x.sort(Array.NUMERIC);
-			boundsArray.y.sort(Array.NUMERIC);
-			boundsArray.w.sort(Array.NUMERIC | Array.DESCENDING);
-			boundsArray.h.sort(Array.NUMERIC | Array.DESCENDING);
-
-			bBox = new Rectangle(
-				Math.floor(boundsArray.x[0]),
-				Math.floor(boundsArray.y[0]),
-				Math.ceil(boundsArray.w[0]),
-				Math.ceil(boundsArray.h[0])
-			);
-
-			log("Bounding box: " + bBox)
-
-			outputWidth = bBox.width * scaleFactor;
-			outputHeight = bBox.height * scaleFactor;
-			offsetMatrix = new Matrix();
-			offsetMatrix.translate(bBox.x * -1, bBox.y * -1);
-			offsetMatrix.scale(scaleFactor, scaleFactor);
-
-			return;
 		}
 
 		//Called for every frame

				log("scale factor set to " + parseFloat(ev.arguments[2]));
				return parseFloat(ev.arguments[2]);
			}
			return 1;
		}


		private var separator:String = "_";
		private var outfield:TextField;
		private var outputDirPath:String;
		private var offsetMatrix:Matrix = new Matrix();
		private var bBox:Rectangle;
		private var scaleFactor:Number;
		private var pane:ScrollPane;
