We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

rafizan46
Posts: 62
Joined: Wed Mar 29, 2017 2:45 pm

How to play audiofile using checkbox?

Hi, anybody know how to Play/stop audio file using same checkbox? Help.. :(
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to play audiofile using checkbox?

Hi and welcome to Advanced Installer forums.

Please take a look on the "Music Switcher button (ON/OFF)" thread which debates a similar scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rafizan46
Posts: 62
Joined: Wed Mar 29, 2017 2:45 pm

Re: How to play audiofile using checkbox?

Yeah, I already try that.. but not working on check box.. :(
I want when check on checkbox, music play, if uncheck, music stop playing..
rafizan46
Posts: 62
Joined: Wed Mar 29, 2017 2:45 pm

Re: How to play audiofile using checkbox?

When I check the checkbox, music play.. but how to stop the music when I uncheck the checkbox? please help me.. :(
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to play audiofile using checkbox?

Hi,

To play and stop the music based on the checkbox state, you can use its property as a condition for the "Play Audio File", "Start" and "Stop" music events. For example, if the property related to your checkbox is "MUSIC_CHECK", you can add the following published events for it:
  • Execute custom action:
    Argument: Play Audio File
    Condition: MUSIC_CHECK


    Set installer property:
    Property: AI_AUDIOFILE_UI
    Argument: Start
    Condition: MUSIC_CHECK


    Set installer property:
    Property: AI_AUDIOFILE_UI
    Argument: Stop
    Condition: NOT MUSIC_CHECK
Let me know if this helped.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rafizan46
Posts: 62
Joined: Wed Mar 29, 2017 2:45 pm

Re: How to play audiofile using checkbox?

hi, thanks for reply.. I already do as what you suggested.. but the music only play for 1 second and stop.. how to fix that?
rafizan46
Posts: 62
Joined: Wed Mar 29, 2017 2:45 pm

Re: How to play audiofile using checkbox?

Its ok.. I already solve the problem.. :D

here what I do :)

Top
Execute custom action:
Argument: Play Audio File
Condition: MUSIC_CHECK

Middle
Set installer property:
Property: AI_AUDIOFILE_UI
Argument: Stop
Condition: NOT MUSIC_CHECK

Bottom
Set installer property:
Property: AI_AUDIOFILE_UI
Argument: Play
Condition: MUSIC_CHECK

Thanks for your help :)
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to play audiofile using checkbox?

You're welcome. I'm glad you got this working.

Just let us know anytime you encounter a problem.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”