setLoopState(OF_LOOP_NONE) not working

Hi, my problem is that I want to play one video on top of the other, but then I can’t get the previous video to stop looping. Here’s some of my code. It works for the very first video (not shown in the code) but when I try to implement it on other videos such as video2 and video3, the loop keeps going.

void ofApp::draw(){


video.draw(60, 150, 600, 400);

if(remember.clicked == true){
if(remember2.clicked == true){

I fell it is because you invoke the “play()” command again and again in each frame.

how would i be able to fix it? do i invoke play() elsewhere? I wanted it so that the video plays after the button is clicked.

Although a different code flow could be implemented, the most simple solution for your current specific case might be:

if (video2.getLoopState() != OF_LOOP_NONE);