Original Pictures Play Class: Imagelide.iclass.js

xiaoxiao2021-03-05  35

See this: http://www.iecn.net/IClass/JS/ImagesLide/ Open, right, view the source code to see the example of the call.

The source code is as follows: / ** * =========================================== ============================== * This program can be free to copy, modify, dissemble, and may not delete the following information. If used for commercial purposes, it must be used by the original author. * =========================================================================================================================================================================================== ================================== * Program Name: ForceWindow (@ iClass.js) * Description: Picture slides on the web page. * Version: 1.0.0 * Created: April 23, 2005 * Modified: April 23, 2005 * Author: * bell bell-mail address: zhong@iecn.net * Disclaimer: This program is part of iClass.JS , Copyright is owned by the author. * Discussion address: http://www.iecn.net/forum/showthread.php? Threadid = 16975 * About ICLASS plans See: http://www.iecn.net/forum/showthread.php? ThreadId = 14811 * ============================================================================================================================================================================================================= =============================== * /

// Construct ImageLide class Function imageSlide () {if ((/ msie / s * [5-9] /). Test (navigator.appversion)) {this.count = 0; this.timer = null; this.first = New Object (); this.frms = new array (); this.imgs = new array (); this.width = 640; this.height = 480; this.boxid = "imageSlideBox"; this.delay = 5; this .autoplay = true; this.transform = 23; / ** * Play switching effect description * -------------- * 0. Rectangular reduction * 1. Rectangular expansion * 2. Radiation reduction * 3. Round expansion * 4. From bottom to * 5. From top to bottom * 6. From left to right * 7. From right to left * 8. Vertical shutters * 9. 百 窗 * 10. Map horizontal doors * 11. Dispatch vertical shutters * 12. Point spread * 13. Both sides to the middle * 14. Mid to both sides * 15. Middle-to-bottom * 16. Up to the middle * 17. Right to top left * 18. Right to top left * 19 To the left to the right * 20. Left to the right * 21. Horizontal * 22. Vertical bar * 23. Random * ------------- * /} else {alert ("please use The browser of IE5 or IE5 or later uses this program! ");}}

// Add one or more pictures (incoming one or more picture paths) // pushimg (spath1 [, spath2 [, spath3 [, ...]]) imageslide.prototype.pushimgs = function () {for (VAR i = 0; I

// Set the image playback container long width imageslide.Prototype.setsize = function (nwidth, nHEight) {this.width = nwidth; hHEight = nHEight;

/ / Set image playback container IDIMAGESLIDE.PROTYPE.SETBOXID = function (sboxid) {this.boxid = SBOXID;

// Set whether it is automatically playing imageslide.prototype.setautoplay = function (bautoplay) {this.autoplay = bautoplay;

/ / Set the time of automatic playback seconds imagelide.prototype.setdeLay = function (nseconds) {this.delay = nseconds;}

/ / Set the switching effect (0-23 integer) ImageLide.Prototype.SetTransform = function (ntransform) {this.transform = ntransform;}

// Display imagelide.prototype.display = function () {var boxstr = "

= 23) var transform = math.floor (math.random () * 23); BoxStr = "

// Play ImageSlide.prototype.play = function () {if (window.imageSlide.imgs.length) {window.imageSlide.first.style.display = "none"; if (window.imageSlide.count> = window.imageSlide .imgs.Length) {Alert ("Play!"); window.displand-1] .style.display = "none"; window.imageslide.first.Style.display = "Block "; Window.imageslide.first.innerhtml ="
Click here to play again! "; ClearInterval (Window.ImageSlide.timer; window.imageslide.count = 0;} else if (Window.imageSlide.count) == 0) {WINDOW.IMAGESLIDE.FIRST.Style.Display = "none"; window.imageslide.frms [0] .filters [0] .apply (); window.imageslide.frms [0] .style.display = "block"; window.imageslide.frms [0] .filters [0] .play ();} else {window.imageslide.frms [window.imageslide.count-1] .style.display = "none"; window. imageSlide.frms [window.imageSlide.count] .filters [0] .apply (); window.imageSlide.frms [window.imageSlide.count] .style.display = "block"; window.imageSlide.frms [window.imageSlide .count]. Filters [0] .play (); window.imageslide.count ;} else} else {Alert ("You didn't play any picture, you can't play! ");}} // Continuous play imagelide.prototype.timerplay = function () {this.timer = setInterval (this.play, this.delay * 1000);}

/ / Instantiate an ImageSlide object Imageslide and make it as a child object for a Window object, WINDOW.IMAGESLIDE = New iMageSlide

转载请注明原文地址:https://www.9cbs.com/read-32447.html

New Post(0)