well the title is not very accurate so the Question is how i can do something like that
ActionScript Code:
var h:int;
var horses:Array = new Array();
for (h = 0; h < numChildren; h++) {
if (getChildAt (h) is horse) {
horses.push(getChildAt(h).getRect(this));
}
}
for ( h=0; h<horses.length ; h++ ) {
if (player.getRect(this).intersects(horses[h])) {
horses[h].S.gotoAndStop(2);
}
}
i just cut it from the code so i hope nothing missing . so what i tried to do is whan the player touch the horse (one of many) the one he touch change to another frame.