ごめんなさい こちらに書く時に;の位置を間違えました。
function mouse_xy(){
kag.primaryLayer.onMouseMove = function(x, y, shift){
if (x > base_x &&y < base_y){
switch = true;}
else{
switch = false;}
};
}
これでうごきません