views:

20

answers:

1

I have a JavaScript function that loads a flash movie into a webpage div using swfobject.embedSWF().

I want to be able to, alternatively, load a .mov file into the same div, in the event that this is the file found instead of the .swf.

Is there a close equivalent to swfobject.embedSWF for the purposes of embedding a .mov file? If not, what is an efficient route to doing this using JavaScript?

+1  A: 

QTObject might do what you need and it's from the same author as SWFObject. It's old though, so I'm not sure if it will work well in modern browsers.

EDIT I searched and found reports of it working fine in IE7, Firefox 2 and Opera 9, so you might just be in luck. Just make sure you test it thoroughly.

Andy E
Thank you, that looks functional! There's the slight headache of it not taking a parameter for which page element to write the QT movie into... but life wouldn't be fun without a few challenges...
thesunneversets
Oh wait, no, myQTObject.write("display_area") does work. So it's basically perfect! Many thanks.
thesunneversets