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?
[import]uid: 98287 topic_id: 16567 reply_id: 316567[/import]

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

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

[lua]local function changeScene()
director:changeScene(“filename here, without .lua extension”)
end[/lua]

Peach :slight_smile: [import]uid: 52491 topic_id: 16567 reply_id: 61904[/import]

Great help, thanks! [import]uid: 98287 topic_id: 16567 reply_id: 61934[/import]