At 4/26/08 02:10 PM, The-Almighty-Hominid wrote:
I am having a problem stopping an MC when it hits another object. Here is my code:
onClipEvent (enterFrame) {
if (_root["bad guy" + i], hitTest (_root.block)) {
_root["bad guy" + i].stop()
}
}
The MC is called "bad guy" but since they are being spawned I made each other one have i added to them. So technically "bad guy" + i should work... :S
Thanks in advance...
I Think its because your code reads:
if (_root["bad guy" + i], hitTest (_root.block)) {
on that line. The period in "_root["bad guy"+i].hitTest(_root.block))"
if you copied this directly from your actions, change the comma to a period, otherwise, I dont see anyhting wrong.