我现在有一个FLASH的程序,AS代码如下:package{
import flash.display.Sprite;
    import flash.events.*;
    import flash.net.FileReference;
    import flash.net.URLRequest;
import flash.external.ExternalInterface; public class Test extends Sprite
{
private var downloadURL:URLRequest;
        private var fileName:String = "";
        private var file:FileReference; public function Test()
{
ExternalInterface.addCallback("downLoad", downLoad);
}
public function downLoad(url:String):void
{
downloadURL = new URLRequest();
            downloadURL.url = url;
            file = new FileReference();
            configureListeners(file);
            file.download(downloadURL, fileName);
}
private function configureListeners(dispatcher:IEventDispatcher):void {
            dispatcher.addEventListener(Event.CANCEL, cancelHandler);
            dispatcher.addEventListener(Event.COMPLETE, completeHandler);
            dispatcher.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
            dispatcher.addEventListener(Event.OPEN, openHandler);
            dispatcher.addEventListener(ProgressEvent.PROGRESS, progressHandler);
            dispatcher.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
            dispatcher.addEventListener(Event.SELECT, selectHandler);
        }        private function cancelHandler(event:Event):void {
            trace("cancelHandler: " + event);
        }        private function completeHandler(event:Event):void {
            trace("completeHandler: " + event);
        }        private function ioErrorHandler(event:IOErrorEvent):void {
            trace("ioErrorHandler: " + event);
        }        private function openHandler(event:Event):void {
            trace("openHandler: " + event);
        }        private function progressHandler(event:ProgressEvent):void {
            var file:FileReference = FileReference(event.target);
            trace("progressHandler name=" + file.name + " bytesLoaded=" + event.bytesLoaded + " bytesTotal=" + event.bytesTotal);
        }        private function securityErrorHandler(event:SecurityErrorEvent):void {
            trace("securityErrorHandler: " + event);
        }        private function selectHandler(event:Event):void {
            var file:FileReference = FileReference(event.target);
            trace("selectHandler: name=" + file.name + " URL=" + downloadURL.url);
        } }
}在JS是调用的方式是:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
function jx(){ 
document.write('<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="50px" height="30px">'); 
document.write('<param name="movie" value="download.swf">'); 
document.write('<param name="quality" value="high"> '); 
document.write('<param name="flashvars" value="url=http://sssss/uploadfile/2010/06/17/16/2010061712283262931_s90.jpg"> ');
document.write('<param name="menu" value="false"> '); 
document.write('<param name="wmode" value="transparent"> '); 
document.write('<embed src="download.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="30px" height="30px" quality="High" wmode="transparent">'); 
document.write('</embed>'); 
document.write('</object>'); 
} //-->
</SCRIPT>
</HEAD><BODY>
<INPUT TYPE="submit" onclick="jx();">
</BODY>
</HTML>我想当触发JX这个函数的时候就弹出一个对话框,把这个http://sssss/uploadfile/2010/06/17/16/2010061712283262931_s90.jpg 图片保存到本地,请问上面的写法有问题吗?