Quartz Composer:用鼠标切换视频输入
场景:两个 Quicktime 电影输入,一个循环播放,除非用户单击鼠标左键,在这种情况下,第二部电影播放到最后,然后播放第一部电影。
从逻辑上讲,我可以使用条件看到它。如果 number = 1,则循环播放电影 1。如果单击鼠标,number = 2,则播放电影 2。播放结束时,数字 = 1,循环电影 1。
我不知道如何增加数字并使其在不按住鼠标左键的情况下保持不变,以及如何在第二个播放后将电影切换回来。
在我看来,数字瞬间增加到 2 并不重要,因为此时条件将立即跳转到数字 2。但是在数字 2 播放后,如何让电影 1 播放?
谢谢。
Scenario: two Quicktime movie inputs, one plays on loop unless user clicks left mouse button, in which case second movie plays until the end, then first movie plays.
Logically I can see it using a conditional. If number = 1, loop movie 1. If mouse click, number = 2, movie 2 plays. At end of play, number = 1, loop movie 1.
What I can't figure out is how to increase a number and have it stick without the left mouse being held down, and how to switch the movie back after the second one plays.
In my head, I'd have it wouldn't matter that the number increases to 2 for an instant, because at that point the conditional will instantly jump to number 2. But after number 2 plays, how do I get movie one to play?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会这样做:将电影 A 和电影 B 馈送到多路复用器 patch 的输入 0 和 1,然后将鼠标控制 patch 的左键单击输出馈送到多路复用器的索引,Quartz 将转换布尔鼠标单击(0 或1) 到一个索引(0 或 1),告诉多路复用器输出一个或另一个视频,具体取决于用户鼠标的状态。完整的内容如下所示:
I would do it as follows: feed movie A and movie B into inputs 0 and 1 of a multiplexer patch, then feed the left click output from the mouse control patch to the multiplexer's index, and Quartz will convert the boolean mouse click (0 or 1) to an index (0 or 1) telling the multiplexer to output one or the other of your videos, depending on the stat of the users mouse. The complete thing would look like this: