x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
Slideshow.js - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\tmp4677415525\Leona\Scripts\Widgets\Slideshow\Slideshow.js
旋转
特效
属性
历史版本
// // iWeb - Slideshow.js // Copyright (c) 2007 Apple Inc. All rights reserved. // function SlideshowGlue(instanceID) {if(instanceID!=null) {Widget.apply(this,arguments);this.mInstanceID=instanceID;this.updateFromPreferences();}} SlideshowGlue.prototype=new Widget();SlideshowGlue.prototype.constructor=SlideshowGlue;SlideshowGlue.prototype.widgetIdentifier="com-apple-iweb-widget-slideshow";SlideshowGlue.prototype.onload=function() {} SlideshowGlue.prototype.onunload=function() {} SlideshowGlue.prototype.loadFromStream=function(mediaStream) {if(this.p_enabled()) {if(this.runningInApp) {var slideshowDiv=this.getElementById("slideshow_placeholder");slideshowDiv.onmouseover=function() {mediaStream.load(this.p_baseURL(),this.onStreamLoad.bind(this));}.bind(this);} else {mediaStream.load(this.p_baseURL(),this.onStreamLoad.bind(this));}} else {}} SlideshowGlue.prototype.onStreamLoad=function(imageStream) {var slideshowDiv=this.getElementById("slideshow_placeholder");if(this.mSlideshow!=null) {this.mSlideshow.pause();slideshowDiv.innerHTML="";} var skipStride=0;var nextToSkip=999999999;var transitionIndex=this.p_transitionIndex();var scrub=(transitionIndex==255);if(scrub) {var numberToSkip=imageStream.length-50;if(numberToSkip>0) {skipStride=imageStream.length/numberToSkip;nextToSkip=0;}} var photos=[];var imageType=this.p_imageType();for(var i=0;i
nextToSkip) {nextToSkip+=skipStride;} else {photos.push(imageStream[i].slideshowValue(imageType));}} var options={backgroundColor:this.p_backgroundColor(),scaleMode:this.p_scaleMode(),movieMode:this.p_movieMode(),shouldTighten:false};this.mSlideshow=new Slideshow(slideshowDiv,photos,function(){},options);if(scrub) {this.mSlideshow.setTransitionIndex(1,0);} else {this.mSlideshow.setTransitionIndex(transitionIndex,0);} this.mSlideshow.pause();this.mSlideshow.photoDuration=this.p_photoDuration();var startIndex=this.p_startIndex();if(startIndex>=imageStream.length) {startIndex=0;} this.mSlideshow.showPhotoNumber(startIndex);if(this.runningInApp) {window.onresize=function() {this.p_onResize();}.bind(this)} if(scrub) {var heightPct="100%";for(var i=0;i
0) {mediaStream=eval(mediaStreamCode);}}} return mediaStream;} SlideshowGlue.prototype.p_backgroundColor=function() {var backgroundColor=null;if(this.preferences) {backgroundColor=this.preferenceForKey("color");} if(backgroundColor===undefined) {backgroundColor="black";} return backgroundColor;} SlideshowGlue.prototype.p_baseURL=function() {return this.preferenceForKey("baseURL");} SlideshowGlue.prototype.p_enabled=function() {var enabled=null;if(this.preferences) {enabled=this.preferenceForKey("slideshowEnabled");} if(enabled===undefined) {enabled=false;} return enabled;} SlideshowGlue.prototype.p_fadeIn=function() {var fadeIn=null;if(this.preferences) {fadeIn=this.preferenceForKey("fadeIn");} if(fadeIn===undefined) {fadeIn=false;} return fadeIn;} SlideshowGlue.prototype.p_showOnMouseOver=function() {var showOnMouseOver=null;if(this.preferences) {showOnMouseOver=this.preferenceForKey("showOnMouseOver");} if(showOnMouseOver===null||showOnMouseOver==undefined) {showOnMouseOver=false;} return showOnMouseOver;} SlideshowGlue.prototype.p_photoDuration=function() {var photoDuration=null;if(this.preferences) {photoDuration=this.preferenceForKey("photoDuration")*1000;} if(photoDuration===null) {photoDuration=5000;} return photoDuration;} SlideshowGlue.prototype.p_startIndex=function() {var startIndex=null;if(this.preferences) {startIndex=this.preferenceForKey("startIndex");} if(startIndex===undefined) {startIndex=0;} return startIndex;} SlideshowGlue.prototype.p_scaleMode=function() {var scaleMode=null;if(this.preferences) {scaleMode=this.preferenceForKey("scaleMode");} if(scaleMode===undefined) {scaleMode="fit";} return scaleMode;} SlideshowGlue.prototype.p_transitionIndex=function() {var transitionIndex=null;if(this.preferences) {transitionIndex=this.preferenceForKey("transitionIndex");} if(transitionIndex===undefined) {transitionIndex=0;} return transitionIndex;} SlideshowGlue.prototype.p_imageType=function() {var imageType=null;if(this.preferences) {imageType=this.preferenceForKey("imageType");} if(imageType===null||imageType==undefined) {imageType="image";} return imageType;} SlideshowGlue.prototype.p_movieMode=function() {var movieMode=null;if(this.preferences) {movieMode=this.preferenceForKey("movieMode");} if(movieMode===null||movieMode==undefined) {movieMode=kShowMovie;} return movieMode;} SlideshowGlue.prototype.p_startSlideshow=function(slideshowDiv) {if(this.mSlideshow&&this.p_enabled()) {if(this.p_fadeIn()) {var self=this;var startOpacity=slideshowDiv.getStyle("opacity");if(this.mFadeAnimation) {this.mFadeAnimation.stop();} this.mFadeAnimation=new SimpleAnimation(function() {delete self.mFadeAnimation;self.mSlideshow.resume();});this.mFadeAnimation.pre=function() {IWSetDivOpacity(slideshowDiv,startOpacity);} this.mFadeAnimation.post=function() {IWSetDivOpacity(slideshowDiv,1.0);} this.mFadeAnimation.update=function(now) {IWSetDivOpacity(slideshowDiv,startOpacity+now*(1.0-startOpacity));} this.mFadeAnimation.start();} else {this.mSlideshow.resume();}}} SlideshowGlue.prototype.p_pauseSlideshow=function(slideshowDiv) {if(this.mSlideshow) {this.mSlideshow.pause();if(this.p_fadeIn()) {var startOpacity=slideshowDiv.getStyle("opacity");if(this.mFadeAnimation) {this.mFadeAnimation.stop();} var self=this;this.mFadeAnimation=new SimpleAnimation(function() {delete self.mFadeAnimation;var startIndex=self.p_startIndex();if(self.mSlideshow.currentPhotoNumber==startIndex-1&&startIndex
Slideshow.js
网页地址
文件地址
上一页 1/1 下一页
下载
( 9 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.