我正在尝试在我的网页上嵌入.swf文件。我知道如何嵌入.swf文件,但我的问题是这个.swf文件从xml文件加载它的内容,我不知道要添加。 swf与它的xml文件。我尝试了很多方法,但我仍然无法运行该swf文件。
此myfile.swf和html文件存储在同一文件夹中,xml文件存储在'content'文件夹中,此代码加载.swf文件,但不从xml获取内容。这是我的代码到目前为止
<head>
<meta charset="utf-8">
<title>The HTML5</title>
<link href="assets/css/style.css" rel="stylesheet" />
<script type='text/javascript' src="js/swfobject.js"></script>
</head>
<body MARGINWIDTH="0" MARGINHEIGHT="0" LEFTMARGIN="0" RIGHTMARGIN="0" TOPMARGIN="0" BOTTOMMARGIN="0">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/
swflash.cab#version=7,0,19,0" width="100%" height="100%">
<param name="movie" value="myfile.swf?xml_path=content/xml/mainXML.xml" />
<param name='base' value='http://localhost/myproject/'>
<param name="quality" value="high" />
<param name="allowFullScreen" value="true" />
<embed src="myfile.swf?xml_path=content/xml/mainXML.xml" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100%" height="100%" allowFullScreen="true" flashVars="xml_path=http://localhost/myproject/content/mainXML.xml"></embed>
</object>
</script>
</BODY>
</HTML>