How to play a sound and then move to the next screen?

Hi guys,

I'm working with Director, and I'm trying to achieve the following:

"Screen1" is basically a background pic and a sound that plays automatically. When the sound ends, I want to go to "screen2".

I have:

media.playSound("sound1.mp3")

what do I need to add to trigger the screen switch?

See here; http://developer.anscamobile.com/reference/index/mediaplaysound

You'd use and onComplete function you had already written, eg;

1
2
3
local function changeScene()
  director:changeScene("filename here, without .lua extension")
end

Great help, thanks!

views:1377 update:2011/10/22 9:46:13
corona forums © 2003-2011