nowyvpsParticipantJune 4, 2012 at 7:45 pm #9306
OK, I have a project with audio/text sync and it works great. I also have it setup so that touching a word highlights the word and plays the audio. Also works great. What I'd like to do (and I understand this has to be done by hand) is that if I touch, for example, the image of a cat, the word “Cat” will be highlighted in the sentence I have set up in the audio sync layer. I'm trying different ways of calling the speakWord function in syncSound.lua, but haven't been successful, in large part due to the fact that I am incredibly new to lua and corona. Can any one point me in the right direction? Is this even possible?AnonymousInactiveJune 4, 2012 at 8:36 pm #12172
First of all, you are using a non-supported feature (word highlight). Don't be mad on me here but, the current code is not tested/certified in Kwik 1.x and is there for “future use only”. Saying that, I wouldn't considered you a “incredibly new to lua and corona” guy as NOBODY till now have noticed it, meaning you needed to sniff and find how to enable it by yourself 🙂Current code does not allow you to do that because it gets the word index (reference) while building the text paragraph (displayText function). If you try to call the speakWord function directly (even sending the word index - I tried that), it will return an error, because the function needs the full table created for each word.However, you could "trick" it easily with some button actions:1) create a layer for each word you want to highlight on top of the word used for the sync feature - for example, the word cat;2) hide the layer with the word "cat";3) to the cat image, add a button and create a shuffle action, setting the first option to show layer word cat and play the sound "cat.mp3" and the second option to hide layer word cat;nowyvpsParticipantJune 5, 2012 at 12:00 am #12173
Hi Alex,Thanks for the quick reply, and the compliment 🙂Our ebook is leaning towards "learning to read" so the touch word feature is perfect, and I understand it's unsupported, so no problem there. Your suggestion of hiding layers is great, I'll do that. I'm already using something similar to do some light up effects. As long as what I get is the "effect" of the word being highlighted that's all I care about.Cheers
The forum ‘Most Common Questions’ is closed to new topics and replies.