Tryit Editor<html><script>var c=document.getElementById("button");var ctx=c.getContext("2d");function myFunction(){ctx.fillStyle="#ff0000";ctx.fillRect(0,0,100,100);}function myFunction2(){ctx.fillStyle="red"; ctx.fillRect(0,0,100,100);}</script><body><canvas id="button" onmouseover="myfunction()" onmouseout="myfunction2()" width="100" height="100"></canvas></body></html><html><script>var c=document.getElementById("button");var ctx=c.getContext("2d");function myFunction(){ctx.fillStyle="#ff0000";ctx.fillRect(0,0,100,100);}function myFunction2(){ctx.fillStyle="red";ctx.fillRect(0,0,100,100);}</script><body><canvas id="button" onmouseover="myfunction()" onmouseout="myfunction2()" width="100" height="100"></canvas></body></html>
ok heres an updated one still wont work but it should.