Would anyone help, urgently! Storyboard : on click return to mainmenu, background music off!

on click return to mainmenu, background music off!

main menu :

_bg_music = audio.loadStream(“soundmp3/bk_music.mp3”)
function scene:enterScene( event )
audio.play( _bg_music, { channel=1, loops=-1, fadein=5000 } )
end
– submenu, when i calick return, background music off ?
function onTouchReturn (event)
end_flag = false
remove_basegroup()
remove_group()
remove_scoregroup()
storyboard.gotoScene( “scene_playmenu”, “slideLeft”,200);
storyboard.removeScene( “counting”)
end

Would anyone help, urgently!

[import]uid: 22631 topic_id: 26021 reply_id: 326021[/import]

Start your music in main.lua instead.

Joakim [import]uid: 81188 topic_id: 26021 reply_id: 105293[/import]

thanks @jkrassman

i put the code on main.lua, still same…

[import]uid: 22631 topic_id: 26021 reply_id: 105294[/import]

Have you moved audio.play( _bg_music, { channel=1, loops=-1, fadein=5000 } ) to your main.lua also?
[import]uid: 81188 topic_id: 26021 reply_id: 105297[/import]

yes [import]uid: 22631 topic_id: 26021 reply_id: 105300[/import]

if you are using audio.stop() be aware that will stop all kind of music and sounds in that channel, if you’re not specifying a channel it will stop all the sounds

actually you CAN’T do this:

local mySound = audio.loadSound(“etc.wav”)
audio.stop (mySound)

use channels instead [import]uid: 131209 topic_id: 26021 reply_id: 105370[/import]