make a video background which works when a button stays pressed??

edited January 2016 in Library Questions

Hi everybody,

i write you from France so sorry for my english.

Because i want make my portfolios, I try to get a background video which play when the button"space" stays pressed. For few days i have read a lot of articles to find any solutions. Can you try to explain me how can i start this code?

Thanks you so much, this post is my last chance.

Camille :)


  • edited January 2016

    Try something like that maybe?

    Movie myMovie;
    void setup() {
      size(200, 200);
      myMovie = new Movie(this, "");
    void draw() {
      tint(255, 20);
      if (mousePressed){
        } else {
      image(myMovie, 0, 0);
    void movieEvent(Movie m) {;
  • Thanks you Ater! I will try that RIGHT NOW :D

  • Did it work? Actually, as you asked for background, you can use background(myMovie);, instead of image(myMovie, 0, 0);.

Sign In or Register to comment.