by Clifton » Thu Oct 09, 2014 4:19 pm
If you look closely at the method, you can use the exact same code for every page and every question in your book. Never make a modification, just let the code decide which clip to play. Your only concern would be to create the clips. If you only have a correct and incorrect clip, then skip the (name of page) part of the concatenation and just use ...
url_playList = score & ".mp3"
Depending on the score of the question, this concatenation will resolve to either:
url_playList = "correct.mp3"
url_playList = "incorrect.mp3"
Just extend the code to include your path to the sounds folder and you've got everything you need to million questions.
url_playList = "../sounds/" & score & ".mp3"
The actions editor has permitted concatenation for a long time so we are not really doing anything new, just taking what's been around for a while and making it do some very productive things. If you send a single page of your quiz, I will mock it up so you can see how incredibly easy this is.
Think of the ampersand as glue that is used to stick together multiple strings or variables that contain strings.