PDA

View Full Version : Help with music script


tandrli
04-13-2006, 05:24 AM
hello evryone

I use AMS 6.0.0.0.

I need a litle help with script the thing is
When I press play music I wont to play it random like in background, but I dont wont to play it when I run Autorun
so in main page I put script "Audio.Stop(CHANNEL_BACKGROUND);" now when I go on some of the pages and come back, on
first page the music normal stops,.. and I do not wont to

so is there some other way to fix this
or culd someone guide me to the same thread (I maybe mised it) (And bad english)

thnx for support

playmenow
04-13-2006, 05:38 AM
Hello. Here is a code that will stop only once:


local Once = 0;
if Once = 0 then
Once = Once +1;
Audio.Stop(CHANNEL_BACKGROUND);
end

tandrli
04-13-2006, 06:14 AM
thnx but I get this error

Line=2: `then` expected near`=`

Roboblue
04-13-2006, 07:06 AM
change
if Once = 0 then
to
if Once == 0 then

tandrli
04-13-2006, 07:27 AM
sorry but problem still here
when I go back on First page music stops

playmenow
04-13-2006, 07:38 AM
if Once ~= "done"
Once = "done";
Audio.Stop(CHANNEL_BACKGROUND);
end

Sorry...:rolleyes

tandrli
04-13-2006, 07:51 AM
I did litle testig and here is right code
if Once ~= "done" then
Once = "done";
Audio.Stop(CHANNEL_BACKGROUND);
end

thnx evryone for support

respect

tandrli
04-13-2006, 08:16 AM
and now I have just very litle tiny question

what is script for:
when I pres foward >> (butn) to play next song from songlist
or back << to play privius song from start (not current from begining)

I hope I am not to much demanding

:rolleyes :rolleyes :rolleyes :rolleyes :D :D

playmenow
04-13-2006, 09:26 AM
Oh...I was not typing is AMS, so I forgot to type the "then"...:rolleyes

That depeds on what you use. If you use ListBox, it's preety easy, get the selected items, select the next one after the firsts selected item & load & play :yes.

tandrli
04-13-2006, 10:56 AM
sorry but can you give me more info
I too new....