Although I thought this was easy, I couldn't do well.

I want an object to blink black and white for ten seconds when I touched it.
CODE
integer condition;I don't know how to use do-while loop correctly, either. I thought that it would stop when condition was changed, but it didn't. Please help me. Thanks.
default
{
touch_start(integer total_number)
{
llSetTimerEvent(10);
do
{
llSetColor(<0, 0, 0>, ALL_SIDES);
llSleep(0.1);
llSetColor(<1, 1, 1>, ALL_SIDES);
llSleep(0.1);
}
while(!condition);
}
timer()
{
condition = !condition;
}
}