# I want pass to next step when the video stop

**URL:** <https://discourse.processing.org/t/i-want-pass-to-next-step-when-the-video-stop/25570>\
**Category:** Libraries\
**Created:** [November 20, 2020, 3:36pm UTC](https://discourse.processing.org/t/i-want-pass-to-next-step-when-the-video-stop/25570 "2020-11-20T15:36:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![josetai](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@josetai](https://discourse.processing.org/u/josetai)\
**Post date:** [November 20, 2020, 3:36pm UTC](https://discourse.processing.org/t/i-want-pass-to-next-step-when-the-video-stop/25570/1 "2020-11-20T15:36:54Z")

</div>

Hi, i´m beginner writing code, and I can´t resolve somthing.  
When the video stop, i want it to pass to other step. I know that “if (movie1.stop()){step = 10;}” doesn´t exist, but i don´t know how to write it right.  
Any help would be appreciated!!

void laberinto() {  
if (verVideo == 1) {  
image(movie1, 0, 0);  
} else if (verVideo == 2) {  
image(movie2, 0, 0);  
} else if (verVideo == 3) {  
image(movie3, 0, 0);  
} else if (verVideo == 4) {  
image(movie4, 0, 0);  
} else if (verVideo == 5) {  
image(movie5, 0, 0);  
} else if (verVideo == 6) {  
image(movie6, 0, 0);  
} else if (verVideo == 7) {  
image(movie7, 0, 0);  
}

}

void EligirVideoAlAzar() {  
verVideo = int(random(7))+1;  
println(verVideo);

if (verVideo == 1) {  
movie1.play();  
} else if (verVideo == 2) {  
movie2.play();  
} else if (verVideo == 3) {  
movie3.play();  
} else if (verVideo == 4) {  
movie4.play();  
} else if (verVideo == 5) {  
movie5.play();  
} else if (verVideo == 6) {  
movie6.play();  
} else if (verVideo == 7) {  
movie7.play();  
}  
if (verVideo== 1 && movie1.time()\>=movie1.duration()) {  
fill(255);  
textSize(25);  
text(“Tecla A para volver a empezar”, 200, 240);  
}  
if (verVideo== 2 && movie2.time()\>=movie2.duration()) {  
fill(255);  
textSize(25);  
text(“Tecla A para volver a empezar”, 200, 240);  
}  
if (verVideo== 3 && movie3.time()\>=movie3.duration()) {  
fill(255);  
textSize(25);  
text(“Tecla A para volver a empezar”, 200, 240);  
}  
if (verVideo== 4 && movie4.time()\>=movie4.duration()) {  
fill(255);  
textSize(25);  
text(“Tecla A para volver a empezar”, 200, 240);  
}  
if (verVideo== 5 && movie5.time()\>=movie5.duration()) {  
fill(255);  
textSize(25);  
text(“Tecla A para volver a empezar”, 200, 240);  
}  
if (verVideo== 6 && movie6.time()\>=movie6.duration()) {  
fill(255);  
textSize(25);  
text(“Tecla A para volver a empezar”, 200, 240);  
}  
if (verVideo== 7 && movie7.time()\>=movie7.duration()) {  
fill(255);  
textSize(25);  
text(“Tecla A para volver a empezar”, 200, 240);  
}  
}

---

<div class="post-metadata">

**Author:** ![tony](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tony/32/949_2.png) [@tony](https://discourse.processing.org/u/tony)\
**Post date:** [November 20, 2020, 6:01pm UTC](https://discourse.processing.org/t/i-want-pass-to-next-step-when-the-video-stop/25570/2 "2020-11-20T18:01:07Z")

</div>

Hi! Welcome to the forums.

Please read the guide on posting. Your question needs more work and clarification for someone to start helping you

---

<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:** [November 21, 2020, 5:53pm UTC](https://discourse.processing.org/t/i-want-pass-to-next-step-when-the-video-stop/25570/3 "2020-11-21T17:53:35Z")

</div>

Please check [this](https://forum.processing.org/two/discussion/23419/video-play-random-video-sequence#latest) post about playing multiple videos and if this helps. If further questions, prepare a short code demonstrating your attempt. This allows to reproduce your challenge and see your current approach.

Kf
