Optimize URL checking, verify anim existence

URL checking no longer happens every frame or with a global variable
instead of a local one (oops).

Code now verifies anims exist before doing anything with them to prevent
errors.

If an anim that should have been registered when the URL was set didn't
get registered, then it will now be registered when the event tries to
play that anim.