Core-Gadget - Flash Feature
This is a DRAFT
<section title="Flash Feature (gadgets.flash)" anchor="gadgets.flash">
<t>The "Flash" feature provides three JavaScript methods that
simplify the embedding of Flash-based content in gadgets.
The feature is enabled by specifying feature="flash" using
either the <Require> or <Optional> elements in
the <ModulePrefs>. The "Flash" feature defines no
parameters.</t>
<t>Containers SHOULD support the "Flash" feature.</t>
<figure><preamble>In the partial gadget specification below,
we declare that the "flash" feature is required and render a
remote flash resource within the default view:</preamble><artwork>
<Module>
<ModulePrefs>
...
<Require feature="flash" />
...
</ModulePrefs>
<Content type="html"><[CDATA[
<div id="container"></div>
<script>
...
gadgets.flash.embedCachedFlash(
"http://example.org/content/movie.swf",
"container", 11
);
...
</script>
]]></Content>
</Module>
</artwork></figure>
<section title="JavaScript API">
<t>The following JavaScript APIs are enabled when the "Flash"
feature is enabled for a gadget.</t>
<section title="gadgets.flash.embedCachedFlash" anchor="gadgets.flash.embedCachedFlash">
<t>Embeds a cached Flash document into a container DOM
object.</t>
<figure><artwork>
<static> <Boolean> gadgets.flash.embedCachedFlash(url, container, version, options)
</artwork></figure>
<t>Input Parameters:
<texttable align="left">
<ttcol>Name</ttcol>
<ttcol>Type</ttcol>
<ttcol>Description</ttcol>
<c>url</c>
<c>String</c>
<c>The IRI of the Flash resource to embed.</c>
<c>container</c>
<c>String | Object</c>
<c>Specifies either the DOM identifier or object reference for
the existing container object (e.g. a <div>) within which the
Flash content will be embedded.</c>
<c>version</c>
<c>Number</c>
<c>Specifies the minimum Flash Player version required to
support the embedded content.</c>
<c>options</c>
<c>Object</c>
<c>An optional object that MAY contain any property that is
valid for the HTML <embed> tag. These properties will be
passed directly through the <embed> tag generated by the
API call.</c>
</texttable>
</t>
<t>The method will return either <spanx style="verb">True</spanx>
or <spanx style="verb">False</spanx> to indicate whether the
method completed successfully or not.</t>
</section>
<section title="gadgets.flash.embedFlash" anchor="gadgets.flash.embedFlash">
<t>Embeds a cached Flash document into a container DOM
object.</t>
<figure><artwork>
<static> <Boolean> gadgets.flash.embedCachedFlash(url, container, version, options)
</artwork></figure>
<t>Input Parameters:
<texttable align="left">
<ttcol>Name</ttcol>
<ttcol>Type</ttcol>
<ttcol>Description</ttcol>
<c>url</c>
<c>String</c>
<c>The IRI of the Flash resource to embed.</c>
<c>container</c>
<c>String | Object</c>
<c>Specifies either the DOM identifier or object reference for
the existing container object (e.g. a <div>) within which the
Flash content will be embedded.</c>
<c>version</c>
<c>Number</c>
<c>Specifies the minimum Flash Player version required to
support the embedded content.</c>
<c>options</c>
<c>Object</c>
<c>An optional object that MAY contain any property that is
valid for the HTML <embed> tag. These properties will be
passed directly through the <embed> tag generated by the
API call.</c>
</texttable>
</t>
<t>The method will return either <spanx style="verb">True</spanx>
or <spanx style="verb">False</spanx> to indicate whether the
method completed successfully or not.</t>
</section>
<section title="gadgets.flash.getMajorVersion" anchor="gadgets.flash.getMajorVersion">
<t>Returns the major version of the Flash player supported by the
container.</t>
<figure><artwork>
<static> >Number> gadgets.flash.getMajorVersion()
</artwork></figure>
</section>
</section>
</section>
<!-- END FLASH -->