I see your problem and your problem adjusting to the syntax of AS3.
I looked at the code earlier and adjusted the fix:
I added a container (just a movieclip, called with the instance name of platformCont.
I made sure the x and y of the platform are at 0. Then I add all your platforms within that Movieclip.
I then go through all the children of the MovieClip container with the following code.
numChildren returns the number of objects in the MovieClip. Then the getChildAt(indexNumber) returns the actual platforms (like your old P1, P2).
I then added a break, because otherwise the for loop would set falling to false even though it was set true to the old platforms giving it adverse effects.
for (var i:int = 0; i<platformCont.numChildren; i++) {
if (platformCont.getChildAt(i).hitTestPoint(bunny.x,bunny.y+bunny.height/2,false)) {
bunny.y = platformCont.getChildAt(i).y - (bunny.height/2) ;
falling=false;
fallSpeed=-1;
break;
} else if (!jumping) {
falling=true;
}
}
Good luck! Let me know if you have any more trouble.
Another way of looping thought multple objects/items in AS3 is to reference them in an array.
Like so:
var myArray:Array = new Array();
array.push(p1,p2,p3,p4);
for (var i:int=0; i<array.length; i++) {
if (array[i].hitTestPoint(bunny.x, bunny.y) {
// code
}
}
P.S. I was bored, and did look at the .fla, although I normally wouldn't!