HTML and CSS Reference
In-Depth Information
console . log ( "row" , row , "col" , col );
tempButton = buttons [ row ][ col ];
clickSound . play ();
tempButton . pressDown ();
tempButton . draw ( context );
}
function
function onMouseMove ( e ) {
mouseX = e . clientX - theCanvas . offsetLeft ;
mouseY = e . clientY - theCanvas . offsetTop ;
}
//**** start application
var
var gr = context . createLinearGradient ( 0 , 0 , 85 , 50 );
// Add the color stops.
gr . addColorStop ( 0 , '#ffffff' );
gr . addColorStop (. 5 , '#bbbbbb' );
gr . addColorStop ( 1 , '#777777' );
theCanvas . addEventListener ( "mousemove" , onMouseMove , false
false );
theCanvas . addEventListener ( "click" , onMouseClick , false
false );
initSounds ();
initButtons ();
initLists ();
chooseButtonsForCard ();
drawScreen ();
}
< /script>
</head>
</head>
<body>
<body>
<div
<div style= "position: absolute; top: 0px; left: 0px;" >
<canvas
<canvas id= "canvas" width= "570" height= "418" >
Your browser does not support HTML5 Canvas.
</canvas>
</canvas>
<audio
<audio id = "clicksound" preload= "auto" >
<source
<source src= "click.mp3" type= "audio/mpeg" //>
Your browser does not support the audio element.
</audio>
</audio>
</div>
</div>
Search WWH ::




Custom Search