Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Ground Controller Lvl 1
Message 1 of 2

Brackets code is not working showing blank page on preview - same code worked before? New to coding

var bgcolor;
var slider;
var P;


function setup() {
    createCanvas(1445, 820);
    bgcolor = color(34, 139, 34);
    P = createP("This is the climate change data logged from Regents Park. The park is currently classified as an illegal green space due to the nitrogen oxide levels being more than double the legal limit for safe air set by the European Union")
    P.position(10, 20)
	

    
    
    
    
    
   slider = createSlider(10, 1000, 900);
    slider.position(10, 40)
    slider.style('width', '130px');
   
}
    
        function changeColor() {
        bgcolor = color(200(34, 139, 34));
    }

function draw() {
    clear()
background(bgcolor);
   fill(255, 255, 255);
    ellipse(width/2, height/2, slider.value(),slider.value());
    ellipseMode(CENTER);
    ellipse(width/2, height/2, 40, 40);
    
   
    
  
    
    
   
    
    console.log(frameCount);
}

Does anyone know what the problem may be? Confused as the code was working fine and now is not

1 Reply
Ground Controller Lvl 1
Message 2 of 2

Re: Brackets code is not working showing blank page on preview - same code worked before? New to cod

solved the problem, I had saved the sketch as a different file name. Changed it back to the orginal and it works fine.