Link to home
Start Free TrialLog in
Avatar of Jonathan Greenberg
Jonathan GreenbergFlag for United States of America

asked on

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?
Avatar of peteSK
peteSK

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

Avatar of Jonathan Greenberg

ASKER

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.)
ASKER CERTIFIED SOLUTION
Avatar of peteSK
peteSK

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Let us know if you get into problems during the development with specific issues.

good luck.