PDA

View Full Version : Javascript to 'swap' flash movies on the page



jode
24 Jan 2007, 09:29 AM
I need to create a web page where a javascript function has to swap the url of a Flash movie without reloading the whole html page, and without there being multiple html pages (i.e. using iframes).

I need it to do this by an onClick event on a text link.

I have tried so far with loadMovie and getElementById - all of which work in IE but not in Firefox or Opera.

I can't past any code as I have tried out so many different things I have lost my place, and lost what works and what doesn't.

This should be simple - any ideas?

bjk2007
21 Feb 2007, 06:08 PM
document.getElementById('objecttagid').data = path to new video
That should do it. Since there's several methods through which flash is embeded in the site, this may not apply to your situation. Anything along those lines should work, but it's not a guarantee. You seem to already be having problems, but getElementById() should work as long as you use it properly. If you still need help, post whatever code you do have or a link here so that people can help you out better. Even if it is messy, it can still help out.