 			this.fileRefList.addEventListener(Event.CANCEL, cancelEvent);
 			this.fileRefList.addEventListener(Event.SELECT, selectEvent);
 
-			this.fileRef = new FileReference();
-			this.fileRef.addEventListener(Event.CANCEL, cancelEvent);
-			this.fileRef.addEventListener(Event.SELECT, selectEvent);
+			initSingleFileReference();
 
 			this.files = new Dictionary();
 

			}

			if (this.multipleFiles) {
				for (var i:Number = 0; i < this.fileRefList.fileList.length; i++)
					processFile(new File("file_" + (this.idCounter++), this.fileRefList.fileList[i]));
			} else
				processFile(new File("file_" + (this.idCounter++), this.fileRef));

			this.fireEvent("SelectFiles", selectedFiles);
		}

		/**
		 * Send out all stage events to page level JS inorder to fake click, hover etc.
		 *
		 * @param e Event object.
		 */


			this.fireEvent("Init");
		}
		
		
		/**
		 * In case of multipleFiles=false FileReference needs to be reinitialized for every file select dialog
		 */
		private function initSingleFileReference() : void {
			if (this.fileRef) {
				this.fileRef = null;
			}
			
			this.fileRef = new FileReference();
			this.fileRef.addEventListener(Event.CANCEL, cancelEvent);
			this.fileRef.addEventListener(Event.SELECT, selectEvent);
		}

		/**
		 * Event handler for selection cancelled. This simply fires the event out to the page level JS.
