 	import flash.events.TimerEvent;
 	import flash.filesystem.File;
 	import flash.filesystem.FileStream;
+	import flash.geom.Rectangle;
+	import flash.geom.Matrix;
 	import flash.net.URLRequest;
 	import flash.text.TextField;
 	import flash.text.TextFieldAutoSize;

		private var prefix:String;
		private var outfield:TextField;
		private var outputDirPath:String;


		public function swf2png() {

		//Saves the current frame of the loader object to a png
		private function saveFrame():void {
			var bitmapData:BitmapData = new BitmapData(outputWidth, outputHeight, true, 0x0);
			bitmapData.draw(loader.content, offsetMatrix);
			var bytearr:ByteArray = PNGEncoder.encode(bitmapData);
			var outfileName:String = outputDirPath + File.separator + prefix + counter + ".png"
			var file:File = new File(outfileName);
