Bibloteca for Processing [closed]

-1

I have the source code below, but to function I need a library I can not find, what can I do to solve it?

import ddf.minim.*;
import ddf.minim.analysis.*;
import processing.opengl.*;
import javax.media.opengl.*;
import netscape.javascript.*;
import processing.video.*;

Bola bolinhas[];


PImage imagemparticula;

PGraphicsOpenGL pgl;
GL gl;

MovieMaker mm;

Minim minim;
AudioPlayer musica;
FFT fft;


void setup() {
  size(800, 600, OPENGL);
  //mm = new MovieMaker(this, width, height, "hiphop_processing.mov",30, MovieMaker.H263, MovieMaker.HIGH);

  mm = null;

  imagemparticula = loadImage("particula.png");

  minim = new Minim(this);
  musica = minim.loadFile("music.mp3");
  musica.play();
  musica.loop();

  fft = new FFT(musica.bufferSize(), musica.sampleRate());

  bolinhas = new Bola [fft.specSize()];

  for (int i=0; i<bolinhas.length; i++) {
    bolinhas[i] = new Bola();
  }
  hint(DISABLE_DEPTH_TEST);

  background( 0 );
  image( bg, 0, 0, width, height);
}

void draw() {
  //background(bg);
  fill( 0, 30 );
  //image( bg, 0, 0, width, height );
  rect( 0, 0, width, height );
  image( bg, 0, 0, width, height);



  fft.forward(musica.mix);

  float centroX = width / 2;
  float centroY = height / 2;

  pgl = (PGraphicsOpenGL) g;
  gl = pgl.beginGL();
  gl.glEnable(GL.GL_BLEND);
  gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE);
  pgl.endGL();

  fill(255);
  text("Press space to record a video", 20, 20);

  for (int i=0; i<bolinhas.length; i++) {
    bolinhas[i].mover();
    bolinhas[i].desenhar();
    bolinhas[i].elastico(centroX, centroY, 100);
    float val = fft.getBand( i ) + 1;
    float forcaX = random( -val, val );
    float forcaY = random( -val, val );
    bolinhas[i].forca(forcaX, forcaY);
  }
  if ( mm != null ) {   
    mm.addFrame();
  }
}

void keyPressed() {
  if (key == ' ') {
    if ( mm == null ) {
      mm = new MovieMaker(this, width, height, "hiphop_processing.mov",30, MovieMaker.H263, MovieMaker.HIGH);
    } 
    else {
      mm.finish();  // Finish the movie if space bar is pressed!
    }
  }
}
    
asked by anonymous 29.04.2014 / 19:25

1 answer

1

The missing Netscape.javascript lib is part of the Java JDK.

Netscape.JavaScript

You'll just find the path to the plugin.jar file that is inside a subfolder of the JDK installation, and add to the classpath of the IDE you are using.

If you use old versions (JDK < 1.2), the plugin.jar file appears under the name jaws.jar.

The path to add to the classpath will be something like this:

.. \ jdk1.X.X \ jre \ lib \ plugin.jar

.. \ jdk1.2.X \ jre \ lib \ jaws.jar

    
29.04.2014 / 20:22