audio infinite loops problems,,

i used this syntax…

but why its not infinite background music

1st.

>local sound=audio.play( bgMusic, { loop=-1})

2nd

  this code is play infinete but when i go to other scende den go back again theres playing music,

>local backgroundMusicChannel = audio.play( backgroundMusic, { channel=1, loops=-1, fadein=5000 } )

:blink: help!!

For your first question, you wrote “loop” instead of “loops”, so that’s probably why it’s not looping.

I don’t understand your second question.  Please try to write it so that you clearly say (a) what exactly you want to happen, and (b) what is happening instead.

  • Andrew

Sorry to hijack this thread briefly, but I’ve got to say a big thank you to aukStudios.  I’ve been pulling my hair out for days over why my title music won’t loop.  I’ve done it many times before with no problems so just couldn’t understand what I was doing wrong this time.  Of course I’d missed the ‘s’ off the end of ‘loops’.   If I hadn’t read this thread I would probably have no hair left by the end of the week.

Thank you, thank you, thank you.  :)

2nd

  this code is play infinete but when i go to other scene den go back again to main scene theres no playing music,

>local backgroundMusicChannel = audio.play( backgroundMusic, { channel=1, loops=-1, fadein=5000 } )

Hi @juario_soul,

I assume you’re using Storyboard? If so, please view the video on handling scenes, and how certain code gets called (or doesn’t) when doing so.

http://www.youtube.com/embed/2IDzu6qWRCM?rel=0

Best regards,

Brent

For your first question, you wrote “loop” instead of “loops”, so that’s probably why it’s not looping.

I don’t understand your second question.  Please try to write it so that you clearly say (a) what exactly you want to happen, and (b) what is happening instead.

  • Andrew

Sorry to hijack this thread briefly, but I’ve got to say a big thank you to aukStudios.  I’ve been pulling my hair out for days over why my title music won’t loop.  I’ve done it many times before with no problems so just couldn’t understand what I was doing wrong this time.  Of course I’d missed the ‘s’ off the end of ‘loops’.   If I hadn’t read this thread I would probably have no hair left by the end of the week.

Thank you, thank you, thank you.  :)

2nd

  this code is play infinete but when i go to other scene den go back again to main scene theres no playing music,

>local backgroundMusicChannel = audio.play( backgroundMusic, { channel=1, loops=-1, fadein=5000 } )

Hi @juario_soul,

I assume you’re using Storyboard? If so, please view the video on handling scenes, and how certain code gets called (or doesn’t) when doing so.

http://www.youtube.com/embed/2IDzu6qWRCM?rel=0

Best regards,

Brent