Copy link to clipboard
Copied
I want to build a slideshow in which the program cycles thorugh a display of photos (with a delay after each) using pointers in a database and then repeats. A repeating slideshow.
I can get the photos up from the database, even pulling up a random slide based on a keyword in the database.How, however, do I set up the loops or whiltes to get a slideshow? I have an old CF with Dreamweaver MX.
Copy link to clipboard
Copied
With old school tecnologies, I would create CFML to query the database and display a picture each time the page is requested.
I would then create a JavaScript timer to rerequest the page after a set time after the page is rendered in the browser.
With new school technologies you could do this with Flex or Air (Flash) and Flash Remoting which would allow ColdFusion to push new pictuers to the client on a given schedule, but this option is beyond the scope of a single forum post.
Copy link to clipboard
Copied
Thanks. Yes, I thought of using Flash but at a simpler level.
I've done Flash slideshows with pictures, pulling up each picture in turn on the time line and with fades between them. No database. I wasn't too keen on that as if I added pictures I would have to edit the movie. That approach using the database means mixing cold fusion into the movie - which I haven't tried before. If it works, I could expand the database and Flash would to know that. Looks like you are refrencing some tools I might be able to use to incorporate the cold fusion into flash. Is that right?
Copy link to clipboard
Copied
Yes Flash Remoting is a technology Adobe nee Macromedia provides that allows a Flash front end to talk to a back end server for streaming data. Flash Remoting is baked into ColdFusion, but it can be used with any common application server.
There is also the Flex MXML language that is a programming language to make Flash interfaces. It was created for us programmer types who don't have designer genes that really grok the original timeline based methodology of the orginal Flash syntax. Flex allows one to easily build an event based Flash interface. The Flex SDK and Compiler are free, but if you want the fully featured Flex Builder IDE, it costs some money.
Air is a newer tecnology to take these Flex|Flash interfaces out of the browser and compile them into stand-alone desktop applications with all the the server-client abilities of HTML, Flash, MXML and CFML skills we web developers already use.
Copy link to clipboard
Copied
If you can load all of your image pointers onto the page at once, your best bet is to go with a simple jQuery or custom javascript routine to randomly display and toggle a bunch of photos on your page. If you have a ton of photos, you could limit the number of records that your query returns.
jQuery is free and easy to use, and there are already a lot of plugins that do slideshows and that are easy to drop into your page. It's then a simple matter of usually inserting each image as an image tag onto your page, perhaps in a <div> tag, and letting jQuery do the rest, like showing just one photo at a time and randomly transitioning them into view. If you google "jquery photo slideshow", you'll get lots of results back for doing this kind of thing, and best yet, it doesn't matter which version of ColdFusion you have in this case.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now