Wall help?

I have my walls set up for if the wall detects a hitTest with the player (code on the wall), that _global rspeed = 0; (and vice versa for the l wall).

then in the else statement rspeed = 8.
But if i have two rwalls, then if i’m not hitting (lets call it) wall1, then rspeed = 8, even if im hitting (lets call it) wall2.

Is there a simpler way than having an if (!) statement and list every named wall in the level, or do i have to do that?

respond quickly please!