Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Loading a video in another PApplet

$
0
0

Hey,

I am trying to load and play a video with the processing core video library, but not in the main PApplet. I would like to have the video loaded and played in another PApplet. Here is a code snippet:

public class MainApplet extends PApplet{
    import processing.core.PApplet;

    public void setup(){
        SecondApplet secondApplet = new SecondApplet(this);
        //...
    }
    //...
}

public class SecondApplet extends PApplet{
    import processing.core.PApplet;
    import processing.video.*;

    public void setup(){
        //...
    }
    public SecondApplet(PApplet mainApplet){
        Movie movie = new Movie(mainApplet,"stringToMovie"):
        //...
    }
    //...
}

Creating an instance of a Movie object with the mainApplet instance is not working.

First, why is that and second, how could that be solved ( besides from putting the functionality into the main Applet ). I had the same problem with the unfolding library, but since this is a third party product it could be different story.

best Arne


Viewing all articles
Browse latest Browse all 2896

Trending Articles