The EmbeddedObject component provides the ability to used embedded content on the client browser. For example ActiveX controls or Shockwave Flash movies can be served using this control.
The component has some basic properties, that correspond directly to the HTML EMBED tag attributes, as well as the ability to allows you to add custom parameters that the embedded content might need.
There is also a tweak for client browsers other than Microsoft Internet Explorer. If you set setEmbedTagUsed() to true, then the EMBED tag will also be used and will enable Netscape derived browsers to render the embedded content.
|
|
EmbeddedObject obj = new EmbeddedObject();
obj.setIdentifier("swfID");
obj.setClassId("clsid:D27CDB6E-AE6D-11cf-96B8-444553540000");
obj.setContentType("application/x-shockwave-flash");
obj.setWidth("500");
obj.setHeight("400");
obj.addParameter("movie",flashMovie);
obj.addParameter("quality","high");
obj.addParameter("bgcolor","#000000");
obj.addParameter("salign","t");
obj.addParameter("loop","false");
obj.setEmbedTagUsed(true);
obj.setSrc(flashMovie);
obj.setCodeBase("http://active.macromedia.com/flash2" +
"/cabs/swflash.cab#version=4,0,0,0");
obj.setPluginsPage("http://www.macromedia.com" +
"/go/getflashplayer");
|