I'd solved problem with flash objects embeded in smartgGWT's canvas described in post http://forums.smartclient.com/showthread.php?t=4356.
SWFObject embed flash object with CSS property "visibility" always equals "visible". But API of swf2gwt (http://code.google.com/p/gwt2swf) allow run preinjection and postenjectin acttions. Using postejection, I'm set visibility of embedeb SWF to "inherit".
Next class, inheritted from SWFWidget class (see swf2gwt), implement this.
I'm glad, this help you.
SWFObject embed flash object with CSS property "visibility" always equals "visible". But API of swf2gwt (http://code.google.com/p/gwt2swf) allow run preinjection and postenjectin acttions. Using postejection, I'm set visibility of embedeb SWF to "inherit".
Next class, inheritted from SWFWidget class (see swf2gwt), implement this.
Code:
package site.client.widgets; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Element; import pl.rmalinowski.gwt2swf.client.ui.SWFSettings; import pl.rmalinowski.gwt2swf.client.ui.SWFWidget; public class SmartSWFWidget extends SWFWidget { public SmartSWFWidget(String src) { super(src); } public SmartSWFWidget(String src, SWFSettings settings) { super(src, settings); } public SmartSWFWidget(String src, int width, int height) { super(src, width, height); } public SmartSWFWidget(String src, String width, String height) { super(src, width, height); } public SmartSWFWidget(String src, int width, int height, SWFSettings settings) { super(src, width, height, settings); } public SmartSWFWidget(String src, String width, String height, SWFSettings settings) { super(src, width, height, settings); } private void smartVisibility(Element elem){ DOM.setElementAttribute(elem, "style", "visibility:inherit"); } protected void onAfterSWFInjection() { smartVisibility(getElement()); smartVisibility((Element) getElement().getFirstChildElement()); } }
Comment