Passing variables to library
in
Programming Questions
•
3 years ago
Hey im trying to make a class that controls the creation of video objects in my sketch.
Is it possible to pass a string to make up part of the required syntax?
for example.
instead of
- myMovie = new Movie(this, "totoro.mov");
but
- Name = new input(this, w, h, FPS);
where Name, input, w, h , FPS are variables passed through the constructor during the creation of the object.
Here is my code i have written so far.
- class videostuff{
-
- String Name;
- String input;
- int FPS;
- int w;
- int h;
-
- videostuff(String _Name, String _input, int _FPS, int _Width, int _Height ){
-
- w = _Width;
- h = _Height;
- FPS = _FPS;
- Name = _Name;
- input = _input;
-
- input Name;
-
- Name = new input(this, w, h, FPS);
-
- }
-
- }
-
-
-
1
