If you use file reference with an AIR app you have access to the file path, with a browser based app security prevents you from having access to the file path you can access the name of the file only.
this is an example of grab a list of files(images) using filereferencelist and filereference and displaying the image in a list, its a similar process for just getting a list of file names
http://gumbo.flashhub.net/pagedrop/ sourcecode enabled (right click in the browser and select view source)
for filereference the name property will return the file name only not the path
for filereferencelist you have the .filelist[X].name to get the file name.
hope this helps
Just one last thing for your code
private var fileRef:FileReference = new FileReference(); <--- declare the filerefence so that it is available for all your functions
private function getImageUrl():void
private function myselectedfile(e:Event): void
mytextfield.text = fileref.name;
Thanx for help...........I am now getting the image name properly but would you please tell me about how to get the proper location of the image
and put the location url in the text field..............
As I explained due to security of the flashplayer you can not get the full path of a local file, If you create an AIR application it runs 'natively' so you can get the full path of a local file.