Hi, I'm working on a platforming engine, and I have the same movieclip acting as different platforms. So far i'm able to get the character to jump, move and not fall through the ground. Now I'm wondering if there is any easy way to group together a bunch of movieclip instances and refer to them with one name? I dont believe this can be done with an array and then accessed with a hitTest.

Because it would be incredibly sloppy for me to copy and paste the collision code for each and every platform, and problematic since the condition of gravity enacting is if (!_root.ground.hitTest(this._x,this._y,true))

ground in this case is one of the movieclips acting as a platform.

I tried making an array, called platforms, and changing my code to:
for(i = 0;i < _root.platforms.length;i++){
if (!_root.platforms[i].hitTest(this._x,this._y,true))


but that didnt work at all.


Any advice?