null pointer exception at the if(mouse.getButton()==1){ line. I don't know what's wrong. can anyone help?
1 2 3 4 5 6 7 8 | public void act() { MouseInfo mouse = Greenfoot.getMouseInfo(); GreenfootSound menu= new GreenfootSound( "Menu.wav" ); if (mouse.getButton()== 1 ){ menu.stop(); } } |