# Browse button with flash

**URL:** <https://forum.kirupa.com/t/browse-button-with-flash/44680>\
**Category:** Uncategorized\
**Created:** [March 6, 2004, 9:40am UTC](https://forum.kirupa.com/t/browse-button-with-flash/44680 "2004-03-06T09:40:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gerartje](https://avatars.discourse-cdn.com/v4/letter/g/e19adc/32.png) [@gerartje](https://forum.kirupa.com/u/gerartje)\
**Post date:** [March 6, 2004, 9:40am UTC](https://forum.kirupa.com/t/browse-button-with-flash/44680/1 "2004-03-06T09:40:38Z")

</div>

hello,

I’m making a small back-end system, and I would like to know if it’s possible to integrate a browse button…

I did already soms “research”…

I pass a var from flash to javascript

//\*\*\*FLASH

\_root.hitme\_mc.onRelease = function()  
{fscommand(“filechooser”, “”)}

//\*\*\* JAVASCRIPT

function myFlash\_DoFSCommand(command, args) {  
if(command==“filechooser”)  
{  
alert(“test”);  
}

That’s a part already works 🙂

Now, I’ve found how to select a file on your disc…

\<form\>  
\<input id=“realfile”  
type=“file”  
style=“position:absolute;visibility:visible;”  
onchange=“document.getElementById  
(‘dummyfile’).value=this.value”\>  
\<input id=“dummyfile” type=“text”\>  
\</form\>

With this you select a file and the path will appear as a string in the textfield.

Now the thing I want is to call the function, when I click a button in Flash, that chooses a file and passing the string back to flash, to put it there in a textfield. But how do you call that function???

Maybe this thread belongs in Client side programming, sorry…

Grtz
