SWF Interaction With Popups

I have a music track in an swf file that's called upon to play by the site's main swf upon entering my site.  The site contains a couple of getURL("","_blank"); links that cause off-site pages, with their own music tracks, to open in new windows.  (I have no access to the scripting of these other sites.)  Upon opening such a new window, the new Web site's music track starts, and my site's track stops.

I don't need to know the method at this time, but might it be possible to cause my site's music track to start playing again upon closing the new site's popup window, thus returing focus to my site's window?
Jonathan GreenbergAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

peteSKCommented:
Yes - but it will be tricky, as you will have to use javascript.

The general technique (not specific so dont worry), would be to store a reference to the popup windows you open - and then periodicaly check they are still open.  If they are closed, your javascript can send a message to your flash movie to tell it to play its tune again.

You can excpet to encounter some issues getting this to work with all browsers though

0
Jonathan GreenbergAuthor Commented:
Thank you, pete.  Now that I know it can be done, are you able to provide some JavaScript (even a rough example would suffice) that would do this?  (Please be assured that, whether you are able or not, I will still award the points for answering.)
0
peteSKCommented:
its basicaly this.

set a timer to check periodicaly
http://www.pageresource.com/jscript/jtimeout.htm

check your windows still open
http://www.webreference.com/js/tutorial1/exist.html

if it is not then tell flash
http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_15683
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
peteSKCommented:
Let us know if you get into problems during the development with specific issues.

good luck.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.