Uploading a file to the server with a flash interface

Hi all,

I creating a b’back end’ if you will, in my flash movie that allows the administrator to upload files to the server using a browse for file button. I have managed to trigger the <input type:file> from my form using javascript and a flash button. The form is hidden using dhtml layer. when I try to submit my form using the same process (calling a javascript function from a flash button) I get a run time error that says “Access Denied”. I have no problems when I submit the form without the flash button (the file iuploads to the specified directory without a glitch).

<script language=“JavaScript” type=“text/JavaScript”>
function browse(){

function sendit(){

<H1>File Upload</H1>

<div id=“Layer1” style=“position:absolute; width:200px; height:115px; z-index:1”>
<object classid=“clsid:D27CDB6E-AE6D-11cf-96B8-444553540000” codebase=“http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0” width=“550” height=“400”>
<param name=“movie” value=“browsebutt.swf”>
<param name=“quality” value=“high”>
<embed src=“browsebutt.swf” quality=“high” pluginspage=“http://www.macromedia.com/go/getflashplayer” type=“application/x-shockwave-flash” width=“550” height=“400”></embed></object>

<div id=“Layer2” style=“position:absolute; width:200px; height:115px; z-index:2; visibility: visible;”>
<FORM name=“uploadform” method=“post” encType=“multipart/form-data” action=“ToFileSystem.asp”>
<INPUT type=“File” name=“File1”>
<INPUT type=“Submit” value=“Upload”>



Is my code correct?..when I activate the windows debugger it faults at "document.uploadform.submit();

Please help!