instantiating a silverlight plug-in
The following JavaScript example shows a call to Silverlight.createObjectEx , with parameter values ??corresponding to the previous example. function createSilverlightEx () {Silverlight.createObjectEx ({ source: lugin.xaml / / ??Source property value. parentElement: parentElement, / / ??DOM reference to hosting DIV tag. id: yPlugin / / ??Unique plug-in ID value. properties: {/ / Plug-in properties. width: 024 / / ??Width of rectangular region of plug-in, in pixels. height: 30 / / ??Height of rectangular region of plug-in, in pixels. inplaceInstallPrompt: false, / / ??Determines whether to display in-place install prompt if invalid version is detected. background: hite / / ??Background color of plug-in. isWindowless: alse / / ??Determines whether to display plug-in in windowless mode. framerate: 24 / / ??MaxFrameRate property value. version: .0 , / / ??Silverlight version. events: {onError: null, / / ??OnError property value – event-handler function name. onLoad: null}, / / ??OnLoad property value – event-handler function name. initParams: null, / / ??initParams property value – user-settable string for information passing. context: null}); / / Context value – passed to Silverlight.js onLoad event handlers.}
frameRate Specifies the maximum number of frames to render per second. This value can be retrieved and set at run time through the SilverlightObject.settings.MaxFrameRate property. The actual frame rate that Silverlight content renders depends on system load performance. The maximum frame rate is 64. If the property is set to a value that is greater than 64, it is considered to be set to 64. The default value is 24.
The strings that communicate versions of the Silverlight plug-in use the following format: Generally speaking, the versions you pass in the CreateObject or IsInstalled function only need to specify versionMajor.versionMinor. The full build and revision numbers of the version of Silverlight that is installed may or may not match the numbers specified in the function parameter. If a more specific check succeeds, a less specific check must succeed as well. For example, if IsVersionSupported (“1.0.01820.55 “) returns true , bothIsVersionSupported (” 1.0.01820 “) and IsVersionSupported (” 1.0 “) must return true . Conversely, if a less specific check fails, a more specific check must fail, too. For example, if IsVersionSupported (“1.0″) returns false
