The Silverlight Streaming control defines the following events:
|
Event
|
Description
|
| onAbort | Fired when Silverlight is not installed on the browser client. |
| onInit | Fired before the control attributes are processed. Useful for setting the initParams attribute programmatically. |
| onLoad | Fired after the Silverlight frame has loaded. |
| onError | Fired when an error occurs during control initialization. |
To use the onInit event to set the initParams attribute dynamically, set the onInit attribute to the name of a function that sets the initialization parameters, as shown in the following example:
<script type="text/javascript">
function OnInitFunction()
{
document.getElementById('c').setAttribute("initParams", "x=1;y=" + new Date());
}
</script>
<devlive:slscontrol
id="c"
onInit="OnInitFunction";
silverlightVersion="1.0"
src="/32/MySilverlightApp/"
installationMode="popup">
</devlive:slscontrol>