//1
var object1 = function(o){
// some code
};
//2
var object2 = new object1({
method1: //some code
method2: //some code
method3: //some code
});
//3
document.onkeydown=function(e){
var eventKey = e.keyCode || e.charCode;
var sel = Coverflow.selected;
if(eventKey == 39 || eventKey == 37) {
if(eventKey == 39) sel++;
else if(eventKey == 37) sel--;
sel = sel.limit(0, Coverflow.getListLength() - 1);
Coverflow.select(sel);
}
}
well, my question are:
- what happens when object1 is created, what does the = function() part mean?
- is object2 pointing to object1. is that assignment creating a inheritance?
- if possible can someone explain what going on in document.onkeydown(). the code is for a coverflow effect. also this function is not been called anywhere else in the program then how does it get executed?
thank you