Hi,

One of many ways of achieving this could be by using an onEnterFrame() , like so
onEnterFrame = function ()
{
if (stain1.val1 == 1 && stain2.val2 == 1)
{
delete onEnterFrame;...