求SWFObject高手解答,后台返回的值怎么嵌入到.swf中
在页面嵌入 江苏.swf地图,
<div id ="showtm1">
</div>
var so2 = new SWFObject("swf/jiangsu.swf", "swfMap", "479", "270", "6", "#ffffff");
so2.addParam("wmode","opaque");
so2.addVariable("RExecFlag", "y");
so2.addVariable("RAUrl",escape("homepage.show.map.do?dayId=20111205"); //这里报错so2.write("showtm1");
后台:
Document doc = DocumentHelper.createDocument();
Element rs = doc.addElement("rs");
。。。。
// 输出
try {
OutputStream os=response.getOutputStream();
System.out.println("doc = " + doc.asXML());
os.write(doc.asXML().getBytes("UTF-8"));
}
catch (Exception e) {
e.printStackTrace();
}
doc.asXML里面的值是这样的
<?xml version="1.0" encoding="UTF-8"?>
<rs>
<r a="changzhou" tip="常州"/>
<r a="huai'an" tip="淮安"/>
<r a="lianyungang" tip="连云港"/>
<r a="nanjing" tip="南京"/>
<r a="nantong" tip="南通"/>
<r a="suzhou" tip="苏州"/>
<r a="suqian" tip="宿迁"/>
<r a="taizhou" tip="泰州"/>
<r a="wuxi" tip="无锡"/>
<r a="xuzhou" tip="徐州"/>
<r a="yancheng" tip="盐城"/>
<r a="yangzhou" tip="扬州"/>
<r a="zhenjiang" tip="镇江"/>
</rs>
a属性的值是和地图上的区域是对应的。
经过逻辑处理后,返回页面上的图形没有变化,还是初始的原始图,
实现的应该是有13个地市组成的地图