Get animation number

Hi I’m making a javascript game with levels and want to make it so if the door animation = 1 (unlocked) and the player is colliding with it the change the scene.

I believe you are looking for something like this?