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

Basic question: Loading objects of another class in a class.

$
0
0

I'm not sure if I worded the title correctly, I'm still getting a grip on classes, objects, instances, etc. The below code shows what I need to do and I think I just need to change "this" to something else to fix it. I need each instance of the class to have its own copy of the video so each class can play the video independently not necessarily in sync. I get a "the constructor does not exist" error.

import processing.video.*;

Abc[] abc;

void settings()
{
  size(800, 600);
}


void setup()
{
  abc = new Abc[8];
  for (byte x = 0; x < 8; x++)
  {
    abc[x] = new Abc();
  }
}


void draw()
{
  background(0);
}


class Abc
{
  Movie _mov;

  Abc ()
  {
    _mov = new Movie(this, "C:/Users...");
  }

  void xyz()
  {
  }
}

Thanks!


Viewing all articles
Browse latest Browse all 2896

Trending Articles