o.m wrote:
if I use video object or sound action: I will not have "sound controls"
Playing a sound file using a video object will allow you to pause, play, stop, rewind and fast forward the audio using the normal video actions. If you wish to change the volume of the sound, simply use a normal
Change Volume action which is set to change the volume of all Wave sounds.
o.m wrote:
And of course, I cannot use Robin Garrett suggestion because I have to do these steps for each file of my "hundreds" files
You can use a variable in the filename field of the video object and can set this variable to the path of the audio file you wish to play. For example, try typing
<audiofile> into the filename of the video object, then apply a button to the page which sets a variable named
audiofile (you will need to create this as a publication variable) to
<SYSTEM_PUBLICATION_DIR>\audio1.mp3. Now copy an mp3 file to the same directory as your project .imp file and rename it to
audio1.mp3.
Preview the publication and try playing the video. As the
audiofile variable is not currently set, no sound will be heard. However, if you click on the button to set the
audiofile variable to
<SYSTEM_PUBLICATION_DIR>\audio1.mp3, then play the video, the publication will now look in the directory from which the publication is running and try to find a file named
audio1.mp3. As we have ensured that this file is present and correct, the video object should locate the file and the audio should play as expected.
You will still need a number of Set Variable actions to change the contents of the variable to point to each audio file, but this should be a lot easier than handling hundreds of video objects.
Please let me know if you encounter any problems or require any further advice.
Kind regards,