actionscript 3 - Error #1010 In AS3 -
i'm trying make water system water particles collide each other, keep getting error.
[object water] typeerror: error #1010: term undefined , has no properties. @ science_fla::maintimeline/feed()
here code:
import flash.events.mouseevent; import com.coreyoneil.collision.collisionlist; //etc stop(); stage.addeventlistener(mouseevent.click,feed); function feed(event:mouseevent) { var wat:water = new water(event.target.mousex,event.target.mousey); movieclip(root).addchild(wat); particles.push(wat); for(var = 0; < particles.length;i++) { if (particles[i]!=wat) { trace(particles[i]); wat.mycollision.additem(particles[i]); } particles.mycollision.additem(wat); } }
thanks of help. if need more code, ask.
i issue line:
particles.mycollision.additem(wat);
particles
array, , arrays don't have property mycollision
.
did mean particles[i].mycollision
?
Comments
Post a Comment