This content has been marked as final. Show 5 replies
1. remove the balls array definition from your onEnterFrame loop.
2. where is the kill() method defined and why is there a space between kill and ()?
Tried that does not work, the ball only changes colour when the balls array definition is onEnterFrame loop. the kill() function is on the ball movieclip...it basically tells the movieclip to play so that the balls' colour changes.
trying to understand your code, that there is a major colour change on the pixel where the ball is?
Is it only one pixel, or an area? because noise on a webcam would make single pixel detection almost impossible, but a 5 x 5 or 10 x 10px sampling area would be far more reliable in the results your after
The code is actually checking if there is a colour change within the webcam and if it is in the same position as the ball then the kill() function is activated…well I believe that’s what the code is doing…I’m not that good a coder so might have got is a bit wrong maybe…thanks for pointing that out it might help solve this…but if you have any idea as to how I could sample a range rather then pixels it would be great.
ah ok.... so if its one pixel, its possible the colour change could be happening in a lot of places at once. A night setting would make the noise grain or colour changes pretty random.
You can/should test any webcam app out by the way by using a fake webcam. For example, use camtasia to record your screen as a webcam. Then, move shapes around and see how that alters your flash in realtime