Code:
function mouse_event()
{
	if (event_type == EVENT_TOUCH)
	{	// if the model was touched with the mouse
		set(my,BRIGHT|UNLIT);
		my.ambient = 20; // make it look bright
		my.lightrange = 80; // generate light on a radius of 'x' quants!
	}
	else if (event_type == EVENT_CLICK)
	{	// if the model was clicked with the mouse
		my.ambient = 0; // make it look bright
		my.lightrange = 0; // generate light on a radius of 'x' quants!
		while (my.frame < 20)
		{
			my.frame += 1 * time_step;
			if (my.frame >= 20) {my.frame = 20;}
			wait(1);
		}
	}
	else if (event_type == EVENT_RELEASE)
	{	// if the mouse was moved away from it
		my.ambient = -50; // then restore its initial ambient value (zero)
		my.lightrange = 0; // and stop it from generating light around it
		while (my.frame > 0)
		{
			my.frame -= 1 * time_step;
			if (my.frame <= 0) {my.frame = 0;}
			wait(1);
		}
	}
}


I am curious, why doesn't work this code?
Perhaps i can help you, if you write here what happens...
Or both of we can learn something.