animation not sycning

Options
Hi,

I am using the following code to sync the animation the animation for photon player is not syncing and transform is syncing and also i am using also using photon animation view script layer is put to continuous and synchronize parameter it appear as below

speed0 it value is changing

Strafe(false) it always remain false and only transforms syncing and animation is not syncing.so i used below code and that also not working no error but not syncing my animation i am not calling this OnPhotonSerializeView any where my script is there any needed other thing i needed to set .

public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
{
if (stream.isWriting)
{
stream.SendNext (anim.GetFloat("Speed"));
stream.SendNext (anim.GetBool("Strafe"));
}
else
{
anim.SetFloat("Speed", (float)stream.ReceiveNext());
anim.SetBool("Strafe", (bool)stream.ReceiveNext());

}

}//OnPhotonSerializeView