Kamis, 01 Desember 2011

Creating a slideshow with Javascript and HTML


     How to create a photo album slideshow with javascript and HTML. Here is one example of a script that can be used to display your collection of photos on the blog in a slideshow. If you do not know much about javascript and HTML, just look at the section marked with a red and blue only. In the section marked with red is the name and the url of the image you want to show. In this section you can add pictures as you please, but the format as shown, do not use any other format.


theimage [0] = ["Twitter", "http://i1123.photobucket.com/albums/l559/porezer1/th_twitter.jpg"];Ket:[0] = Number Photos"Twitter" = Name Photo"Http://i1123.photobucket.com/albums/l559/porezer1/th_twitter.jpg" = URL Photos YouSo, if you want to add a picture, just add a new line below it like this:theimage [1] = ["Photo Name", "Photo URL"]; 

And so on ...In the blue section is used to set the width and height of the photo album slideshow that you want to show. Its size should be adjusted to the size of the template or widgets from your blog. You only replace the numbers listed.Here's the full script how to create a photo album slideshow with javascript and HTML: 
/ / <! - [CDATA [theimage = new Array ();theimage [0] = ["Twitter", "http://i1123.photobucket.com/albums/l559/porezer1/th_twitter.jpg"];playspeed = 3000;dotrans = 1;transtype = 'blendTrans';transattributes = 'duration = 1, transition = 23?;randomorder = 1;playdiffernce = 500;autostart = 0;preloadslides = 1;makeRandom function () {tempimage = new Array ();for (p = 0, p-1; P1) {tempNum = Math.floor (Math.random () * theimage.length)if (! tempimage [tempNum]) {tempimage [tempNum] = theimage [p]; break}}}for (p = 0; ptempimage [p]}if (randomorder == 1) makeRandom ()preloadSlide function () {for (k = 0; kMy PhotoSlideshow/ / <! - [CDATA [document.write ('')/ /]]>/ / <! - [CDATA [for (y = 0; y<</ / <Play / Stop>>>
/ / <! - [CDATA [with (document) {i = 0, play = 0, in = images, dl = links, form = slideshow, til = theimage.length}slideImage function (num) {i = num% til; if (i

Tidak ada komentar:

Posting Komentar