Why can't it identify the target?


here scrip usingt:


player_1.onrelease = function() { player_id = '2'; };
player_2.onrelease = function() { player_id = '2'; };

if(player_id == (2 or 1)) {
if(key.isdown(key.up)) {
player_[player_id]._y = player_['player_id]._y - 2;
}
}

i want user clicks on player he/she wishes control/move. , when user clicks on player, according clicked on. like it's dynamic. suggestions on why doesn't move player specific player_id?

> player_[player_id]._y = player_['player_id]._y - 2;

that plain wrong

maybe want

this["player_"+player_id]._y -= 2;
--
jeckyl




More discussions in ActionScript 1 and 2


adobe

Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

How to format a Get Request

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62