Hello i got like kb error i guess im not giving enough ram for java and i dont know how can i give more can someone tell me how Thank you Already
Would you mind sharing the code? It is far easier to find the issue that way
I checked about it (KB error in java) and found that it is mostly issues with functions. There was a case where a kb error was reported due to an unsupported function and another where date() (time and date functions) were unresponsive. Again to fix it I recommend posting your code here
I have 2 video in this code both are 45 second
i cant share my code cuz of this website i dont know
Did you import video libraries? The library preloaded does not support video / sound. Try finding a processing/java library you like
import processing.video.*; i add that but i dont think the problem about my code
its like about ram and givinig more memory
Programs aren’t limited by ram. They would just run slower. Can you access the video files? Did you reference them correctly? (“name.dataType” (like “holidays_15_6_2020.mp4”))
unless you have <200mb ram I don’t think that should be a problem. Btw you can change the RAM accessible in the preferences.
my friend, you are very knowledgeable i will try to share my code again
import processing.video.*;
int puan=0;
int timer;
int page=0;
boolean pressed=false;
Movie mov;
PImage foto1;
void setup(){
size(860,640);
page+=1;
pressed=true;
background(0);
mov = new Movie(this, “movie1.mp4”);
mov.loop();
mov.volume(0);
foto1=loadImage(“data/foto1.jpg”);
}
void movieEvent(Movie movie) {
mov.read();
}
void draw(){
switch(page){
case 1:page1(); break;
case 2:page2(); break;
case 3:page3();break;
}
}
void page1(){
image(mov, 0, 0,width,400);
fill(255);
text(“Filmi İsmi : Yedinci Oğul”,0,30);
textSize(20);
text(“İzlemekte Olduğunuz Kısımda Yarı İnsanı Gören Dev ne Tepki Vermiştir”,0,410);
if(mouseX>50 && mouseY>500 && mouseX<200 && mouseY<550 && mousePressed==true ){
background(255,0,0);
rect(50,500,150,50);
rect(350,500,150,50);
rect(600,500,150,50);
setup();
}
else if(mouseX>350 && mouseY>500 && mouseX<500 && mouseY<550 && mousePressed==true){
rect(100,500,150,50);
rect(350,500,150,50);
rect(600,500,150,50);
puan+=20;
setup();
}
else if(mouseX>600 && mouseY>500 && mouseX<750 && mouseY<550 && mousePressed==true){
rect(50,500,150,50);
rect(600,500,150,50);
rect(350,500,150,50);
setup();
}
else{
fill(0);
stroke(255);
rect(50,500,150,50);
rect(350,500,150,50);
rect(650,500,150,50);
fill(255);
text(“Aşık olur”,82,530);
text(“Tokatlar”,385,530);
text(“Korkup Kaçar”,662,530);
}
}
void page2(){
image(foto1,150,0);
fill(255);
textSize(20);
text(“Cesur Yürek Filminde Mel Gibsonun Canlandırdığı Karakterin İsmi Nedir?”,0,430);
if(mouseX>50 && mouseY>500 && mouseX<200 && mouseY<550 && mousePressed==true ){
background(255,0,0);
rect(50,500,150,50);
rect(350,500,150,50);
rect(600,500,150,50);
setup();
}
else if(mouseX>350 && mouseY>500 && mouseX<500 && mouseY<550 && mousePressed==true){
rect(100,500,150,50);
rect(350,500,150,50);
rect(600,500,150,50);
setup();
}
else if(mouseX>600 && mouseY>500 && mouseX<750 && mouseY<550 && mousePressed==true){
rect(50,500,150,50);
rect(600,500,150,50);
rect(350,500,150,50);
setup();
}
else{
fill(0);
stroke(255);
rect(50,500,150,50);
rect(350,500,150,50);
rect(650,500,160,50);
fill(255);
text(“Murron”,90,530);
text(“Robert Bruce”,365,530);
text(“William Wallace”,655,530);
}
}
void page3(){
}
It’s mostly guessing and my previous failures. I learned a lot since I started following the forum. Good luck with your coding.
page 2 had a video normally but because I couldn’t access it, I replaced it with a picture.
well that is a solution
you should never call setup from your code
setup should run only once
move the lines from setup in a new function that you call from setup AND from the code lines where you call setup at the moment
also, don’t load movies again that you have already loaded. Instead use play / loop / pause again.
Chrisir
They are different videos of about 50 seconds. and i have to use more then 5 but i cant even play 2 videos
As I said, rewrite your code so you don’t call setup() please
You can increase the memory in processing preferences also
So how can i increase memory i guess thats my solution
That won’t help when you still call setup()…
See processing menu File | Preferences