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")
相关文档:
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 ......
6、基于对象的JavaScript语言
JavaScript是基于对象的的语言,不像面向对象有抽象、继承、重载等有关面向对象的功能,但是它还是具有面向对象的基本特征,它可以根据需要创建自己的对象,从而进一步扩大JavaScript的应用范围,增强编写功能强大的Web文档。
对象的基础知识:
对象是由属性和方法两个基本元素组成。一个对 ......
这个系列文章主要是讲述实现Javascript拖拽功能的基础知识,并将在最后给出一个完整的示例。适合对拖拽完全不懂的人阅读。
第一篇就先讲讲Javascript中的offsetParent属性吧。
支持的浏览器:Internet Explorer 4.0+,Mozilla 1.0+,Netscape 6.0+,Opera 7.0+,Safari ......
效果图
代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Scrollable</title>
<mce:script type="text/javascript"><!--
resizeCallback = function() {
......
<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 ......