I have hundreds of coloured squares which, when the user chooses one, the click sends data to another variable.

Each square is named uniquely. The tedious coding is to have:

on (release) {
myColor = new Color(p1s1);
rgb = myColor.getRGB();
}

Is there any way to make it assume the 'p1s1' bit so I don't have to have special code for every one of the x hundred squares? I've tried (blundered round) several This... variations but none worked.

Thanks...

www.bricksandbrass.co.uk