Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 15    Views: 74

maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
09/28/14 04:01 PM (9 years ago)

Interactive quiz SoundEffects

Could anyone tell me how to add sound effects for "correct" and "incorrect" answers? I know I can't upload them to buzztouch.com control panel so is there a way to customize this from Xcode? Thanks!
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/28/14 08:09 PM (9 years ago)
Well, "you" choose the sound effect you want to have played. So, assemble the sounds (mp3 files are the most dependable) that you're going to want to use in your project. For simplicity, I'll call them "right.mp3", "wrong.mp3" and "quizFinished.mp3". With your project OPEN in Xcode, "drag" the files into your "BT_Audio" directory. You'll know if it's correct when a dialog box pops up asking if you want to 'copy' them into the project. If you're adding files from a directory 'outside' the project, then check the box. If the files are "within" the project directory (and you will have added them there) then don't check the box. Once that is done, go to your Quiz Screen control panel and add those filenames to the section called "Quiz Scoring, Finish Options". If this doesn't work, and gives an error, then you probably also need to add the filenames to the list of sound effects in the app. Around line 400 of the "BT_loadConfigDataViewController.m" file you see a listing of sound effects. By default there is usually just "BT_glass.mp3" and "BT_funk.mp3". copy and paste those lines, and replace the filenames with YOUR filenames (right.mp3, etc). Do not remove the code or default audio files from the project, until you understand it a bit more and are comfortable with editing them out. Hope this helps, but if you run into an issue give us a shout. Cheers! -- Smug
 
maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
like
09/29/14 06:52 AM (9 years ago)
Thank you. I give it a try this week. Is there an issue with updates? Trying to change font/button colors plus add new questions and its not updating in Xcode. Thanks for the help!
 
maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
like
09/29/14 06:58 AM (9 years ago)
Thank you. I give it a try this week. Is there an issue with updates? Trying to change font/button colors plus add new questions and its not updating in Xcode. Thanks for the help!
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/29/14 07:20 AM (9 years ago)
I'm not certain, to be honest. I used the quiz in an old BTv2 project, but haven't worked with it much in BTv3... 'yet'. I do have something coming up that will probably utilize it, but I might use Nad's killer 'advanced quiz' instead, because it has a bit more flexibility. The easiest thing to do when searching for an answer, is to use google with custom parameters... in the search box, type: site:buzztouch.com/forum <your search terms> so, if you wanted to search for font colors, you could do something like: site:buzztouch.com/forum iOS7 quiz font color and see what pops up. Good luck, and let us know how it goes! Also, remember to 'leave' the page after a post. If you refresh without leaving the page, it double posts. Cheers! -- Smug
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
09/29/14 08:34 AM (9 years ago)
Hi maverick. I'm Android only but I'm sure the same principle applies in Xcode as it does Eclipse... Updating your control panel and clicking publish will update your app on your testing device. It won't update your xcode files. In order to update your Xcode files, you will either need to re-download the project, or more simply, copy your config file from the control panel and replace the one you currently have in Xcode. This ensures you have the latest config data in your project. iOS pros - tell me if I'm being silly.
 
maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
like
09/29/14 08:40 AM (9 years ago)
krompa, Thank you for your feedback. I am working on another app and it does update by changing in control panel and rebuilding in Xcode so no need to download the project again. The quiz plugin updated fine a while back so not sure what's up with it now. Will keep at it and see if I can figure it out. Thanks!
 
maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
like
09/29/14 08:40 AM (9 years ago)
Thanks Smug. I appreciate the help and will keep working on it. May have to go to advanced quiz.
 
maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
like
10/15/14 04:17 PM (9 years ago)
Ok, got the sound working for right and wrong. Can't get the "quiz finished" sound to work. Where can I change this in the project? Thanks!
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
10/15/14 06:34 PM (9 years ago)
If you're using the BT quiz, around line 1219 of the BT_Screen_quiz.m file, there is a instruction to play the 'wrong' sound effect, but it seems that 'you' will need to supply that sound effect. So find an MP3 file you want to use for the wrong answer, and similar to the other sound effects, add it to your project, ensure it's registered with the app, and specify it in your quiz control panel. Cheers! -- Smug
 
maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
like
10/15/14 06:41 PM (9 years ago)
Hey Smug. I got the "right" and "wrong" sounds to work. Its the "quiz finished" one I'm trying to fix. I have it added on the control panel and also added to the Xcode audio folder. I need to update the Xcode file though which I'm having trouble finding to do. Thanks!
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
10/15/14 07:39 PM (9 years ago)
well, it parses 'which' soundeffect to use at finish around line 1281 or so in BT_screen_quiz.m, but it gets those values from your control panel, and you'll still need to choose a sound effect and add it to the project... Cheers! -- Smug
 
maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
like
10/15/14 07:53 PM (9 years ago)
So in BT_screen_quiz.m, where would I add the name of the sound file? Does it go after the defaultValue in this part? (lines 1287-) if([[BT_strings getJsonPropertyValue:self.screenData.jsonVars nameOfProperty:@"quizSoundEffectFileNameFinished" defaultValue:@""] length] > 3){ [appDelegate playSoundEffect:[BT_strings getJsonPropertyValue:self.screenData.jsonVars nameOfProperty:@"quizSoundEffectFileNameFinished" defaultValue:@""]];
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
10/15/14 08:09 PM (9 years ago)
You would want to add the sound to your project (like all the other files, with a dialog box that pops up and gives you the option to copy it into your project), and then specify the filename in the Quiz control panel. Cheers! -- Smug
 
maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
like
10/21/14 12:04 PM (9 years ago)
Hey Smug. Got it to work. Another question if you are up to helping. The quiz seems to work fine in all the simulators in all IOS versions except the Ipad2 8.0. The quiz will function but when I get to the end and hit try again it freezes and gives the following error: Thread 1: signal SIGABRT libc++abi.dylib: terminating with uncaught exception of type NSException (lldb) I've rebooted computer and Xcode, cleaned project, reset simulator and still happening but only on ipad2 8.0. Any ideas?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
10/21/14 09:01 PM (9 years ago)
At the moment, I couldn't say... I'd start a new thread outlining your situation and the results you get; maybe one of the others have seen this. Did you check out the troubleshooting tips that Chris1 outlined in the 'how to' section? https://www.buzztouch.com/files/howtos/exception%20debugging%20how-to.pdf Good Luck! Cheers! -- Smug
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.