jsp嵌入flex swf 和flex调用js方法
2017-01-05 11:37
375 查看
jsp要嵌入的代码
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
align="middle">
height="100%" name="presentation" align="middle"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer"
allowFullScreen="true" wmode="transparent" />
把volumeMenujsp1
换成要嵌入的swf就可以
如果flex要调用js方法:
flex中代码
volumeMenujsp1中调用js方法
ExternalInterface.addCallback("alertValue",
alertValue); //设置调用js返回方法
ExternalInterface.call("returnValeu");
//调用js方法
private function alertValue( flag :String):int
Alert.show(flag);
return 0;
}
jsp、html中script代码
function returnValeu(){
var vm=document.getElementByIdx_x_x_x("presentation");
//presentation
为object id
return vm.alertValue("返回");//回调flex前插后插函数
在这里可以把serlvet返回的userID传到Flex中
}
我实现的是两个项目对接, jsp调用另一个项目的servlet弹出jsp把值传到flex中,
byid
後面地 x_x
是新浪自己加的。。。
北京质恒装饰工程有限公司
汗蒸房承建,汗蒸房,汗蒸房安装,家庭汗蒸房,韩式汗蒸房,电气石汗蒸房,玉石汗蒸房,砭石汗蒸房,纳米汗蒸房 http://www.bjzhzs.com/
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
align="middle">
height="100%" name="presentation" align="middle"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer"
allowFullScreen="true" wmode="transparent" />
把volumeMenujsp1
换成要嵌入的swf就可以
如果flex要调用js方法:
flex中代码
volumeMenujsp1中调用js方法
ExternalInterface.addCallback("alertValue",
alertValue); //设置调用js返回方法
ExternalInterface.call("returnValeu");
//调用js方法
private function alertValue( flag :String):int
Alert.show(flag);
return 0;
}
jsp、html中script代码
function returnValeu(){
var vm=document.getElementByIdx_x_x_x("presentation");
//presentation
为object id
return vm.alertValue("返回");//回调flex前插后插函数
在这里可以把serlvet返回的userID传到Flex中
}
我实现的是两个项目对接, jsp调用另一个项目的servlet弹出jsp把值传到flex中,
byid
後面地 x_x
是新浪自己加的。。。
北京质恒装饰工程有限公司
汗蒸房承建,汗蒸房,汗蒸房安装,家庭汗蒸房,韩式汗蒸房,电气石汗蒸房,玉石汗蒸房,砭石汗蒸房,纳米汗蒸房 http://www.bjzhzs.com/
相关文章推荐
- jsp页面调用不到当前页面定义的js方法,yntax error, insert "}" to complete MethodBody
- 【FLEX教程】#007 如何让JS调用SWF里的方法
- flash调用js中的方法,让js传递变量给flash (兼容 IE & FF) (转)
- flash调用js中的方法,让js传递变量给flash (兼容 IE & FF)
- jsp 在超链接上调用onclick,js方法函数,a标签
- <a> 标签 中调用js的几种方法
- js调用Flex中的方法,向flex中传参,flex调用js
- Flex调用swf内方法
- js调用flex中as方法出错的解决办法
- jsp调用applet以及采用js调用applet的方法
- 使用swfobject.js调用flash,使flash背景透明的方法
- <a>标签中调用js的几种方法
- flex 打开外部的swf 并调用其方法
- jsp如何调用flex function方法
- flash调用js中的方法,让js传递变量给flash (兼容 IE & FF)
- java中调用Js的方法 & java.net.Url的使用 & Url中文乱码的解决 & Map 排序
- Flex中调用嵌入声音效果的三种方法
- JSP、AJax中文乱码问题解决,escape(), encodeURI(), encodeURIComponent(),js对参数连续两次调用 encodeURI(String) 方法
- Flex调用swf内方法
- Flex通过js调用控件的方法以及JS中拼接XML