Hello,
I got a problem with one of my functions. I am using audio in this function and the onComplete option.
When someone answers a question an audiofile plays that says good job or sorry wrong answer. I use onComplete to go to the next question.
The thing is if I exit the scene before the audio finishes, it still wants to go to the function I told it to go to when it finishes.
The problem is the function creates an image and it inserts the image in a group.
Somehow, the function gets called the image does not get created (storyboard clears all the display objects for you when you exit the scene) But it still wants to insert the image in the group. Which is not possible cause it has been removed.
But leaving the page before the audio ends gives this error
bad argument #-1 to ‘_newImageRect’ (Proxy expected, got nil)
Thuis is what I do.
questions[1] = {question = "pics/appel.png", answer = Aa,audioFile="audio/a.aac"}
theQuestion=questions[i].question
uppercaseLetter=display.newImageRect(group,theQuestion,241,256)
Any ideas?
What I do now is just disable the exit button so people can’t leave the page before the audio finishes. But that is crude. [import]uid: 100901 topic_id: 23052 reply_id: 323052[/import]
[import]uid: 100901 topic_id: 23052 reply_id: 94487[/import]