我对动力学对象有疑问:
我有一些动力学对象...
var trianguloG1 = new Kinetic.Polygon({
points: [x, y, catetosTiangulosGrandes+x, y, x, catetosTiangulosGrandes+y, x, y],
fill: '#7e4f00',
draggable: true
});
layer.add(trianguloG1);
下一个对象是相似的...
现在,我想在点击事件的对象(使用数组)中应用阴影效果,但我有一个错误
var figuras = [ "trianguloG1",
"trianguloMediano",
"cuadrado",
"trianguloPeque1",
"trianguloG2",
"trianguloPeque2",
"paralelogramo1",
"paralelogramoEspejo" ];
for(i=0; i<figuras.length; i++) {
var figurita=figuras[i];
console.log(figurita);
figurita.on('click', function() { //TypeError: figurita.on is not a function
figurita.setShadowBlur(8);
//....... more code
可以使用数组来做到这一点吗?这个错误的原因是什么?