javascript与flash函数相互交互
Java代码 import flash.external.ExternalInterface; function hello(){ return "测试成功了哦~~"; } //允许flash调用js函数 参数1:js函数名称 参数2:向js函数传递的参数 ExternalInterface.call("hello", "jacky"); //允许js调用flash中的函数 参数1:要调用flash函数的js函数,参数2:被调用flash函数 ExternalInterface.addCallback("helloas",hello); import flash.external.ExternalInterface;
function hello(){
return "测试成功了哦~~";
}
//允许flash调用js函数 参数1:js函数名称 参数2:向js函数传递的参数
ExternalInterface.call("hello", "jacky");
//允许js调用flash中的函数 参数1:要调用flash函数的js函数,参数2:被调用flash函数
ExternalInterface.addCallback("helloas",hello);
接下来是 JSP页面
把你生成SWF 文件放入工程相应的目录下 把路径自己的路径就可以了
当然
Java代码
测试
function callfromFlash() {
alert("11")
var a=thisMovie("test").helloas();
alert(a);
}
function hello(v)
{
alert(v) ;
}
//thisMoivie 参数:是swf文件 的id
function thisMovie(movieName) {
if (navigator.appName.indexOf("Microsoft")
相关文档:
scrollHeight: 获取对象的滚动高度。
scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离
scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离
scrollWidth:获取对象的滚动宽度
offsetHeight:获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的高度
offsetL ......
1. jQuery tablesorter
http://tablesorter.com/docs/
2. Table sorting with Prototype
http://tetlaw.id.au/view/blog/table-sorting-with-prototype/
3. Sorttable
http://www.kryogenix.org/code/browser/sorttable/
4. Table Sorting Javascript
http://yoast.com/articles/sortable-table/
5. Sorting Tabl ......
这个系列文章主要是讲述实现Javascript拖拽功能的基础知识,并将在最后给出一个完整的示例。适合对拖拽完全不懂的人阅读。
第一篇就先讲讲Javascript中的offsetParent属性吧。
支持的浏览器:Internet Explorer 4.0+,Mozilla 1.0+,Netscape 6.0+,Opera 7.0+,Safari ......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Wanna tell her - interactive DHTML </title>
<meta http-equiv="imagetoolbar" content="no">
<style type="text/css">
html {
overflow: h ......
<div id="ad" style="position:absolute">
<a href=http://hr.shyyw.com target="_blank">
<img src="http://hr.shyyw.com/index/img/logo.jpg" border="0">
</a></div>
<script>
var x = 50,y = 60
var xin = true, y ......