Quantcast
Channel: Indigo Rose Software Forums - Forums
Viewing all articles
Browse latest Browse all 2105

I need help with my little project at ams

$
0
0
Greetings forum members, programmers and asuaries.
I am creating an interactive discography project, although I have been able to create all the functions I needed, there is one specifically where I got stuck. I explain:

I want to have two modes of reproduction, the first when I click on the title of the song (that is already achieved) and the second (it is where I am stuck) by clicking on a button I can play the entire disc, that is, the songs sound sequentially. Lua is new to me, however I have knowledge of other programming languages that have helped me with this one.

The code or routine for this function that I found on the AMS help pages

audio_count = 1;
audio = {
"Autoplay\\Audio\\audio_file1.ogg",
"Autoplay\\Audio\\audio_file2.ogg",
"Autoplay\\Audio\\audio_file3.ogg"

};
Audio.Load(CHANNEL_USER1, audio[audio_count], true, false);
if e_State == "Finish" then
audio_count = audio_count + 1;
if audio_count < Table.Count(audio)+1 then
Audio.Load(CHANNEL_USER1, audio[audio_count], true, false);
end
end



The only thing that this routine achieves is to reproduce the first song but it does not continue playing the subsequent songs. I even made a modification, rather a simplification of this routine by making a llistbox and creating a loop, achieving the same result (it plays only the first song).


for Ncount = 1,3 do

result = ListBox.GetItemData("ListBox1", Ncount);
Audio.Load(CHANNEL_USER1, result, true, false);
if e_State = "Finish" then
Ncount = Ncount + 1;
end

end


I really don't know the e_State "Finish" statement.
As I understand it is very Lua, it uses the variants that e_state offers to perform various audio functions. However, by performing some tests, such as eliminating this instruction, the loop is completely fulfilled, achieving that only the last theme or song is played. Which to my logic tells me that the problem is in the e_state instruction. Apparently this breaks the routine or loop.

I am very grateful to those programmers or users with vast knowledge in Lua or AMS, and know what the problem is, enlighten me, since I have been stuck for more than a month in that single problem. Everything else is done.

Thank you all in advance, and have a great day.

Viewing all articles
Browse latest Browse all 2105

Trending Articles