answered
2014-09-29 06:26:53 +0800
cor3000 6280 ● 2 ● 7 You can create a custom "mold" to have direct control over the generated markup, before it is parsed into dom nodes.
The mold could look like this, adding the missing param/attribute added to a folder in your classpath
/web/flashFul.js based on zul.jar:/web/js/zul/med/mold/flash.src.js
function (out) {
out.push('<div', this.domAttrs_({width:true,height:true}),
'><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=',
this._version, '" width="', this._width||'', '" height="', this._height||'',
'"><param name="movie" value="', this._src,
'"></param><param name="wmode" value="', this._wmode,
'"></param><param name="quality" value="', this._quality,
'"></param><param name="autoplay" value="', this._autoplay,
'"></param><param name="allowFullScreen" value="', true,
'"></param><param name="loop" value="', this._loop,
'"></param>');
var bgc;
if (bgc = this._bgcolor)
out.push('<param name="bgcolor" value="', bgc, '"></param>'); // ZK-740
out.push('<embed id="', this.uuid, '-emb" src="', this._src,
'" type="application/x-shockwave-flash" wmode="', this._wmode,
'" quality="', this._quality,
'" autoplay="', this._autoplay,
'" allowFullScreen="', true,
'" loop="', this._loop,
'" width="', this._width||'', '" height="', this._height||'',
'"');
if (bgc) out.push(' bgcolor="', bgc, '"');
out.push('></embed></object></div>');
}
the flash component can be configured in a /WEB-INF/lang-addon.xml
<language-addon>
<addon-name>mb-technik-addons</addon-name>
<language-name>xul/html</language-name>
<component>
<component-name>flash</component-name>
<extends>flash</extends>
<mold>
<mold-name>full</mold-name>
<mold-uri>~./flashFull.js</mold-uri><!-- ~./ will load from the package folder "/web" -->
</mold>
</component>
</language-addon>
the langguage addon is enabled in the zk.xml (see)
<language-config>
<addon-uri>/forum/flash/lang-addon.xml</addon-uri>
</language-config>
the your zul file can use the new mold:
<zk xmlns:w="client">
<flash id="flashComp" mold="full" src="sampleMx.swf" height="300" width="800">
</flash>
</zk>
I used the file sampleMx.swf of this flash fullscreen example
here my successful test
Robert