2
我試圖改變鼠標指針鼠標懸停圖像的圖像,這裏是我的腳本:KineticJS鼠標懸停
var sc = new Kinetic.Layer();
var sCircle = new Image();
var sCircleImage;
sCircle.onload = function() {
sCircleImage = new Kinetic.Image({
x: 186.183,
y: 185.89,
width: 142.114,
height: 140.22,
image: sCircle
});
sc.add(sCircleImage);
sc.draw();
};
sCircle.src = '../../Content/images/arrow_circle.png';
sCircleImage.on('mouseover', function() {
document.body.style.cursor = 'pointer';
});
sCircleImage.on('mouseout', function() {
document.body.style.cursor = 'default';
});
我收到以下錯誤:無法獲取的未定義或空引用「上」屬性。我希望你的建議。提前致謝。
非常感謝,它工作得很好。 – hncl 2013-03-22 15:33:24