As you can see from the below code, I am reversing a characters movement when they hit the hitSpot_mc or the hitSpot2_mc movieclips. I was wondering if there was a cleaner way to target multiple movieclips similar to this but in a “cleaner” way? The lines would get REALLY long if I have a bunch of different objects that need to stop the character. This is just for the character moving up…I have the same basic lines for the other 3 directions.
if ((fenrisDirection == "up") && (this.fenri****Area_mc.hitTest(scene_mc.hitSpot_mc))||(fenrisDirection == "up") && (this.fenri****Area_mc.hitTest(scene_mc.hitSpot2_mc))) {
_root.scene_mc._y -= speed;
_root.hitSpot_mc._y -= speed;
}
Basically I want to know if I can target multiple MovieClips w/o having to right out that whole line of hitTest code for every object (hitSpot1, hitSpot2, etc…) inbetween || those?
I can post a link to the actual swf on a webpage so you can see how it works.
edit: those **** seem to be the site filtering out what it sees as a cuss word…its “s H i t” all together not that it matters for my question.