PDA

View Full Version : Dynamic source change for embedded objects?


mathias
11-18-2000, 03:57 PM
Does anyone know whether it is possible to dynamically (e.g. when you press a button) change the source for an embedded object in an HTML page, such as a RealVideo clip or a Flash movie? More specifically, I need a button that calls up a new RealVideo clip and a new Flash movie to replace the existing ones on screen.

Dreamweaver inserts both <object> and <embed> tags, I assume for cross-browser compatibility. I tried naming both tags and using javascript to change the SRC parameter by reassigning document.all.name.src to a different value (sort of like an image swap), but that creates an error when I apply it to the RealVideo object (haven't tried the Flash movie yet). I'm speculating that the problem is either that I'm not properly addressing the object tags, or that the rerouting through the metafile and SMIL file that Real does for embedded clips gets in the way of simply changing the source (I pointed to a different .rpm file which references a different SMIL file with a URL for the new clip).