Encryption and url verification - XML and Flash

Hey everyone,

Alright, I had a couple of questions. First off, I want to know if this is possible, this is what I want to do:

Have a flash file:

Read an encrypted code inside an XML file with the following info: url, date, and generic variables.

Verify the url it is running on. If it is the wrong url, play frame (x), if it the right url, play frame (x).

I would be VERY GRATEFUL if someone could help me with this.
Thanks!