remove this
Code:
if(active_tri == 2)
{
    active_tri = 1;
}



the code it work without it for up and down animation .
but i want to ask you. what do you want to do with this function ?