# Triggering video clips with buttons

**URL:** https://discourse.processing.org/t/triggering-video-clips-with-buttons/16836
**Category:** Project Guidance
**Created:** [January 3, 2020, 4:17pm UTC](https://discourse.processing.org/t/triggering-video-clips-with-buttons/16836 "2020-01-03T16:17:19Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![marianne91](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@marianne91](https://discourse.processing.org/u/marianne91)
#### Post date: [January 3, 2020, 4:17pm UTC](https://discourse.processing.org/t/triggering-video-clips-with-buttons/16836/1 "2020-01-03T16:17:19Z")

</div>

Hi there,  
Am working on a project in which I would like to trigger the playing of video clips via buttons. I’m able to trigger sound samples via buttons but haven’t been able to with video.  
Any ideas?

---

<div class="post-metadata">

### Author: ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)
#### Post date: [January 3, 2020, 10:47pm UTC](https://discourse.processing.org/t/triggering-video-clips-with-buttons/16836/2 "2020-01-03T22:47:37Z")

</div>

Please describe more details about this triggering functionality. I am sure there are previous posts that can do this. For instance, triggers different videos? What is a trigger? Like a key pressed? What happens after that? Does the movie plays its full length? Do you want it to pause, stop, rewind, switch movies?

Kf

---

<div class="post-metadata">

### Author: ![marianne91](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@marianne91](https://discourse.processing.org/u/marianne91)
#### Post date: [January 4, 2020, 11:23am UTC](https://discourse.processing.org/t/triggering-video-clips-with-buttons/16836/3 "2020-01-04T11:23:58Z")

</div>

Hi there @kfrajer .  
I would like the trigger to be a mouseclick on a button where one button (‘YES’) plays one video and another button (‘NO’) plays another. The video clip chosen then runs its full length until another set of YES/NO buttons appears which triggers another video.  
Ideally I would like to be making a video where the viewer chooses their own story/ending.

---

<div class="post-metadata">

### Author: ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)
#### Post date: [January 4, 2020, 5:48pm UTC](https://discourse.processing.org/t/triggering-video-clips-with-buttons/16836/4 "2020-01-04T17:48:08Z")

</div>

These posts will get you started:

- [https://forum.processing.org/two/discussion/23419/video-play-random-video-sequence#latest](https://forum.processing.org/two/discussion/23419/video-play-random-video-sequence#latest)
- [https://forum.processing.org/two/discussion/comment/85389/#Comment\_85389](https://forum.processing.org/two/discussion/comment/85389/#Comment_85389)
- [https://forum.processing.org/two/discussion/26370/play-and-replay-the-video-after-few-second-of-the-playing-time-message#latest](https://forum.processing.org/two/discussion/26370/play-and-replay-the-video-after-few-second-of-the-playing-time-message#latest)
- [https://forum.processing.org/two/discussion/25847/how-to-switch-between-multiple-movies-play-movie-after-a-movie#latest](https://forum.processing.org/two/discussion/25847/how-to-switch-between-multiple-movies-play-movie-after-a-movie#latest)

Try to implement your own version and if you run into any difficulties, present a simple sample code demonstrating your approach and your issue.

Kf
