[Dojo-interest] Slideshow Wish List

Karl Tiedt ktiedt at gmail.com
Mon Dec 18 17:32:29 MST 2006


Matthieu,
    Here's that example I thought may help you. What this does is create a
slideShow widget, and define a list of vars with various image lists to use
for the SlideShow, and based on a <SELECT> box, it changes the image set on
the fly... it also has a "speed" toggle button that will adjust the speed
from speed A to B on the fly as well.

Hope this gives you some insight into your problem.

-Karl

<html>
<head>
<script type="text/javascript"> var djConfig = {isDebug: true}; </script>
<script type="text/javascript" src="dojo/dojo.js"></script>
<script language="JavaScript" type="text/javascript">
	dojo.require("dojo.widget.SlideShow");
	slide = null;
	toggle = null;
	changeShow = null;
	function toggleSpeed() {
		if (slide.transitionInterval == 0) {
			toggle.value = "slower";
			slide.transitionInterval = .2;
		} else {
			toggle.value = "faster";
			slide.transitionInterval = 0;
		}
	}
	function selectShow(showName) {
		if(showName == "ants"){
			slide.imgUrlBase=slide.showP1;
			slide.imgUrls=slide.show1;
		}else if(showName=="marching"){
			slide.imgUrlBase=slide.showP2;
			slide.imgUrls=slide.show2;
		}else if(showName=="forrest"){
			slide.imgUrlBase=slide.showP3;
			slide.imgUrls=slide.show3
		}else if(showName=="thehorse"){
			slide.imgUrlBase=slide.showP4;
			slide.imgUrls=slide.show4;
		}
		slide.urlsIdx = 0;
/*		if(slide.imgUrls.length>1){
			slide.img2.src = slide.imgUrlBase+slide.imgUrls[slide.urlsIdx++];
			slide.endTransition();
		}else{
			slide.img1.src = slide.imgUrlBase+slide.imgUrls[slide.urlsIdx++];
		}
 */
	}

	function init() {
		slide = dojo.widget.byId("slide");
		toggle = dojo.byId("toggleSpeed");
		changeShow = dojo.byId("changeShow");
		dojo.event.connect(toggle, "onclick", toggleSpeed);
		dojo.event.connect(changeShow, "onchange", function() {
selectShow(changeShow.value); });
	}
	dojo.addOnLoad(init);
</script>
</head>
<body>
<div class="mainPage">
  <p class="mainTitle">607<span class="superscript">th</span> CBCS in
action!</p>
<img 	id="slide"
	dojoType="SlideShow"
	imgUrlBase="images/ants/"
	imgUrls="ants1.jpg;ants2.jpg;ants3.jpg;ants4.jpg;ants5.jpg;ants6.jpg;ants7.jpg;ants8.jpg;ants9.jpg;ants10.jpg;ants11.jpg;ants12.jpg;ants13.jpg;ants14.jpg;ants15.jpg;ants16.jpg;ants17.jpg;ants18.jpg;ants19.jpg;ants20.jpg;ants21.jpg;ants22.jpg;ants23.jpg;ants24.jpg;ants25.jpg;ants26.jpg;ants27.jpg;ants28.jpg;ants29.jpg;ants30.jpg;ants31.jpg;ants32.jpg;ants33.jpg;ants34.jpg;ants35.jpg;ants36.jpg;ants37.jpg;ants38.jpg;ants39.jpg;ants40.jpg;ants41.jpg;ants42.jpg;ants43.jpg;ants44.jpg;ants45.jpg;ants46.jpg;ants47.jpg;ants48.jpg;ants49.jpg;ants50.jpg;ants51.jpg;ants52.jpg;ants53.jpg;ants54.jpg;ants55.jpg;ants56.jpg;ants57.jpg;ants58.jpg;ants59.jpg;ants60.jpg;ants61.jpg;ants62.jpg;ants63.jpg;ants64.jpg;ants65.jpg;ants66.jpg;ants67.jpg;ants68.jpg;ants69.jpg;ants70.jpg;ants71.jpg;ants72.jpg;ants73.jpg;ants74.jpg;ants75.jpg;ants76.jpg;ants77.jpg;ants78.jpg;ants79.jpg;ants80.jpg;ants81.jpg;ants82.jpg;ants83.jpg;ants84.jpg;ants85.jpg;ants86.jpg;ants87.jpg;ants88.jpg;ants89.jpg;ants90.jpg;ants91.jpg;ants92.jpg;ants93.jpg;ants94.jpg;ants95.jpg;ants96.jpg;ants97.jpg;ants98.jpg;ants99.jpg"
	showP2="images/marching/"
	show2="march1.JPG;march2.JPG;march3.JPG;march4.JPG;march5.JPG;march6.JPG;march7.JPG;march8.JPG;march9.JPG;march10.JPG;march11.JPG;march12.JPG;march13.JPG;march14.JPG;march15.JPG;march16.JPG;march17.JPG;march18.JPG;march19.JPG;march20.JPG;march21.JPG;march22.JPG;march23.JPG;march24.JPG;march25.JPG;march26.JPG;march27.JPG;march28.JPG;march29.JPG;march30.JPG;march31.JPG;march32.JPG;march33.JPG;march34.JPG"
	showP3="images/hickey/"
	show3="1.jpg;2.jpg;3.jpg;4.jpg;5.jpg;6.jpg;7.jpg;8.jpg;9.jpg;10.jpg;11.jpg"
	showP4="images/group/"
	show4="group1.JPG;group2.JPG;group3.JPG;group4.JPG;group5.JPG;group6.JPG;group7.JPG;group8.JPG;group9.JPG;group10.JPG;group11.JPG;group12.JPG;group13.JPG;group14.JPG;group15.JPG;group16.JPG;group17.JPG;group18.JPG;group19.JPG;group20.JPG;group21.JPG;group22.JPG;group23.JPG;group24.JPG;group25.JPG;group26.JPG;group27.JPG;group28.JPG;group29.JPG;group30.JPG;group31.JPG;group32.JPG;group33.JPG;group34.JPG;group35.JPG;group36.JPG;group37.JPG;group38.JPG;group39.JPG;group40.JPG;group41.JPG;group42.JPG;group43.JPG;group44.JPG;group45.JPG;group46.JPG;group47.JPG;group48.JPG;group49.JPG;group50.JPG;group51.JPG;group52.JPG;group53.JPG;group54.JPG;group55.JPG;group56.JPG;group57.JPG;group58.JPG;group59.JPG;group60.JPG;group61.JPG;group62.JPG;group63.JPG;group64.JPG;group65.JPG;group66.JPG;group67.JPG;group68.JPG;group69.JPG;group70.JPG;group71.JPG;group72.JPG;group73.JPG;group74.JPG;group75.JPG;group76.JPG;group77.JPG;group78.JPG;group79.JPG;group80.JPG;group81.JPG;group82.JPG;group83.JPG;group84.JPG;group85.JPG;group86.JPG;group87.JPG;group88.JPG;group89.JPG;group90.JPG;group91.JPG;group92.JPG;group93.JPG;group94.JPG;group95.JPG;group96.JPG;group97.JPG;group98.JPG;group99.JPG;group100.JPG;group101.JPG;group102.JPG;group103.JPG;group104.JPG;group105.JPG;group106.JPG;group107.JPG;group108.JPG;group109.JPG;group110.JPG;group111.JPG;group112.JPG;group113.JPG;group114.JPG;group115.JPG;group116.JPG;group117.JPG;group118.JPG;group119.JPG;group120.JPG;group121.JPG;group122.JPG;group123.JPG;group124.JPG;group125.JPG;group126.JPG;group127.JPG;group128.JPG;group129.JPG;group130.JPG;group131.JPG;group132.JPG;group133.JPG;group134.JPG;group135.JPG;group136.JPG;group137.JPG;group138.JPG;group139.JPG;group140.JPG;group141.JPG;group142.JPG"
	transitionInterval="0"
	delay="1000"
	src="images/ants/ants1.jpg"
	imgWidth="448" imgHeight="298" />
<button id="toggleSpeed">faster</button> Choose a slide show: <select
id="changeShow">
<option value="ants">One line!</option>
<option value="marching">Loyalty Day flight</option>
<option value="forrest">Charging the Hill</option>
<option value="thehorse">607th 'takes' the Horse</option>
</select>
</div>
</body>



</html>



On 12/12/06, Matthieu Chardon <matthieuchardon at yahoo.com> wrote:
>
> Hello Karl,
>
> I just posted a similar request online...i feel like an idiot.
> Anyway have you come up with any solutions to the requests yet?
>
> Matt
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> Dojo-interest at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>



-- 
-Karl Tiedt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dojotoolkit.org/pipermail/dojo-interest/attachments/20061218/c4f9a863/attachment.html


More information about the Dojo-interest mailing list