Помогите разобраться.
script1
(function () {
'use strict';
function MotionVector(){
this.flag = true;
this.computation = function(event){
console.log(this.flag);
}
}
window.MotionVector = MotionVector;
})();
script2
(function () {
'use strict';
var mov = new MotionVector();
function movMouse() {
var element = document.getElementsByClassName('activate')[0];
element.addEventListener('mousemove', mov.computation, false);
}
window.addEventListener('load', movMouse, false);
})();
Почему не выводиться console.log(this.flag), пишет "undefined", а мне нужно, что б 'true'