HOW TO PLAY A MANY WAV FILES WITH A SINGLE BUTTON
by karthikeyanK · in Torque Developer Network · 07/15/2009 (4:53 am) · 2 replies
In My project i have to play wav files. i am playing there is no problem. but my project is
I have 5 sections. In this when the user goes for the first section the song 1 should play ...
when he user goes for second sections.. the song2 should play......like that 5 different songs should
play......BUT WITH THE SINGLE BUTTON........i can't put many buttons...........
when the user enters the section the button should be populated automatically and when the user clicks
the button then the particular section song should play...
how to that.. how can i identify the sections and then how can i play the particular song for the particular section......
here i have a code for play the wav files....
%isPlaying = alxIsPlaying($AudioTestHandleA);
if(%isPlaying==0)
{
$AudioTestHandleA = alxCreateSource("AudioIntroMusicProfile",expandFilename("data/sound/crowd.wav"));
alxSetChannelVolume( 0 ,2 );
alxPlay($AudioTestHandleA);
}
else if(%isPlaying==1)
{
alxStop($AudioTestHandleA);
}
my problem is i have to play the five different wav files in a single button..................
please provide a solution
I have 5 sections. In this when the user goes for the first section the song 1 should play ...
when he user goes for second sections.. the song2 should play......like that 5 different songs should
play......BUT WITH THE SINGLE BUTTON........i can't put many buttons...........
when the user enters the section the button should be populated automatically and when the user clicks
the button then the particular section song should play...
how to that.. how can i identify the sections and then how can i play the particular song for the particular section......
here i have a code for play the wav files....
%isPlaying = alxIsPlaying($AudioTestHandleA);
if(%isPlaying==0)
{
$AudioTestHandleA = alxCreateSource("AudioIntroMusicProfile",expandFilename("data/sound/crowd.wav"));
alxSetChannelVolume( 0 ,2 );
alxPlay($AudioTestHandleA);
}
else if(%isPlaying==1)
{
alxStop($AudioTestHandleA);
}
my problem is i have to play the five different wav files in a single button..................
please provide a solution
#2
07/15/2009 (11:38 pm)
How to pass the trigger name to that button.. I dont know.. could you please give me the code...
Associate Michael Hall
Distracted...