/// Type.registerNamespace("Adasoft"); Type.registerNamespace("Adasoft.WIY"); Type.registerNamespace("Adasoft.WIY.UI"); Adasoft.WIY.UI.WMPlayer = function (element) { Adasoft.WIY.UI.WMPlayer.initializeBase(this, [element]); this._params = []; this._attributes = []; this._embedAttributes = []; this._root = element; } Adasoft.WIY.UI.WMPlayer.prototype = { initialize: function () { Adasoft.WIY.UI.WMPlayer.callBaseMethod(this, 'initialize'); this._buildTag(); }, dispose: function () { Adasoft.WIY.UI.WMPlayer.callBaseMethod(this, 'dispose'); } , get_params: function () { return this._params; } , set_params: function (val) { this._params = val; } , get_attributes: function () { return this._attributes; } , set_attributes: function (val) { this._attributes = val; } , get_embedAttributes: function () { return this._embedAttributes; } , set_embedAttributes: function (val) { this._embedAttributes = val; } , _addAtt: function (node, name, value) { var att = document.createAttribute(name); att.nodeValue = value; node.setAttributeNode(att); } , _buildTag: function () { var object = document.createElement('object'); this._root.appendChild(object); for (var name in this._params) { var nn = document.createElement("param"); this._addAtt(nn, "value", this._params[name]); this._addAtt(nn, "name", name); object.appendChild(nn); } for (var name in this._attributes) { this._addAtt(object, name, this._attributes[name]); } var embed = document.createElement('embed'); try { object.appendChild(embed); for (var name in this._embedAttributes) { this._addAtt(embed, name, this._embedAttributes[name]); } } catch (e) { } } } Adasoft.WIY.UI.WMPlayer.registerClass('Adasoft.WIY.UI.WMPlayer', Sys.UI.Control);