I'm looking to build an application that acts as a "shell" around a flash game.

I only need it to do some pretty basic functions:

1) Calls a PHP script I wrote to determine a few things (if user is logged in, what their userid is)

2) If the php file says the user is logged in, the "shell" should let the user play a .swf flash game that I wrote. And, after they are done playing my .swf game, I want the game to pass out a parameter (score). Again, the "shell" will call a prewritten php script to store the score.

3) If the php file says the user is NOT logged in, the "shell" should display a login box (username/password).

My main challenges have been getting one flash application to call another. (ie: the shell app calling my game). Is this possible?