 
 			inputFilePath = getInputFile(ev);
 			outputDirPath = getOutputDir(ev);
+			scaleFactor = getScaleFactor(ev);
 
 			log("Input file: " + inputFilePath);
 			log("Output directory: " + outputDirPath);


			log("Bounding box: " + bBox)

			outputWidth = bBox.width;
			outputHeight = bBox.height;
			offsetMatrix = new Matrix();
			offsetMatrix.translate(bBox.x * -1, bBox.y * -1);

			return;
		}

				return "";
			}
		}
		private function getScaleFactor(ev:InvokeEvent):Number {
			if(ev.arguments.length > 2) {
				log("scale factor set to " + parseFloat(ev.arguments[2]));
				return parseFloat(ev.arguments[2]);
			}
			return 1;
		}

		private function log(message:String="", add_new_line:Boolean=true):void {
			outfield.appendText((add_new_line ? "\n" : "") + message);
