src/shims/moxie/js/moxie-swf.js
function() {
				self.convertEventPropsToHandlers(dispatches);

				self.bind('RuntimeInit', function(e, runtime) {
					self.ruid = runtime.uid;
					self.shimid = runtime.shimid;

					self.bind("Ready", function() {
						self.trigger("Refresh");
					}, 999);

					self.bind("Change", function() {
						var files = runtime.exec.call(self, 'FileInput', 'getFiles');

						self.files = [];

						Basic.each(files, function(file) {
							// ignore empty files (IE10 for example hangs if you try to send them via XHR)
							if (file.size === 0) {
								return true; 
							}
							self.files.push(new File(self.ruid, file));
						});
					}, 999);

					// re-position and resize shim container
					self.bind('Refresh', function() {
						var pos, size, browseButton, shimContainer;
						
						browseButton = Dom.get(options.browse_button);
						shimContainer = Dom.get(runtime.shimid); // do not use runtime.getShimContainer(), since it will create container if it doesn't exist

						if (browseButton) {
							pos = Dom.getPos(browseButton, Dom.get(options.container));
							size = Dom.getSize(browseButton);

							if (shimContainer) {
								Basic.extend(shimContainer.style, {
									top     : pos.y + 'px',
									left    : pos.x + 'px',
									width   : size.w + 'px',
									height  : size.h + 'px'
								});
							}
						}
						shimContainer = browseButton = null;
					});
					
					runtime.exec.call(self, 'FileInput', 'init', options);
				});

				// runtime needs: options.required_features, options.runtime_order and options.container
				self.connectRuntime(Basic.extend({}, options, {
					required_caps: {
						select_file: true
					}
				}));
			}
function() {
				self.convertEventPropsToHandlers(dispatches);

				self.bind('RuntimeInit', function(e, runtime) {
					self.ruid = runtime.uid;
					self.shimid = runtime.shimid;

					self.bind("Ready", function() {
						self.trigger("Refresh");
					}, 999);

					self.bind("Change", function() {
						var files = runtime.exec.call(self, 'FileInput', 'getFiles');

						self.files = [];

						Basic.each(files, function(file) {
							// ignore empty files (IE10 for example hangs if you try to send them via XHR)
							if (file.size === 0) {
								return true; 
							}
							self.files.push(new File(self.ruid, file));
						});
					}, 999);

					// re-position and resize shim container
					self.bind('Refresh', function() {
						var pos, size, browseButton, shimContainer;
						
						browseButton = Dom.get(options.browse_button);
						shimContainer = Dom.get(runtime.shimid); // do not use runtime.getShimContainer(), since it will create container if it doesn't exist

						if (browseButton) {
							pos = Dom.getPos(browseButton, Dom.get(options.container));
							size = Dom.getSize(browseButton);

							if (shimContainer) {
								Basic.extend(shimContainer.style, {
									top     : pos.y + 'px',
									left    : pos.x + 'px',
									width   : size.w + 'px',
									height  : size.h + 'px'
								});
							}
						}
						shimContainer = browseButton = null;
					});
					
					runtime.exec.call(self, 'FileInput', 'init', options);
				});

				// runtime needs: options.required_features, options.runtime_order and options.container
				self.connectRuntime(Basic.extend({}, options, {
					required_caps: {
						select_file: true
					}
				}));
			}
function ( ) { self . convertEventPropsToHandlers ( dispatches ) ; self . bind ( 'RuntimeInit' , function ( e , runtime ) { self . ruid = runtime . uid ; self . shimid = runtime . shimid ; self . bind ( "Ready" , function ( ) { self . trigger ( "Refresh" ) ; } , 999 ) ; self . bind ( "Change" , function ( ) { var files = runtime . exec . call ( self , 'FileInput' , 'getFiles' ) ; self . files = [ ] ; Basic . each ( files , function ( file ) { // ignore empty files (IE10 for example hangs if you try to send them via XHR) if ( file . size === 0 ) { return true ; } self . files . push ( new File ( self . ruid , file ) ) ; } ) ; } , 999 ) ; // re-position and resize shim container self . bind ( 'Refresh' , function ( ) { var pos , size , browseButton , shimContainer ; browseButton = Dom . get ( options . browse_button ) ; shimContainer = Dom . get ( runtime . shimid ) ; // do not use runtime.getShimContainer(), since it will create container if it doesn't exist if ( browseButton ) { pos = Dom . getPos ( browseButton , Dom . get ( options . container ) ) ; size = Dom . getSize ( browseButton ) ; if ( shimContainer ) { Basic . extend ( shimContainer . style , { top : pos . y + 'px' , left : pos . x + 'px' , width : size . w + 'px' , height : size . h + 'px' } ) ; } } shimContainer = browseButton = null ; } ) ; runtime . exec . call ( self , 'FileInput' , 'init' , options ) ; } ) ; // runtime needs: options.required_features, options.runtime_order and options.container self . connectRuntime ( Basic . extend ( { } , options , { required_caps : { select_file : true } } ) ) ; }
Initializes the file-picker, connects it to runtime and dispatches event ready when done.

@method init
Initializes the file - picker connects it to runtime and dispatches event ready when done .