Actually, here's the entire functionality I'm trying to bring together: - one directory has list of images - another directory has a list of .mp3 files
The goal is to create a self-generating slide-show, with audio. Each mp3 file will be played for each (currently, but could be more than one, eventually) slide. These slide shows have to be "self-generating", meaning, when the URL is visited, the slide show will be composed and play based on what the code finds in a pair of directories that contain corresponding images and mp3 files. e.g.... - slide one show and mp3 one plays - slide two transitions in and mp3 two begins to play etc.... I've just about got this worked out, I think. (In my mind, at least... ;o) I'm just trying to figure out how to change the jQuery line that plays back each mp3. Manipulating jQuery on the fly is tricky. The only way I've done it so far is to use a CFC method that generates the desired HTML & JS, saves it to a variable via cfsavecontent and then use jQuery to inject all of that back into the DOM with the new hard-coded values. Also, since this necessarily involves server-side variables and client-side variables, it seems I'll have to turn back to a CFC method to generate (at least the jQuery play.sound command line) outside the DOM, then reinsert it. Make sense? -----Original Message----- From: Carl Von Stetten [mailto:[email protected]] Sent: Wednesday, June 08, 2011 2:41 PM To: cf-talk Subject: Re: How to do this with CF and JS? Are you trying to queue the sound tracks up to play one after the other? On 6/8/2011 10:25 AM, Rick Faircloth wrote: > To be clearer, everything works fine, except for the fact > that nothing loops. I get the first sound track, "soundTrack01.mp3", > played once, and then everything stops. > > Re-writing the JS into the DOM with every iteration is the > only other possibility I can think of which will allow the > JS to be re-initialized with each loop. > > > -----Original Message----- > From: Scott Stewart [mailto:[email protected]] > Sent: Wednesday, June 08, 2011 1:17 PM > To: cf-talk > Subject: Re: How to do this with CF and JS? > > > this doesn't work? > >> <cfset myList = "soundTrack01.mp3,soundTrack02.mp3,soundTrack03.mp3"> >> >> <cfset listPosition = 1 /> >> >> <cfloop list="myList" index="listElement"> >> >> >> >> <script> >> <cfoutput> >> $.sound.play('#myList.name[listPosition]#'); > </cfoutput> > >> </script> >> >> > >> <cfset listPosition = listPosition + 1 /> >> >> </cfloop> >> > On Wed, Jun 8, 2011 at 1:08 PM, Rick Faircloth<[email protected]> > wrote: >> Ok... since this won't work... >> >> <cfset myList = "soundTrack01.mp3,soundTrack02.mp3,soundTrack03.mp3"> >> >> <cfset listPosition = 1 /> >> >> <cfloop list="myList" index="listElement"> >> >> <cfoutput> >> >> <script> >> >> $.sound.play('#myList.name[listPosition]#'); >> >> </script> >> >> </cfoutput> >> >> <cfset listPosition = listPosition + 1 /> >> >> </cfloop> >> >> >> ... because the javascript (jQuery) can't be looped inside the CF, >> how can I loop the jQuery play command and play through the list >> of mp3's ??? >> >> Thanks for any feedback! >> >> Rick >> >> >> >> >> >> > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345129 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

