1
function create(x,y,imagePath,imageWidth,imageHeight) {

return new Kinetic.QImage({
        x: x,
        y: y,
        image: images.Grid,
        width: imageWidth,
        height: imageHeight,
});

}


var a = create(100,100,images.Grid,96,96);

なぜこれがうまくいかなかったのですか?

4

1 に答える 1

0

images という未定義の変数に関するエラーが発生しているようです...

むしろこれを行います:

function create(x,y,images,imageWidth,imageHeight) {

return new Kinetic.QImage({
    x: x,
    y: y,
    image: images.Grid,
    width: imageWidth,
    height: imageHeight,
});

}


var a = create(100,100,images,96,96);
于 2012-10-30T15:24:20.523 に答える