|
Structure shufflingHi everybody, I am facing a rather simple project where i must create a slideshow in random order. The main goal is being able to shuffle the structure so that every picture is displayed once in the directory loop. Using a random patch the same picture sometimes get picked up twice in a row. There are two solutions for generating a shuffled plist file and use it incrementally to select the source image: 1/ with a database software (easy for me but a pain in the long run) 2/ or dynamically from within QC by shuffling the structure Not worth mentioning the second solution is the right one, but unfortunately i don't know enough javascript to make it by myself. I'd be very glad to get some help on this one… Thanks!
|
People don't seem to write your JS code for you on this site I've found. So you have to persevere like me until it sinks in a bit ;).
Make use of Cybero's JavaScript Guide
I've struggled with JS so out of compassion here is some pseudo-code. Have a go its the only way you'll learn and JS is so useful in QC.
I'll post some hints/code in a few hours if your still struggling.
Thank you usefuldesign,
I know my demand was a bit pushy, slightly overworked in here :)
A friend pointed me to this page as well http://www.javascriptkit.com/javatutors/arraysort.shtml
… and yes, i am definetely having a go at JS as soon as pressure releases the grip …
Once my composition works i'll drop it here, since it's a very general concept and can be useful to anyone.
thanks for your reply!
I've done the comp to make sure, most of the time was in the debugging (nothing new there), I'll post when you have!
As for the randomising method, it's not first class but is a basic start. See Yanamano's recent thread about rand seed generation for more ideas.
He's comp with script.
First time here in months!
Worked so much i couldn't catch up with what happened in the QC world, so it's only this morning that I find your helpful comp!
Sorry for not having said thanks before! I'll study it now :)