Author Topic: music only in display-menu ? HELP  (Read 4921 times)

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
music only in display-menu ? HELP
« on: March 06, 2017, 07:40:40 AM »
not sure if this is a general or scripting Q:

how would i get music to play only when you are in the display menu...

i set ambient sound ,, but it plays everywhere

thanks..
help a friend....

qqplayer

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: music only in display-menu ? HELP
« Reply #1 on: March 10, 2017, 08:25:05 AM »
I think the best option is to.add a custom music for your menu theme.

I have a little code for this on my computer.
Something like fe.add music....

I'll paste later if you want.

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: music only in display-menu ? HELP
« Reply #2 on: March 11, 2017, 05:47:39 PM »
yes please.......thankx
help a friend....

qqplayer

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: music only in display-menu ? HELP
« Reply #3 on: March 12, 2017, 06:01:49 AM »
Code: [Select]
// sound
local mysong = fe.add_sound("music.mp3");

mysong.file_name = music.mp3";
mysong.loop = true;
mysong.playing = true;

 ;)

caminiti45

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: music only in display-menu ? HELP
« Reply #4 on: September 15, 2017, 08:30:13 PM »
where would you put this code? in the layout.nut file for the display?

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: music only in display-menu ? HELP
« Reply #5 on: September 17, 2017, 08:24:43 AM »
just put the code into the layout.nut file of the theme that is being used as your display-menu
then drop an mp3 file into the layout,  make sure to rename it of course!

done.
help a friend....

caminiti45

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: music only in display-menu ? HELP
« Reply #6 on: September 17, 2017, 04:55:53 PM »
EDIT
doh nevermind figured it out. Thanks!
« Last Edit: September 17, 2017, 05:08:09 PM by caminiti45 »

caminiti45

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: music only in display-menu ? HELP
« Reply #7 on: October 07, 2017, 05:07:44 PM »
I do have one more problem with this script. When I exit a game back to the theme, the music no longer plays. Any way around this?

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: music only in display-menu ? HELP
« Reply #8 on: October 07, 2017, 09:52:25 PM »
It has been discussed in forums before and cocluded that it is bug in AM,   
Maybe will be fixed in future release
help a friend....