Website flash player conflict part 2- need our vet sound geeks

hello again;
reposting; My problem along with a great suggestion from one of our members.

Would one of our sound vets please review the problem and then the solution offer by rberry88 and tell me if this is the best direction to go in, or that this or that needs to be added to the solution, or another direction entirely.
This is the last major hurdle to getting this website up and running, and i really need your help…

here’s my earlier post:

 Problem - getting a website theme song to stop playing when a flash movie from the site is played, and then restarted once the movie is over.

In my webmaster’s words…

“Imagine a website which was created in photoshop. All the pages are now linked together by assigning links in the html to buttons (jpeg). Now, there are flash movies which are the core of the site. So, you are on a html page, click a jpeg button, and it goes to an html page on which a flash media object was placed. Now, after you are done watching the movie, there are links in the flash that return you to the main (html) pages. Now, here is the question, how can we make a song loop through the site (html part) and stop once the movie is clicked (the html page with flash movie). For example, if we went with a pop-up flash music player, it would play fine through the different pages of the regular html, but when a movie begins, the sound would overlap. Of course, it wouldn’t overlap if the user closed the pop-up window, but then, when the movie is over, it would somehow have to re-load.”

IDEALY, i’d like to have NO POP UP PLAYER, for all the obvious reasons.
can someone out there explain how we can have a looping flash theme, that stops and restarts when flash movies from the site are done playing?

rberry88’s idea:

 I would start is by assigning a variable to the site theme and another variable to the other flash movies. You could then actionscript in a statement that would tell the site theme variable to check and see if the other movies were playing and if true then tell it to stop and if false to play site theme.

so can you pick it up from here. Is this the best direction, ect.