It helps if you understand what the code does, just to copy and paste may not get it done. For one onClick is specific to KM components. Are you using the GUI buttons for your browse button? and is it named browse? Also make sure you are exporting as flash version 8

Here is a simpler version that doesn't fill in text fields using the listerner object

Code:
var allTypes = new Array();
var imageTypes = new Object();
imageTypes.description = "Images (*.jpg, *.jpeg, *.gif, *.png)";
imageTypes.extension = "*.jpg; *.jpeg; *.gif; *.png";
allTypes.push(imageTypes);


myFile=new flash.net.FileReference();

btn1.onRelease=function(){
	myFile.browse(allTypes);
	}
in that example the button is GUI button named the default name btn1