Swf checks unique url for variable

Ok, here’s my scenario:

  1. user creates something in my flash app
  2. user clicks send/submit button
  3. the flash app takes a snapshot of user creation and stores it as an image on server,
    example url www.site.com/images/user_creation1.jpg
  4. pressing send/submit also sends another unique url to user’s friends for them to view
    users creation example url www.site.com#id=1 or something similar
  5. so when friends click the url they receive it will deep link into the flash app and display the saved image.

so, what I need help with is getting flash to detect the two unique urls, and then doing something based on them. so first flash will have to check the url the friends click and then lead them to that url in the flash, then it’ll have to find the corresponding image and display it.

any ideas?

thanks for any help I get!