How to load and change audio via variables?

srangan-3520
srangan-3520 Community Member Posts: 8
Hello,

I am trying to develop a template screen that requires loading an audio on start. The audio, however, needs to be controlled via variable. This template will be further used by eLearning developers. The functionality is being implemented so that they can simply change the name of the audio file in the Variable Manager and have the audio changed. I am really new on Lectora 18. It'd be great if anybody can help me out here and let me if this is possible and how.

Thanks for your help in advance.

Comments

  • carlfink
    carlfink Community Member Posts: 1,102 ✭ Legend ✭
    It isn't clear to me what you're trying to do. Do you want the users to upload new audio, or just pick an audio file from a list that you will display in the course?

    They will never see the Variable Manager (or the Resource Manager). Those are only available to developers in the development environment. You can easily create a drop-down list in Lectora, and that drop-down will set the value of a variable. You can then use the variable to pick which audio file to play. I can provide a sample on request.

    There is no built-in way I'm aware of to have the end-user upload a file and play it.
  • srangan-3520
    srangan-3520 Community Member Posts: 8
    Thanks fore replying, CarlFink. Apologies if I did not make myself clear. I am developing a Lectora template for developers that would allow them to simply enter their content in the Variable pane and publish for end users. This is not for end users. This is for developers only. I want to know if there is an option wherein developers can change the audio by using variables. For instance, if  developers can define a variable and go to the Variable Manager and specify the name of audio file to be loaded at start, and they are good to go. I am attaching my source file as well. Let me know if that's possible. Thanks in advance.
  • carlfink
    carlfink Community Member Posts: 1,102 ✭ Legend ✭
    Is there only one audio file?

    If so, why is the variable approach easier than just right-clicking the audio file and replacing it directly?