# Help me clean this up - multiple buttons controlling screen

**URL:** <https://forums.unrealengine.com/t/help-me-clean-this-up-multiple-buttons-controlling-screen/57176>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [March 3, 2016, 8:36pm UTC](https://forums.unrealengine.com/t/help-me-clean-this-up-multiple-buttons-controlling-screen/57176 "2016-03-03T20:36:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LordAnt11](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LordAnt11](https://forums.unrealengine.com/u/LordAnt11)\
**Post date:** [March 3, 2016, 8:36pm UTC](https://forums.unrealengine.com/t/help-me-clean-this-up-multiple-buttons-controlling-screen/57176/1 "2016-03-03T20:36:26Z")

</div>

Ok, this is my first foray into UE and I’ve created some kiosk style areas where you have several buttons that play different videos on a screen and do some other things to 3d objects. I have a question and a problem. The problem is that some videos play in a loop and some stop after one play, irrespective of what I set in the media asset. The question is whether there’s a better/more efficient way of doing an interface of this sort (I’m pretty much positive there is). Thanks, and although I didn’t find it elsewhere on here if you do know of a thread that covers it a link is great too. Thanks!

---

<div class="post-metadata">

**Author:** ![Sidonas](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sidonas/32/487294_2.png) [@Sidonas](https://forums.unrealengine.com/u/Sidonas)\
**Post date:** [March 3, 2016, 8:58pm UTC](https://forums.unrealengine.com/t/help-me-clean-this-up-multiple-buttons-controlling-screen/57176/2 "2016-03-03T20:58:12Z")

</div>

Off the bat I could suggest making a “switch on string” instead of testing each string for ==  
And you might consider collapsing all that “set material” stuff into a function or macro and passing it the parameters as inputs. That would certainly reduce the size of your graph at least.

---

<div class="post-metadata">

**Author:** ![LordAnt11](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LordAnt11](https://forums.unrealengine.com/u/LordAnt11)\
**Post date:** [March 4, 2016, 2:08pm UTC](https://forums.unrealengine.com/t/help-me-clean-this-up-multiple-buttons-controlling-screen/57176/3 "2016-03-04T14:08:10Z")

</div>

Thanks much for the input, I will make those changes! Anyone have any ideas on the videos? They don’t seem to care whether I have “Looping” checked or not. Does it depend on the video encoding format itself?
