nereidFade.js
资源名称:JSP-OA.rar [点击查看]
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:1k
源码类别:
Jsp/Servlet
开发平台:
Java
- // Flash Image Extension for Dreamwever ,by Yichun Yuan(dezone@sina.com)
- nereidFadeObjects = new Object();
- nereidFadeTimers = new Object();
- function nereidFade(object, destOp, rate, delta){
- if (!document.all)
- return
- if (object != "[object]"){ //do this so I can take a string too
- setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
- return;
- }
- clearTimeout(nereidFadeTimers[object.sourceIndex]);
- diff = destOp-object.filters.alpha.opacity;
- direction = 1;
- if (object.filters.alpha.opacity > destOp){
- direction = -1;
- }
- delta=Math.min(direction*diff,delta);
- object.filters.alpha.opacity+=direction*delta;
- if (object.filters.alpha.opacity != destOp){
- nereidFadeObjects[object.sourceIndex]=object;
- nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
- }
- }