Discussion Forums  >  Uncategorized

Replies: 3    Views: 331

Mackimack
Apple Fan
Profile
Posts: 481
Reg: Dec 30, 2010
Sweden
14,310
06/16/11 11:25 PM (14 years ago)

Sound question for Quiz!

HI David. I Want to do a music intro quiz app. So I wonder if its possible to load a mp3 file for each questions. The mp3 file is very small.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
06/17/11 12:08 AM (14 years ago)
Ahhh....great idea. Experiement with something like this...re-post if this makes no sense... a) Drag your sound files in xcode b) run the quiz questions from your website so you can add a new element to the question object. Question, Correct, Wrong1, Wrong2, Wronge3, Image, SOUND EFFECT c) Pre-load the sound files when the app lauches so they are fast to play d) Modify the quiz screen to play the sound effect when the question loads. I don't remember your skill level. Spend some time looking at the quiz screen and you'll see where each question object is used to print the text, show the image, etc. This is where you'll pull the soundEffectFileName from the JSON data you provide. You'll then use appDelegate.playSoundEffect (can't remember the name, look for the method) when the quesiton transitions. Have a look at your appDelegate.m file to see where the audio sound effects are being preloaded. Add yours there. Have a look at the handleTapToLoadScreen method in BT_viewConrollerManager, it plays a sound effect if the button tapped uses one. This will show you how to play your sound in your quiz file. This could be cool!
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
12/24/11 01:42 PM (14 years ago)
Hi Mackimack, did you ever implement this? Thanks :)
 
Mackimack
Apple Fan
Profile
Posts: 481
Reg: Dec 30, 2010
Sweden
14,310
like
12/25/11 07:51 AM (14 years ago)
Hi ian. No I have not started yet. I was going to fix it now when I use bt 2.0 server. I think it will be easier to fix a plugin for this. I know that the quiz plugin is not available yet for BT 2.0, but all code is ready for 1.5 so you have to use copy-paste. :)
 

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.