[Laszlo-checkins] r5594 - in openlaszlo/branches/doctools: WEB-INF/lps/lfc/controllers WEB-INF/lps/lfc/data WEB-INF/lps/lfc/helpers WEB-INF/lps/lfc/services WEB-INF/lps/lfc/services/platform/dhtml WEB-INF/lps/lfc/views docs/src/developers docs/src/developers/programs docs/src/developers/tutorials docs/src/xsl lps/components/base lps/components/charts/common lps/components/incubator lps/components/incubator/rich-text lps/components/lzunit

jgrandy@openlaszlo.org jgrandy at openlaszlo.org
Thu Jul 5 10:08:26 PDT 2007


Author: jgrandy
Date: 2007-07-05 10:08:17 -0700 (Thu, 05 Jul 2007)
New Revision: 5594

Added:
   openlaszlo/branches/doctools/docs/src/developers/programs/media-resources-$9.lzx
Modified:
   openlaszlo/branches/doctools/WEB-INF/lps/lfc/controllers/LaszloAnimation.lzs
   openlaszlo/branches/doctools/WEB-INF/lps/lfc/controllers/LaszloLayout.lzs
   openlaszlo/branches/doctools/WEB-INF/lps/lfc/controllers/LzAnimatorGroup.lzs
   openlaszlo/branches/doctools/WEB-INF/lps/lfc/data/LzDataset.lzs
   openlaszlo/branches/doctools/WEB-INF/lps/lfc/helpers/LzCommand.lzs
   openlaszlo/branches/doctools/WEB-INF/lps/lfc/services/LzURL.lzs
   openlaszlo/branches/doctools/WEB-INF/lps/lfc/services/platform/dhtml/LzBrowser.js
   openlaszlo/branches/doctools/WEB-INF/lps/lfc/views/LaszloCanvas.lzs
   openlaszlo/branches/doctools/docs/src/developers/browser-integration.dbk
   openlaszlo/branches/doctools/docs/src/developers/debugging.dbk
   openlaszlo/branches/doctools/docs/src/developers/media-resources.dbk
   openlaszlo/branches/doctools/docs/src/developers/methods-events-attributes.dbk
   openlaszlo/branches/doctools/docs/src/developers/persistent_connection.dbk
   openlaszlo/branches/doctools/docs/src/developers/rpc-soap.dbk
   openlaszlo/branches/doctools/docs/src/developers/rpc.dbk
   openlaszlo/branches/doctools/docs/src/developers/survey-chapter.dbk
   openlaszlo/branches/doctools/docs/src/developers/text.dbk
   openlaszlo/branches/doctools/docs/src/developers/tutorials/art_assets.dbk
   openlaszlo/branches/doctools/docs/src/developers/tutorials/drawview-intro.dbk
   openlaszlo/branches/doctools/docs/src/xsl/dbkpreprocessexamples.xsl
   openlaszlo/branches/doctools/docs/src/xsl/js2doc-comment2dbk.xsl
   openlaszlo/branches/doctools/docs/src/xsl/js2doc2dbk.xsl
   openlaszlo/branches/doctools/lps/components/base/basedatepicker.lzx
   openlaszlo/branches/doctools/lps/components/base/basedatepickerday.lzx
   openlaszlo/branches/doctools/lps/components/base/basedatepickerweek.lzx
   openlaszlo/branches/doctools/lps/components/base/basescrollbar.lzx
   openlaszlo/branches/doctools/lps/components/charts/common/viewspoolmanager.lzx
   openlaszlo/branches/doctools/lps/components/incubator/draglib.lzx
   openlaszlo/branches/doctools/lps/components/incubator/rich-text/formatbtn.lzx
   openlaszlo/branches/doctools/lps/components/lzunit/lzunit.lzx
Log:
improve index generation for properties

Modified: openlaszlo/branches/doctools/WEB-INF/lps/lfc/controllers/LaszloAnimation.lzs
===================================================================
--- openlaszlo/branches/doctools/WEB-INF/lps/lfc/controllers/LaszloAnimation.lzs	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/WEB-INF/lps/lfc/controllers/LaszloAnimation.lzs	2007-07-05 17:08:17 UTC (rev 5594)
@@ -5,6 +5,8 @@
   *            Use is subject to license terms.
   * @affects animation lzanimator
   * @access public
+  * @topic LFC
+  * @subtopic Controllers
   */
 
 /**
@@ -28,8 +30,6 @@
   * @lzxname animator
   * @shortdesc Changes the value of another object's attribute over time.
   * @see animatorgroup
-  * @topic LFC
-  * @subtopic Animation
   */
 class LzAnimator extends LzAnimatorGroup {
 

Modified: openlaszlo/branches/doctools/WEB-INF/lps/lfc/controllers/LaszloLayout.lzs
===================================================================
--- openlaszlo/branches/doctools/WEB-INF/lps/lfc/controllers/LaszloLayout.lzs	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/WEB-INF/lps/lfc/controllers/LaszloLayout.lzs	2007-07-05 17:08:17 UTC (rev 5594)
@@ -5,7 +5,7 @@
   *            Use is subject to license terms.
   *
   * @topic LFC
-  * @subtopic Layouts
+  * @subtopic Controllers
   * @affects lzlayout
   * @access public
   */

Modified: openlaszlo/branches/doctools/WEB-INF/lps/lfc/controllers/LzAnimatorGroup.lzs
===================================================================
--- openlaszlo/branches/doctools/WEB-INF/lps/lfc/controllers/LzAnimatorGroup.lzs	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/WEB-INF/lps/lfc/controllers/LzAnimatorGroup.lzs	2007-07-05 17:08:17 UTC (rev 5594)
@@ -4,7 +4,7 @@
   *
   * @affects animation lzanimatorgroup
   * @topic LFC
-  * @subtopic Animation
+  * @subtopic Controllers
   * @access public
   */
 

Modified: openlaszlo/branches/doctools/WEB-INF/lps/lfc/data/LzDataset.lzs
===================================================================
--- openlaszlo/branches/doctools/WEB-INF/lps/lfc/data/LzDataset.lzs	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/WEB-INF/lps/lfc/data/LzDataset.lzs	2007-07-05 17:08:17 UTC (rev 5594)
@@ -40,7 +40,7 @@
   * </ul>
   * 
   * <p>
-  * If a dataset is not explictly contained within in a <xref linkend="datasource"/>, it will make an instance of datasource and be contained inside that. A dataset can be populated or re-poplulated at runtime by calling <code>doRequest</code> on the dataset. The result of the request is then returned to the application and the dataset's <xref linkend="LzDataset.prototype.ondata"/> event is run. Any <xref linkend="LzDatapointer"/> that is bound to the dataset will also run its <link linkend="LzDatapointer.prototype.ondata">ondata</link> event at this time as well.
+  * If a dataset is not explictly contained within in a <xref linkend="LzDatasource"/>, it will make an instance of datasource and be contained inside that. A dataset can be populated or re-poplulated at runtime by calling <code>doRequest</code> on the dataset. The result of the request is then returned to the application and the dataset's <xref linkend="LzDataset.prototype.ondata"/> event is run. Any <xref linkend="LzDatapointer"/> that is bound to the dataset will also run its <link linkend="LzDatapointer.prototype.ondata">ondata</link> event at this time as well.
   * </p>
   * <p>See the <a href="${dguide}data-structures.html">Developers's Guide</a> for more discussion of data and datasets. </p>
   * <p>

Modified: openlaszlo/branches/doctools/WEB-INF/lps/lfc/helpers/LzCommand.lzs
===================================================================
--- openlaszlo/branches/doctools/WEB-INF/lps/lfc/helpers/LzCommand.lzs	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/WEB-INF/lps/lfc/helpers/LzCommand.lzs	2007-07-05 17:08:17 UTC (rev 5594)
@@ -24,7 +24,7 @@
   *     <li> <a href="${demos}contacts/contacts.lzx">Contacts</a></li>
   * 
   * </ul>
-  * Also, see <xref linkend="LzKeys"/>.
+  * Also, see <xref linkend="LzKeys+dhtml"/> or <xref linkend="LzKeys+swf7+swf8+swf9"/>.
   * 
   * @devnote A command is an object that sends an event in response to keyboard input.
   * @shortdesc An element that sends events in response to keyboard input.

Modified: openlaszlo/branches/doctools/WEB-INF/lps/lfc/services/LzURL.lzs
===================================================================
--- openlaszlo/branches/doctools/WEB-INF/lps/lfc/services/LzURL.lzs	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/WEB-INF/lps/lfc/services/LzURL.lzs	2007-07-05 17:08:17 UTC (rev 5594)
@@ -4,6 +4,8 @@
   *            Use is subject to license terms.
   *
   * @affects lzurl
+  * @topic LFC
+  * @subtopic Services
   * @access public
   */
 
@@ -14,16 +16,15 @@
   *
   * http://www.ietf.org/rfc/rfc2396.txt specifies the syntax for a URI
   *
-   We also need to handle these cases that  OpenLaszlo allows
-   which aren't real URLs:
-
-  http:foo.html
-  http:/foo/bar.html
-  http:foo.ksp?q=12
-  http:/foo.ksp?q=12
-  http:/foo/bar.ksp?q=12
-
-
+  * We also need to handle these cases that  OpenLaszlo allows
+  * which aren't real URLs:
+  * 
+  * http:foo.html
+  * http:/foo/bar.html
+  * http:foo.ksp?q=12
+  * http:/foo.ksp?q=12
+  * http:/foo/bar.ksp?q=12
+  * 
   */
 function LzURL( url ){
     this.protocol = null;

Modified: openlaszlo/branches/doctools/WEB-INF/lps/lfc/services/platform/dhtml/LzBrowser.js
===================================================================
--- openlaszlo/branches/doctools/WEB-INF/lps/lfc/services/platform/dhtml/LzBrowser.js	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/WEB-INF/lps/lfc/services/platform/dhtml/LzBrowser.js	2007-07-05 17:08:17 UTC (rev 5594)
@@ -5,8 +5,8 @@
   *
   * @affects lzbrowser
   * @access public
-  * @topic Kernel
-  * @subtopic DHTML
+  * @topic LFC
+  * @subtopic Services
   */
 
 var LzBrowser = new Object;

Modified: openlaszlo/branches/doctools/WEB-INF/lps/lfc/views/LaszloCanvas.lzs
===================================================================
--- openlaszlo/branches/doctools/WEB-INF/lps/lfc/views/LaszloCanvas.lzs	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/WEB-INF/lps/lfc/views/LaszloCanvas.lzs	2007-07-05 17:08:17 UTC (rev 5594)
@@ -32,14 +32,14 @@
   *
   * <p>In addition to any fields documented in the section at the end, these fields are also available:
   * <ul>
-  * <li><attribute>anm_multipler</attribute> A <Type>Number</Type> specifying the animation speed.</li>
+  * <li><attribute>anm_multipler</attribute> A <type>Number</type> specifying the animation speed.</li>
   * <li><attribute>embedfonts</attribute> A <type>Boolean</type> true | false. Whether to embed fonts in the compiled application.</li>
   * <li><attribute>lpsbuild</attribute> A <type>String</type> specifying the LPS build revision and the build directory: e.g. "4075 /Users/maxcarlson/openlaszlo/legals"</li>
-  * <li><attribute>lpsbuilddate</attribute> A <Type>String</Type> specifying the date and time of the LPS build. "2007-03-05T15:33:42-0800"</li>
-  * <li><attribute>lpsrelease</attribute> A <Type>String</Type> specifying the LPS release type, e.g. "Latest" </li>
-  * <li><attribute>lpsversion</attribute> A <Type>String</Type> specifying the LPS version, e.g. "4.0.x"</li>
+  * <li><attribute>lpsbuilddate</attribute> A <type>String</type> specifying the date and time of the LPS build. "2007-03-05T15:33:42-0800"</li>
+  * <li><attribute>lpsrelease</attribute> A <type>String</type> specifying the LPS release type, e.g. "Latest" </li>
+  * <li><attribute>lpsversion</attribute> A <type>String</type> specifying the LPS version, e.g. "4.0.x"</li>
   * <li><attribute>proxied</attribute> A <type>Boolean</type> true | false</li>
-  * <li><attribute>runtime</attribute> A <Type>String</Type> describing the target runtime. "dhtml" | "swf7" | "swf8" are currently supported. Others are in development.</li>
+  * <li><attribute>runtime</attribute> A <type>String</type> describing the target runtime. "dhtml" | "swf7" | "swf8" are currently supported. Others are in development.</li>
   * <li><attribute>version</attribute>A String. The same as lpsversion. </li>
   * </ul></p>
   * @see LzView

Modified: openlaszlo/branches/doctools/docs/src/developers/browser-integration.dbk
===================================================================
--- openlaszlo/branches/doctools/docs/src/developers/browser-integration.dbk	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/docs/src/developers/browser-integration.dbk	2007-07-05 17:08:17 UTC (rev 5594)
@@ -581,7 +581,7 @@
 
 <title>Example: building a URL</title>
 <para>
-The <indexterm><primary><literal>LzBrowser.loadURL()()</literal></primary></indexterm><methodname>LzBrowser.loadURL()()</methodname> method is used
+The <methodname role="LzBrowser.prototype.loadURL">loadURL()</methodname> method is used
 to create a URL based on user input.  This URL is then communicated to browser, where a JavaScript function is 
 used to unpack it and fill in a form. The wrapper page is shown immediately below.
 </para>

Modified: openlaszlo/branches/doctools/docs/src/developers/debugging.dbk
===================================================================
--- openlaszlo/branches/doctools/docs/src/developers/debugging.dbk	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/docs/src/developers/debugging.dbk	2007-07-05 17:08:17 UTC (rev 5594)
@@ -405,7 +405,7 @@
 <para>The debugger provides methods that allow you to see interactions between parts of your application.</para>
 <para/><section><title>Tracing</title>
 <para>
-When you invoke the <indexterm><primary><literal>debug.trace()()</literal></primary></indexterm><methodname>debug.trace()()</methodname>, the debugger traces the named method of the object and prints a message to the Debug console each time it is called or returned from. When called, the message includes a timestamp, the name of the function and the arguments it was called with. When returned from, the message gives the name of the function and the value it returned (if any).  If backtraces are enabled, inspecting the message will reveal the call chain that caused the modification.
+When you invoke the <methodname role="LzDebug.prototype.trace">trace()</methodname>, the debugger traces the named method of the object and prints a message to the Debug console each time it is called or returned from. When called, the message includes a timestamp, the name of the function and the arguments it was called with. When returned from, the message gives the name of the function and the value it returned (if any).  If backtraces are enabled, inspecting the message will reveal the call chain that caused the modification.
 </para>
 <para/></section><section><title>Backtracing</title>
 <para>
@@ -440,9 +440,9 @@
 <para>
 A running OpenLaszlo application allocates parts of available virtual memory to store objects.  When these objects are no longer needed the memory should be released by the application in order to become once again available for other use.  Sometimes unneeded memory is not properly released, in which case the application tends to slow down over time as less and less memory becomes available.  This is "leaking memory."  The OpenLaszlo debugger can help you find memory leaks.
 </para><para>
-Three methods on <literal>__LzDebug</literal> are used to find leaks:</para>
+Three methods on <classname>__LzDebug</classname> are used to find leaks:</para>
 
-<orderedlist spacing="compact"><listitem><para><indexterm><primary><literal>markObjects()()</literal></primary></indexterm><methodname>markObjects()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>findNewObjects()()</literal></primary></indexterm><methodname>findNewObjects()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>whyAlive()()</literal></primary></indexterm><methodname>whyAlive()()</methodname></para></listitem></orderedlist>
+<orderedlist spacing="compact"><listitem><para><methodname role="LzDebug.prototype.markObjects">markObjects()</methodname></para></listitem><listitem><para><methodname role="LzDebug.prototype.findNewObjects">findNewObjects()</methodname></para></listitem><listitem><para><methodname role="LzDebug.prototype.whyAlive">whyAlive()</methodname></para></listitem></orderedlist>
 
 <para>
 You use them in that order.  Typically, you will start up your program, run it for a bit until you think it has reached a steady state.  Then invoke <literal>__LzDebug.markObjects()</literal>.  This runs in the background and will mark all the objects that are currently in use.  When you see the output '''Trace Done''' you can move on to the next step.

Modified: openlaszlo/branches/doctools/docs/src/developers/media-resources.dbk
===================================================================
--- openlaszlo/branches/doctools/docs/src/developers/media-resources.dbk	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/docs/src/developers/media-resources.dbk	2007-07-05 17:08:17 UTC (rev 5594)
@@ -1,530 +1,438 @@
 <chapter id="media-resources">
-
-<title>Media Resources</title>
- 
-<para>This chapter describes how to include external media resources (images, audio, animation, and video)
-into OpenLaszlo applications.</para>
-
-<para/><section><title>Overview</title>
-<para>LZX is designed to make it easy for you to integrate media resources into your application
-in a flexible and dynamic manner.  You can include images, audio, video, and animations
-that were created using standard third-party content creation tools.  
-This chapter describes the media formats that are currently supported as resources to <indexterm><primary>view</primary></indexterm><sgmltag class="element">&lt;view&gt;</sgmltag><remark role="fixme">[unknown tag]</remark>
-<!--unknown tag: view-->
-s in
-OpenLaszlo 4.0. It then goes on to describes how to integrate and control 
-media in your application.  It concludes with some
-optimization tips.</para>
-<para>
-Note that in addition to media that can be attached as resources to views, streaming audio and video can be played by <indexterm><primary>videoview</primary></indexterm><sgmltag class="element">&lt;videoview&gt;</sgmltag><remark role="fixme">[unknown tag]</remark>
-<!--unknown tag: videoview-->
-s.  Please see <xref linkend="video"/> for a discussion of streaming media.
-</para>
-<para>
-For a discussion of streaming media, see <xref linkend="video"/>.
-</para>
-
-<para/></section><section><title>Supported media types</title>
-<para>
-The list of supported media types varies slightly depending on the target runtime and whether the application is to be deployed SOLO or proxied. 
-</para>
-<para/><section><title condition="swf">Media for SWF SOLO applications</title>
-<para>
-SOLO applications compiled to SWF depend on Flash to load images (whereas the proxied applications get help from the transcoder on the server). This means that SOLO applications are limited to file types supported natively by Flash.</para>
-<para/><section><title>Flash 7 and Flash 8 limitations</title>
-<para>
-Flash player version 7 it can only load a limited set
-of jpegs encodings; it cannot do interleaved or progressive jpeg. If you run
-Flash player 8 it can do more wide range of jpeg encoding. Set the compiler to compile for Flash 8 as a target
-runtime to get this expanded range of image formats (also PNG and GIF).
-</para>
-<para/></section></section><section><title condition="dhtml">DHTML Limitations and workaround</title>
-<para>
-Browsers do not natively support .swf or audio or video formats. You must transcode them, omit them from your application, or embed a flash player in your application to handle them.
-</para>
-<para/><section><title>Transcoding .swf to .png</title>
-<para>
-Files in .swf format can be transcoded to .png format for display by the DHTML runtime.  OpenLaszlo provides a facility, called <literal>autopng</literal>, for doing this automatically. As a convenience, the server and compiler search for a corresponding png file if a swf file is referenced in the DHTML runtime. To use this mechanism in your own code, create a png file with the same basename as the swf file, and place it in the same directory as the swf resource you want it to replace.
-</para>
-<para/></section><section><title>Audio and Video in DHTML applications</title>
-<note><para>
-The following discussion applies to audio and video resources attached to <indexterm><primary>view</primary></indexterm><sgmltag class="element">&lt;view&gt;</sgmltag>s, not to <indexterm><primary>videoview</primary></indexterm><sgmltag class="element">&lt;videoview&gt;</sgmltag>s. <indexterm><primary>videoview</primary></indexterm><sgmltag class="element">&lt;videoview&gt;</sgmltag>s are not supported at all for the DHTML runtime.
-</para></note>
-<para>
-In order to display swf-formatted audio and video within a DHTML application, you may embedd a swf player in the page. For a discussion of how to do this, see <xref linkend="browser-integration"/>.
-</para>
-<para/></section></section><section><title>Summary of Supported Media</title>
-<para>
-OpenLaszlo 4.0 and above support the following media types:</para>
-<variablelist><varlistentry><term>JPEG</term><listitem><para>Depending on target runtime and mode of deployment, different .jpg and .jpeg files are supported. Progressive and interleaved files are not supported for Flash 7 SOLO deployment. See the <ulink url="http://www.w3.org/Graphics/JPEG/">W3C JPEG JFIF Specification</ulink>.
-  <note><para><emphasis role="i">Progressive</emphasis> files are re-encoded in the OpenLaszlo Server.</para></note>
-  </para></listitem></varlistentry><varlistentry><term>GIF</term><listitem><para>All .gif files are supported.  See the <ulink url="http://www.w3.org/Graphics/GIF/spec-gif89a.txt">GIF Spec</ulink>.
- 
-  </para></listitem></varlistentry><varlistentry><term>PNG</term><listitem><para>All Portable Network Graphics files (<ulink url="http://www.w3.org/Graphics/PNG/">PNG details at W3C information</ulink>)
-  are supported.  This includes PNGs with alpha channels (transparency).</para></listitem></varlistentry><varlistentry><term>MP3</term><listitem><para condition="swf">For proxied applications compiled to .swf, support is limited to audio MP3 files with <emphasis role="i">sample</emphasis>-rates of 44.1 kHz, 22.050 kHz, 11.025 kHz, 8.000 kHz and 5.512 kHz.</para>
-  <para>
-  Flash behaves poorly with mp3s it doesn't like, which makes tracking down problems difficult. If you run into a problem, a good idea would be to find out whether your mp3 plays in a standalone Flash app separate from OpenLaszlo.  (You can use the mtasc.org compiler to test this, using Flash's Sound class to load an play your mp3.)  If your mp3 works does not work in standalone Flash, hen the problem is not OpenLaszlo. 
-  </para>
-  Mp3s are not natively supported by browsers, so applications that compile to DHTML should make provisions, as described above.
-  <para>
-  </para></listitem></varlistentry><varlistentry><term>SWF</term><listitem><para>Macromedia Flash (SWF) files. (See <ulink url="http://www.macromedia.com/software/flash/open/licensing/fileformat/">Macromedia documentation</ulink>).</para>
-  <para>For applications compiled to Flash, support is limited to SWF files that contain stills or animation only. Very limited ActionScript is allowed/supported (see below for more details).
-  </para>
-  <para>
-  For applications compiled to DHTML, .swf format files are not supported. See above for a workaround.
-  </para></listitem></varlistentry></variablelist>
-<para>
-For up-to-date discussion of supported media and considerations about their deployment in various runtimes, see the <ulink url="http://wiki.openlaszlo.org/MediaSupport">OpenLaszlo Wiki</ulink>.
-</para>
-<para/></section></section><section><title>Views and resources</title>
-<para>
-The <indexterm><primary>view</primary></indexterm><sgmltag class="element">&lt;view&gt;</sgmltag><remark role="fixme">[unknown tag]</remark>
-<!--unknown tag: view-->
- is the most basic viewable 
-element in an OpenLaszlo application and it is described in the chapter on <ulink url="views.html">views</ulink>.
-A view may have a <emphasis role="i">resource</emphasis> attached to it.  The 
-resource represents a piece of media (image, audio, video, or animation) that the 
-view controls.  For images, the view typically displays the image.  For 
-time-based media (audio, video, animation), the view can be used to start, stop, or jump
-to a specific frame or time in the media.  </para>
-<para>For a simple informal introduction to attaching resources to views, see <xref linkend="art_assets"/>. The chapter you're reading now briefly
-goes over topics covered in that tutorial and then goes into greater depth.</para>
-
-
-<para>Resources may be declared directly inside a view using the view's <indexterm><primary>resource</primary></indexterm><sgmltag class="attribute">resource</sgmltag> attribute:</para>
-<example role="live-example">
-   <title>Importing a resource</title>
-   <programlisting language="lzx">
-   <textobject><textdata fileref="programs/media-resources-$1.lzx"/></textobject> 
-   </programlisting>
-</example>
-<?example role="live-example"><title>Importing a resource</title><programlisting role="lzx-embednew"><filename>media-resources-$1.lzx</filename><parameter/><code>
-&lt;canvas height="110"&gt;
-  &lt;view resource="../resources/logo.gif"/&gt;
-&lt;/canvas&gt;
-</code></programlisting><programlisting>
-&lt;canvas height="110"&gt;
-  &lt;view resource="../resources/logo.gif"/&gt;
-&lt;/canvas&gt;
-</programlisting><?lzx-edit programs/media-resources-$1.lzx></example?>
-<para>Or they may be declared externally as first-class objects themselves: </para>
-
-<example role="live-example">
-   <title>Declaring a resource</title>
-   <programlisting language="lzx">
-   <textobject><textdata fileref="programs/media-resources-$2.lzx"/></textobject> 
-   </programlisting>
-</example>
-<?example role="live-example"><title>Declaring a resource</title><programlisting role="lzx-embednew"><filename>media-resources-$2.lzx</filename><parameter/><code>
-&lt;canvas height="110"&gt;
-  &lt;resource name="myname" src="../resources/logo.gif"/&gt;
-  &lt;view resource="myname"/&gt;
-&lt;/canvas&gt;
-</code></programlisting><programlisting>
-&lt;canvas height="110"&gt;
-  &lt;resource name="myname" src="../resources/logo.gif"/&gt;
-  &lt;view resource="myname"/&gt;
-&lt;/canvas&gt;
-</programlisting><?lzx-edit programs/media-resources-$2.lzx></example?>
-<para/><section><title>Resources are not views</title>
-<para>
-Note that a <indexterm><primary>resource</primary></indexterm><sgmltag class="element">&lt;resource&gt;</sgmltag><remark role="fixme">[unknown tag]</remark>
-<!--unknown tag: resource-->
-is <emphasis role="i">not</emphasis> itself a view.
- Resources do not have x and y positions, or background color,
-or any of the 49 or so attributes that views have. A resource that is not attached to a view is essentially invisible to the
-application. As explained below, in order to manipulate a resource, you perform actions on the view to which the resource is attached.
-</para>
-<para/></section><section><title>Summary of APIs that act on resources</title>
-<para>There are a number of view APIs (methods, fields, and events) that can 
-be used to find out about and control a view's resource.</para>
-<itemizedlist spacing="compact"><listitem><para>Resource and view size, scaling and stretching:
-        <itemizedlist spacing="compact"><listitem><para><structfield>LzView.resourcewidth</structfield></para></listitem><listitem><para><structfield>LzView.resourceheight</structfield></para></listitem><listitem><para><structfield>LzView.xscale</structfield></para></listitem><listitem><para><structfield>LzView.yscale</structfield></para></listitem><listitem><para><structfield>LzView.stretches</structfield></para></listitem><listitem><para><indexterm><primary><literal>LzView.stretchResource()()</literal></primary></indexterm><methodname>LzView.stretchResource()()</methodname></para></listitem><listitem><para><structfield>LzView.measureWidth()</structfield></para></listitem><listitem><para><structfield>LzView.measureHeight()</structfield></para></listitem><listitem><para><structfield>LzView.updateResourceSize()</structfield></para></listitem></itemizedlist>
-        </para><para><remark role="fixme">Discuss how view and resource sizes interact (need details
-        from Adam/Sarah since I'm not really sure)</remark></para>
-    </listitem><listitem><para>Resource loading (discussed <link linkend="media-resources.loading">below</link>):
-        <itemizedlist spacing="compact"><listitem><para><structfield>LzView.resource</structfield></para></listitem><listitem><para><indexterm><primary><literal>LzView.setSource()()</literal></primary></indexterm><methodname>LzView.setSource()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.unload()()</literal></primary></indexterm><methodname>LzView.unload()()</methodname></para></listitem><listitem><para><structfield>LzView.loadratio</structfield></para></listitem><listitem><para><structfield>LzView.framesloadratio</structfield></para></listitem><listitem><para><indexterm><primary>LzView.onload event</primary></indexterm><literal>LzView.onload</literal></para></listitem><listitem><para><indexterm><primary>LzView.onerror event</primary></indexterm><literal>LzView.onerror</literal></para></listitem><listitem><para><indexterm><primary>LzView.ontimeout event</primary></indexterm><literal>LzView.ontimeout</literal></para></listitem><listitem><para><indexterm><primary>LzView.onaddsubresource event</primary></indexterm><literal>LzView.onaddsubresource</literal></para></listitem></itemizedlist>
-    </para></listitem><listitem><para>Animation/video/frames:
-        <itemizedlist spacing="compact"><listitem><para><indexterm><primary><literal>LzView.play()()</literal></primary></indexterm><methodname>LzView.play()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.stop()()</literal></primary></indexterm><methodname>LzView.stop()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.seek()()</literal></primary></indexterm><methodname>LzView.seek()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.getTotalTime()()</literal></primary></indexterm><methodname>LzView.getTotalTime()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.getCurrentTime()()</literal></primary></indexterm><methodname>LzView.getCurrentTime()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.setResourceNumber()()</literal></primary></indexterm><methodname>LzView.setResourceNumber()()</methodname></para></listitem><listitem><para><structfield>LzView.frame</structfield></para></listitem><listitem><para><structfield>LzView.totalframes</structfield></para></listitem><listitem><para><indexterm><primary>LzView.onlastframe event</primary></indexterm><literal>LzView.onlastframe</literal></para></listitem><listitem><para><indexterm><primary>LzView.onplay event</primary></indexterm><literal>LzView.onplay</literal></para></listitem><listitem><para><indexterm><primary>LzView.onstop event</primary></indexterm><literal>LzView.onstop</literal></para></listitem></itemizedlist>
-    </para></listitem><listitem><para>Audio:
-        <itemizedlist spacing="compact"><listitem><para><indexterm><primary><literal>LzView.getVolume()()</literal></primary></indexterm><methodname>LzView.getVolume()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.setVolume()()</literal></primary></indexterm><methodname>LzView.setVolume()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.getPan()()</literal></primary></indexterm><methodname>LzView.getPan()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.setPan()()</literal></primary></indexterm><methodname>LzView.setPan()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.play()()</literal></primary></indexterm><methodname>LzView.play()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.stop()()</literal></primary></indexterm><methodname>LzView.stop()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.getTotalTime()()</literal></primary></indexterm><methodname>LzView.getTotalTime()()</methodname></para></listitem><listitem><para><indexterm><primary><literal>LzView.getCurrentTime()()</literal></primary></indexterm><methodname>LzView.getCurrentTime()()</methodname></para></listitem></itemizedlist>
-    </para></listitem></itemizedlist>
-<para/></section><section><title>Resource declarations and naming</title> 
-<para>
-When a resource is declared externally, it must be given a name.  The namespace for resources is
-global to the entire application. Resource tags can only be used
-as direct children of either the <indexterm><primary>canvas</primary></indexterm><sgmltag class="element">&lt;canvas&gt;</sgmltag><remark role="fixme">[unknown tag]</remark>
-<!--unknown tag: canvas-->
- or <indexterm><primary>library</primary></indexterm><sgmltag class="element">&lt;library&gt;</sgmltag><remark role="fixme">[unknown tag]</remark>
-<!--unknown tag: library-->
- tags. </para>
-
-<para>This style of resource inclusion makes it simpler to separate out art assets from code
-and can make for improved designer/developer interactions.</para>
-
-<para>When you directly import a resource without naming it, as in the first example,
-the LZX compiler assigns a unique name to that resource.</para>
-<para>Behavior when two resources share the same name is undefined. Therefore you should take care to make sure that each resource
-has a unique and appropriate name.</para>
-
-
-<para/></section></section><section><title>Multi-frame resources</title>
-<para>Laszlo supports the notion of a resource 
-<indexterm><primary>frame</primary></indexterm><sgmltag class="element">&lt;frame&gt;</sgmltag><remark role="fixme">[unknown tag]</remark>
-<!--unknown tag: frame-->
-.  
-A multi-frame resource is a resource that has a single name but refers 
-to multiple independent pieces of media that are sequenced.  Here is
-an example of declaring a multi-frame resource:
-</para>
-<example role="live-example">
-   <title>Declaring a multi-frame resource</title>
-   <programlisting language="lzx">
-   <textobject><textdata fileref="programs/media-resources-$3.lzx"/></textobject> 
-   </programlisting>
-</example>
-<?example role="live-example"><title>Declaring a multi-frame resource</title><programlisting role="lzx-embednew"><filename>media-resources-$3.lzx</filename><parameter/><code>
-&lt;canvas height="180"&gt;
-  &lt;resource name="myresource"&gt;
-    &lt;frame src="../resources/logo.gif"/&gt;
-    &lt;frame src="../resources/sky.jpg"/&gt;
-  &lt;/resource&gt;
-  &lt;simplelayout spacing="5"/&gt;
-  &lt;view id="myview" resource="myresource"/&gt;
-  &lt;view layout="axis: x; spacing: 3"&gt;
-    &lt;text&gt;Frame:&lt;/text&gt;
-    &lt;radiogroup&gt;
-      &lt;radiobutton selected="true"&gt;1&lt;/radiobutton&gt;
-      &lt;radiobutton&gt;2&lt;/radiobutton&gt;
-      &lt;handler name="onvalue" args="v"&gt;
-        myview.setResourceNumber(Number(v));
-      &lt;/handler&gt;
-    &lt;/radiogroup&gt;
-  &lt;/view&gt;
-&lt;/canvas&gt;
-</code></programlisting><programlisting>
-&lt;canvas height="180"&gt;
-  &lt;resource name="myresource"&gt;
-    &lt;frame src="../resources/logo.gif"/&gt;
-    &lt;frame src="../resources/sky.jpg"/&gt;
-  &lt;/resource&gt;
-  &lt;simplelayout spacing="5"/&gt;
-  &lt;view id="myview" resource="myresource"/&gt;
-  &lt;view layout="axis: x; spacing: 3"&gt;
-    &lt;text&gt;Frame:&lt;/text&gt;
-    &lt;radiogroup&gt;
-      &lt;radiobutton selected="true"&gt;1&lt;/radiobutton&gt;
-      &lt;radiobutton&gt;2&lt;/radiobutton&gt;
-      &lt;handler name="onvalue" args="v"&gt;
-        myview.setResourceNumber(Number(v));
-      &lt;/handler&gt;
-    &lt;/radiogroup&gt;
-  &lt;/view&gt;
-&lt;/canvas&gt;
-</programlisting><?lzx-edit programs/media-resources-$3.lzx></example?>
-<para>
-You can use a multi-frame resource to construct an animation that
-moves between frames when you call the 
-<interface>LzView.play()</interface> method.  Conversely,
-when you import a resource that contains an animation, each frame of the 
-animation automatically becomes a frame in that resource.
-In other words, art assets that contain multiple frames themselves <emphasis role="i">are</emphasis>
-multi-frame resources.  Just as with multi-frame resources that are
-constructed in LZX by importing each frame individually, 
-you can control the frame that is currently displayed.</para>
-
-<example role="live-example">
-   <title>Importing an animation</title>
-   <programlisting language="lzx">
-   <textobject><textdata fileref="programs/media-resources-$4.lzx"/></textobject> 
-   </programlisting>
-</example>
-<?example role="live-example"><title>Importing an animation</title><programlisting role="lzx-embednew"><filename>media-resources-$4.lzx</filename><parameter/><code>
-&lt;canvas height="220"&gt;
-  &lt;simplelayout spacing="5"/&gt;
-  &lt;resource name="myresource" src="resources/logo.swf"/&gt;
-  &lt;button onclick="me.stop()"&gt; Stop &lt;/button&gt;
-  &lt;button onclick="me.play()"&gt; Play &lt;/button&gt;
-  &lt;text text="${me.frame + ' out of ' + me.totalframes + ' frame(s)'}"/&gt;
-  &lt;view layout="axis: x; spacing: 4"&gt;
-    &lt;button isdefault="true" text="Set current frame: " 
-      onclick="me.setAttribute('frame', Number(tt.text))"/&gt;
-    &lt;edittext id="tt" width="50"/&gt;
-  &lt;/view&gt;
-  &lt;view id="me" resource="myresource"/&gt;
-&lt;/canvas&gt;
-</code></programlisting><programlisting>
-&lt;canvas height="220"&gt;
-  &lt;simplelayout spacing="5"/&gt;
-  &lt;resource name="myresource" src="resources/logo.swf"/&gt;
-  &lt;button onclick="me.stop()"&gt; Stop &lt;/button&gt;
-  &lt;button onclick="me.play()"&gt; Play &lt;/button&gt;
-  &lt;text text="${me.frame + ' out of ' + me.totalframes + ' frame(s)'}"/&gt;
-  &lt;view layout="axis: x; spacing: 4"&gt;
-    &lt;button isdefault="true" text="Set current frame: " 
-      onclick="me.setAttribute('frame', Number(tt.text))"/&gt;
-    &lt;edittext id="tt" width="50"/&gt;
-  &lt;/view&gt;
-  &lt;view id="me" resource="myresource"/&gt;
-&lt;/canvas&gt;
-</programlisting><?lzx-edit programs/media-resources-$4.lzx></example?>
-<para>
-Multi-frame resources are also useful for structuring the display of a single visual element
-or component that takes on different appearances:
-</para>
-
-<example role="live-example">
-   <title>Using multi-frame resources</title>
-   <programlisting language="lzx">
-   <textobject><textdata fileref="programs/media-resources-$5.lzx"/></textobject> 
-   </programlisting>
-</example>
-<?example role="live-example"><title>Using multi-frame resources</title><programlisting role="lzx-embednew"><filename>media-resources-$5.lzx</filename><parameter/><code>
-&lt;canvas height="120"&gt;
-  &lt;!-- create the multi-frame resource and give it a name --&gt;
-  &lt;resource name="mybutton_rsrc"&gt;
-    &lt;!-- first frame is the mouseup state of the button --&gt;     
-    &lt;frame src="../resources/button-up.png"/&gt;   
-    &lt;!-- second frame is the mouseover state of the button --&gt;     
-    &lt;frame src="../resources/button-over.png"/&gt; 
-    &lt;!-- third frame is the mousedown state of the button --&gt;     
-    &lt;frame src="../resources/button-down.png"/&gt; 
-  &lt;/resource&gt;
-
+  <title>Media Resources</title>
+  <para>This chapter describes how to include external media resources (images, audio, animation, and video) into OpenLaszlo applications.</para>
+  <section>
+    <title>Overview</title>
+    <para>LZX is designed to make it easy for you to integrate media resources into your application in a flexible and dynamic manner. You can include images, audio, video, and animations that were created using standard third-party content creation tools. This chapter describes the media formats that are currently supported as resources to <sgmltag class="element" role="LzView">view</sgmltag>s in OpenLaszlo 4.0. It then goes on to describes how to integrate and control media in your application. It concludes with some optimization tips.</para>
+    <para>Note that in addition to media that can be attached as resources to views, streaming audio and video can be played by <indexterm><primary>videoview</primary></indexterm><sgmltag class="element">videoview</sgmltag>s. Please see <xref linkend="video" /> for a discussion of streaming media.</para>
+    <para>For a discussion of streaming media, see <xref linkend="video" />.</para>
+  </section>
+  <section>
+    <title>Supported media types</title>
+    <para>The list of supported media types varies slightly depending on the target runtime and whether the application is to be deployed SOLO or proxied.</para>
+    <section>
+      <title condition="swf">Media for SWF SOLO applications</title>
+      <para>SOLO applications compiled to SWF depend on Flash to load images (whereas the proxied applications get help from the transcoder on the server). This means that SOLO applications are limited to file types supported natively by Flash.</para>
+      <section>
+        <title>Flash 7 and Flash 8 limitations</title>
+        <para>Flash player version 7 it can only load a limited set of jpegs encodings; it cannot do interleaved or progressive jpeg. If you run Flash player 8 it can do more wide range of jpeg encoding. Set the compiler to compile for Flash 8 as a target runtime to get this expanded range of image formats (also PNG and GIF).</para>
+      </section>
+    </section>
+    <section>
+      <title condition="dhtml">DHTML Limitations and workaround</title>
+      <para>Browsers do not natively support .swf or audio or video formats. You must transcode them, omit them from your application, or embed a flash player in your application to handle them.</para>
+      <section>
+        <title>Transcoding .swf to .png</title>
+        <para>Files in .swf format can be transcoded to .png format for display by the DHTML runtime. OpenLaszlo provides a facility, called 
+        <literal>autopng</literal>, for doing this automatically. As a convenience, the server and compiler search for a corresponding png file if a swf file is referenced in the DHTML runtime. To use this mechanism in your own code, create a png file with the same basename as the swf file, and place it in the same directory as the swf resource you want it to replace.</para>
+      </section>
+      <section>
+        <title>Audio and Video in DHTML applications</title>
+        <note><para>The following discussion applies to audio and video resources attached to <sgmltag class="element" role="LzView">view</sgmltag>s, not to <indexterm><primary>videoview</primary></indexterm><sgmltag class="element">videoview</sgmltag>s. <indexterm><primary>videoview</primary></indexterm><sgmltag class="element">videoview</sgmltag>s are not supported at all for the DHTML runtime.</para></note>
+        <para>In order to display swf-formatted audio and video within a DHTML application, you may embedd a swf player in the page. For a discussion of how to do this, see <xref linkend="browser-integration" />.</para>
+      </section>
+    </section>
+    <section>
+      <title>Summary of Supported Media</title>
+      <para>OpenLaszlo 4.0 and above support the following media types:</para>
+      <variablelist>
+        <varlistentry>
+          <term>JPEG</term>
+          <listitem>
+            <para>Depending on target runtime and mode of deployment, different .jpg and .jpeg files are supported. Progressive and interleaved files are not supported for Flash 7 SOLO deployment. See the <ulink url="http://www.w3.org/Graphics/JPEG/">W3C JPEG JFIF Specification</ulink>. 
+              <note><para><emphasis>Progressive</emphasis> files are re-encoded in the OpenLaszlo Server.</para></note>
+            </para>
+          </listitem>
+        </varlistentry>
+        <varlistentry>
+          <term>GIF</term>
+          <listitem>
+            <para>All .gif files are supported. See the <ulink url="http://www.w3.org/Graphics/GIF/spec-gif89a.txt">GIF Spec</ulink>.</para>
+          </listitem>
+        </varlistentry>
+        <varlistentry>
+          <term>PNG</term>
+          <listitem>
+            <para>All Portable Network Graphics files (<ulink url="http://www.w3.org/Graphics/PNG/">PNG details at W3C information</ulink>) are supported. This includes PNGs with alpha channels (transparency).</para>
+          </listitem>
+        </varlistentry>
+        <varlistentry>
+          <term>MP3</term>
+          <listitem>
+            <para condition="swf">For proxied applications compiled to .swf, support is limited to audio MP3 files with <emphasis>sample</emphasis>-rates of 44.1 kHz, 22.050 kHz, 11.025 kHz, 8.000 kHz and 5.512 kHz.</para>
+            <para>Flash behaves poorly with mp3s it doesn't like, which makes tracking down problems difficult. If you run into a problem, a good idea would be to find out whether your mp3 plays in a standalone Flash app separate from OpenLaszlo. (You can use the mtasc.org compiler to test this, using Flash's Sound class to load an play your mp3.) If your mp3 works does not work in standalone Flash, hen the problem is not OpenLaszlo.</para>Mp3s are not natively supported by browsers, so applications that compile to DHTML should make provisions, as described above. 
+          </listitem>
+        </varlistentry>
+        <varlistentry>
+          <term>SWF</term>
+          <listitem>
+            <para>Macromedia Flash (SWF) files. (See <ulink url="http://www.macromedia.com/software/flash/open/licensing/fileformat/">Macromedia documentation</ulink>).</para>
+            <para>For applications compiled to Flash, support is limited to SWF files that contain stills or animation only. Very limited ActionScript is allowed/supported (see below for more details).</para>
+            <para>For applications compiled to DHTML, .swf format files are not supported. See above for a workaround.</para>
+          </listitem>
+        </varlistentry>
+      </variablelist>
+      <para>For up-to-date discussion of supported media and considerations about their deployment in various runtimes, see the 
+      <ulink url="http://wiki.openlaszlo.org/MediaSupport">OpenLaszlo Wiki</ulink>.</para>
+    </section>
+  </section>
+  <section>
+    <title>Views and resources</title>
+    <para>The <sgmltag class="element" role="LzView">view</sgmltag> is the most basic viewable element in an OpenLaszlo application and it is described in <xref linkend="views" />. A view may have a <emphasis>resource</emphasis> attached to it. The resource represents a piece of media (image, audio, video, or animation) that the view controls. For images, the view typically displays the image. For time-based media (audio, video, animation), the view can be used to start, stop, or jump to a specific frame or time in the media.</para>
+    <para>For a simple informal introduction to attaching resources to views, see <xref linkend="art_assets" />. The chapter you're reading now briefly goes over topics covered in that tutorial and then goes into greater depth.</para>
+    <para>Resources may be declared directly inside a view using the view's <sgmltag class="attribute" role="LzView.__ivars__.resource">resource</sgmltag> attribute:</para>
+    <example role="live-example">
+      <title>Importing a resource</title>
+      <programlisting language="lzx">
+        <textobject>
+          <textdata fileref="programs/media-resources-$1.lzx" />
+        </textobject>
+      </programlisting>
+    </example><?example role="live-example"><title>Importing a resource</title><programlisting role="lzx-embednew"><filename>media-resources-$1.lzx</filename><parameter/><code>
+    &lt;canvas height="110"&gt;
+      &lt;view resource="../resources/logo.gif"/&gt;
+    &lt;/canvas&gt;
+    </code></programlisting><programlisting>
+    &lt;canvas height="110"&gt;
+      &lt;view resource="../resources/logo.gif"/&gt;
+    &lt;/canvas&gt;
+    </programlisting><?lzx-edit programs/media-resources-$1.lzx></example?>
+    <para>Or they may be declared externally as first-class objects themselves:</para>
+    <example role="live-example">
+      <title>Declaring a resource</title>
+      <programlisting language="lzx">
+        <textobject>
+          <textdata fileref="programs/media-resources-$2.lzx" />
+        </textobject>
+      </programlisting>
+    </example><?example role="live-example"><title>Declaring a resource</title><programlisting role="lzx-embednew"><filename>media-resources-$2.lzx</filename><parameter/><code>
+    &lt;canvas height="110"&gt;
+      &lt;resource name="myname" src="../resources/logo.gif"/&gt;
+      &lt;view resource="myname"/&gt;
+    &lt;/canvas&gt;
+    </code></programlisting><programlisting>
+    &lt;canvas height="110"&gt;
+      &lt;resource name="myname" src="../resources/logo.gif"/&gt;
+      &lt;view resource="myname"/&gt;
+    &lt;/canvas&gt;
+    </programlisting><?lzx-edit programs/media-resources-$2.lzx></example?>
+    <section>
+      <title>Resources are not views</title>
+      <para>Note that a <sgmltag class="element" role="LzView.__ivars__.resource">resource</sgmltag> is <emphasis>not</emphasis> itself a view. Resources do not have x and y positions, or background color, or any of the 49 or so attributes that views have. A resource that is not attached to a view is essentially invisible to the application. As explained below, in order to manipulate a resource, you perform actions on the view to which the resource is attached.</para>
+    </section>
+    <section>
+      <title>Summary of APIs that act on resources</title>
+      <para>There are a number of <sgmltag class="element">view</sgmltag> APIs (methods, fields, and events) that can be used to find out about and control a view's resource.</para>
+      <itemizedlist spacing="compact">
+        <listitem>
+          <para>Resource and view size, scaling and stretching:</para>
+          <itemizedlist spacing="compact">
+            <listitem><sgmltag class="attribute" role="LzView.__ivars__.resourcewidth">resourcewidth</sgmltag></listitem>
+            <listitem><sgmltag class="attribute" role="LzView.__ivars__.resourceheight">resourceheight</sgmltag></listitem>
+<?ignore obsolete?
+            <listitem><sgmltag class="attribute" role="LzView.__ivars__.xscale">xscale</sgmltag></listitem>
+            <listitem><sgmltag class="attribute" role="LzView.__ivars__.yscale">yscale</sgmltag></listitem>
+?>
+            <listitem><property role="LzView.stretches">stretches</property></listitem>
+            <listitem><methodname role="LzView.prototype.stretchResource">stretchResource()</methodname></listitem>
+            <listitem><methodname role="LzView.prototype.measureWidth">measureWidth()</methodname></listitem>
+            <listitem><methodname role="LzView.prototype.measureHeight">measureHeight()</methodname></listitem>
+            <listitem><methodname role="LzView.prototype.updateResourceSize">updateResourceSize()</methodname></listitem>
+          </itemizedlist>
+          <remark role="fixme">Discuss how view and resource sizes interact (need details from Adam/Sarah since I'm not really sure)</remark>
+        </listitem>
+        <listitem>
+          <para>Resource loading (discussed 
+          <link linkend="media-resources.loading">below</link>):</para>
+          <itemizedlist spacing="compact">
+            <listitem><sgmltag class="attribute" role="LzView.__ivars__.resource">resource</sgmltag></listitem>
+            <listitem><methodname role="LzView.prototype.setSource">setSource()</methodname></listitem>
+            <listitem><methodname role="LzView.prototype.unload">unload()</methodname></listitem>
+            <listitem><sgmltag class="attribute" role="LzView.__ivars__.loadratio">loadratio</sgmltag></listitem>
+            <listitem><sgmltag class="attribute" role="LzView.__ivars__.framesloadratio">framesloadratio</sgmltag></listitem>
+            <listitem><property role="LzView.prototype.onload">onload</property></listitem>
+            <listitem><property role="LzView.prototype.onerror">onerror</property></listitem>
+            <listitem><property role="LzView.prototype.ontimeout">ontimeout</property></listitem>
+            <listitem><property role="LzView.prototype.onaddsubresource">onaddsubresource</property></listitem>
+          </itemizedlist>
+        </listitem>
+        <listitem>
+          <para>Animation/video/frames:</para>
+          <itemizedlist spacing="compact">
+            <listitem><methodname role="LzView.prototype.play">play()</methodname></listitem>
+            <listitem><methodname role="LzView.prototype.stop">stop()</methodname></listitem>
+            <listitem><methodname role="LzView.prototype.seek">seek()</methodname></listitem>
+            <listitem><methodname role="LzView.prototype.getTotalTime">getTotalTime()</methodname></listitem>
+            <listitem><methodname role="LzView.prototype.getCurrentTime">getCurrentTime()</methodname></listitem>
+            <listitem><methodname role="LzView.prototype.setResourceNumber">setResourceNumber()</methodname></listitem>
+            <listitem><sgmltag class="attribute" role="LzView.__ivars__.frame">frame</sgmltag></listitem>
+            <listitem><sgmltag class="attribute" role="LzView.__ivars__.totalframes">totalframes</sgmltag></listitem>
+            <listitem><property role="LzView.prototype.onlastframe">onlastframe</property></listitem>
+            <listitem><property role="LzView.prototype.onplay">onplay</property></listitem>
+            <listitem><property role="LzView.prototype.onstop">onstop</property></listitem>
+          </itemizedlist>
+        </listitem>
+        <listitem>
+          <para>Audio:</para>
+          <itemizedlist spacing="compact">
+            <listitem><methodname role="LzView.prototype.getVolume">getVolume()</methodname></listitem>
+            <listitem><methodname role="LzView.prototype.setVolume">setVolume()</methodname></listitem>
+            <listitem><methodname role="LzView.prototype.getPan">getPan()</methodname></listitem>
+            <listitem><methodname role="LzView.prototype.setPan">setPan()</methodname></listitem>
+            <listitem><methodname role="LzView.prototype.play">play()</methodname></listitem>
+            <listitem><methodname role="LzView.prototype.stop">stop()</methodname></listitem>
+            <listitem><methodname role="LzView.prototype.getTotalTime">getTotalTime()</methodname></listitem>
+            <listitem><methodname role="LzView.prototype.getCurrentTime">getCurrentTime()</methodname></listitem>
+          </itemizedlist>
+        </listitem>
+      </itemizedlist>
+    </section>
+    <section>
+      <title>Resource declarations and naming</title>
+      <para>When a resource is declared externally, it must be given a name. The namespace for resources is global to the entire application. Resource tags can only be used as direct children of either the <sgmltag class="element" role="LzCanvas">canvas</sgmltag> or <sgmltag class="element" role="tag.library">library</sgmltag> tags.</para>
+      <para>This style of resource inclusion makes it simpler to separate out art assets from code and can make for improved designer/developer interactions.</para>
+      <para>When you directly import a resource without naming it, as in the first example, the LZX compiler assigns a unique name to that resource.</para>
+      <para>Behavior when two resources share the same name is undefined. Therefore you should take care to make sure that each resource has a unique and appropriate name.</para>
+    </section>
+  </section>
+  <section>
+    <title>Multi-frame resources</title>
+    <para>Laszlo supports the notion of a resource <emphasis>frame</emphasis>. A multi-frame resource is a resource that has a single name but refers to multiple independent pieces of media that are sequenced. Here is an example of declaring a multi-frame resource:</para>
+    <example role="live-example">
+      <title>Declaring a multi-frame resource</title>
+      <programlisting language="lzx">
+        <textobject>
+          <textdata fileref="programs/media-resources-$3.lzx" />
+        </textobject>
+      </programlisting>
+    </example><?example role="live-example"><title>Declaring a multi-frame resource</title><programlisting role="lzx-embednew"><filename>media-resources-$3.lzx</filename><parameter/><code>
+    &lt;canvas height="180"&gt;
+      &lt;resource name="myresource"&gt;
+        &lt;frame src="../resources/logo.gif"/&gt;
+        &lt;frame src="../resources/sky.jpg"/&gt;
+      &lt;/resource&gt;
+      &lt;simplelayout spacing="5"/&gt;
+      &lt;view id="myview" resource="myresource"/&gt;
+      &lt;view layout="axis: x; spacing: 3"&gt;
+        &lt;text&gt;Frame:&lt;/text&gt;
+        &lt;radiogroup&gt;
+          &lt;radiobutton selected="true"&gt;1&lt;/radiobutton&gt;
+          &lt;radiobutton&gt;2&lt;/radiobutton&gt;
+          &lt;handler name="onvalue" args="v"&gt;
+            myview.setResourceNumber(Number(v));
+          &lt;/handler&gt;
+        &lt;/radiogroup&gt;
+      &lt;/view&gt;
+    &lt;/canvas&gt;
+    </code></programlisting><programlisting>
+    &lt;canvas height="180"&gt;
+      &lt;resource name="myresource"&gt;
+        &lt;frame src="../resources/logo.gif"/&gt;
+        &lt;frame src="../resources/sky.jpg"/&gt;
+      &lt;/resource&gt;
+      &lt;simplelayout spacing="5"/&gt;
+      &lt;view id="myview" resource="myresource"/&gt;
+      &lt;view layout="axis: x; spacing: 3"&gt;
+        &lt;text&gt;Frame:&lt;/text&gt;
+        &lt;radiogroup&gt;
+          &lt;radiobutton selected="true"&gt;1&lt;/radiobutton&gt;
+          &lt;radiobutton&gt;2&lt;/radiobutton&gt;
+          &lt;handler name="onvalue" args="v"&gt;
+            myview.setResourceNumber(Number(v));
+          &lt;/handler&gt;
+        &lt;/radiogroup&gt;
+      &lt;/view&gt;
+    &lt;/canvas&gt;
+    </programlisting><?lzx-edit programs/media-resources-$3.lzx></example?>
+    <para>You can use a multi-frame resource to construct an animation that moves between frames when you call the 
+    <interface>LzView.play()</interface> method. Conversely, when you import a resource that contains an animation, each frame of the animation automatically becomes a frame in that resource. In other words, art assets that contain multiple frames themselves 
+    <emphasis>are</emphasis> multi-frame resources. Just as with multi-frame resources that are constructed in LZX by importing each frame individually, you can control the frame that is currently displayed.</para>
+    <example role="live-example">
+      <title>Importing an animation</title>
+      <programlisting language="lzx">
+        <textobject>
+          <textdata fileref="programs/media-resources-$4.lzx" />
+        </textobject>
+      </programlisting>
+    </example><?example role="live-example"><title>Importing an animation</title><programlisting role="lzx-embednew"><filename>media-resources-$4.lzx</filename><parameter/><code>
+    &lt;canvas height="220"&gt;
+      &lt;simplelayout spacing="5"/&gt;
+      &lt;resource name="myresource" src="resources/logo.swf"/&gt;
+      &lt;button onclick="me.stop()"&gt; Stop &lt;/button&gt;
+      &lt;button onclick="me.play()"&gt; Play &lt;/button&gt;
+      &lt;text text="${me.frame + ' out of ' + me.totalframes + ' frame(s)'}"/&gt;
+      &lt;view layout="axis: x; spacing: 4"&gt;
+        &lt;button isdefault="true" text="Set current frame: " 
+          onclick="me.setAttribute('frame', Number(tt.text))"/&gt;
+        &lt;edittext id="tt" width="50"/&gt;
+      &lt;/view&gt;
+      &lt;view id="me" resource="myresource"/&gt;
+    &lt;/canvas&gt;
+    </code></programlisting><programlisting>
+    &lt;canvas height="220"&gt;
+      &lt;simplelayout spacing="5"/&gt;
+      &lt;resource name="myresource" src="resources/logo.swf"/&gt;
+      &lt;button onclick="me.stop()"&gt; Stop &lt;/button&gt;
+      &lt;button onclick="me.play()"&gt; Play &lt;/button&gt;
+      &lt;text text="${me.frame + ' out of ' + me.totalframes + ' frame(s)'}"/&gt;
+      &lt;view layout="axis: x; spacing: 4"&gt;
+        &lt;button isdefault="true" text="Set current frame: " 
+          onclick="me.setAttribute('frame', Number(tt.text))"/&gt;
+        &lt;edittext id="tt" width="50"/&gt;
+      &lt;/view&gt;
+      &lt;view id="me" resource="myresource"/&gt;
+    &lt;/canvas&gt;
+    </programlisting><?lzx-edit programs/media-resources-$4.lzx></example?>
+    <para>Multi-frame resources are also useful for structuring the display of a single visual element or component that takes on different appearances:</para>
+    <example role="live-example">
+      <title>Using multi-frame resources</title>
+      <programlisting language="lzx">
+        <textobject>
+          <textdata fileref="programs/media-resources-$5.lzx" />
+        </textobject>
+      </programlisting>
+    </example><?example role="live-example"><title>Using multi-frame resources</title><programlisting role="lzx-embednew"><filename>media-resources-$5.lzx</filename><parameter/><code>
+    &lt;canvas height="120"&gt;
+      &lt;!-- create the multi-frame resource and give it a name --&gt;
+      &lt;resource name="mybutton_rsrc"&gt;
+        &lt;!-- first frame is the mouseup state of the button --&gt;     
+        &lt;frame src="../resources/button-up.png"/&gt;   
+        &lt;!-- second frame is the mouseover state of the button --&gt;     
+        &lt;frame src="../resources/button-over.png"/&gt; 
+        &lt;!-- third frame is the mousedown state of the button --&gt;     
+        &lt;frame src="../resources/button-down.png"/&gt; 
+      &lt;/resource&gt;
+    
   &lt;!-- attach the resource to a view with mouse events --&gt;
-  &lt;view resource="mybutton_rsrc" 
-        onmouseover="setResourceNumber(2)"
-        onmouseout="setResourceNumber(1)"
-        onmousedown="setResourceNumber(3)"
-        onmouseup="setResourceNumber(2)"/&gt;
-
+      &lt;view resource="mybutton_rsrc" 
+            onmouseover="setResourceNumber(2)"
+            onmouseout="setResourceNumber(1)"
+            onmousedown="setResourceNumber(3)"
+            onmouseup="setResourceNumber(2)"/&gt;
+    
 &lt;/canvas&gt;
-</code></programlisting><programlisting>
-&lt;canvas height="120"&gt;
-  &lt;!-- create the multi-frame resource and give it a name --&gt;
-  &lt;resource name="mybutton_rsrc"&gt;
-    &lt;!-- first frame is the mouseup state of the button --&gt;     
-    &lt;frame src="../resources/button-up.png"/&gt;   
-    &lt;!-- second frame is the mouseover state of the button --&gt;     
-    &lt;frame src="../resources/button-over.png"/&gt; 
-    &lt;!-- third frame is the mousedown state of the button --&gt;     
-    &lt;frame src="../resources/button-down.png"/&gt; 
-  &lt;/resource&gt;
-
+    </code></programlisting><programlisting>
+    &lt;canvas height="120"&gt;
+      &lt;!-- create the multi-frame resource and give it a name --&gt;
+      &lt;resource name="mybutton_rsrc"&gt;
+        &lt;!-- first frame is the mouseup state of the button --&gt;     
+        &lt;frame src="../resources/button-up.png"/&gt;   
+        &lt;!-- second frame is the mouseover state of the button --&gt;     
+        &lt;frame src="../resources/button-over.png"/&gt; 
+        &lt;!-- third frame is the mousedown state of the button --&gt;     
+        &lt;frame src="../resources/button-down.png"/&gt; 
+      &lt;/resource&gt;
+    
   &lt;!-- attach the resource to a view with mouse events --&gt;
-  &lt;view resource="mybutton_rsrc" 
-        onmouseover="setResourceNumber(2)"
-        onmouseout="setResourceNumber(1)"
-        onmousedown="setResourceNumber(3)"
-        onmouseup="setResourceNumber(2)"/&gt;
-
+      &lt;view resource="mybutton_rsrc" 
+            onmouseover="setResourceNumber(2)"
+            onmouseout="setResourceNumber(1)"
+            onmousedown="setResourceNumber(3)"
+            onmouseup="setResourceNumber(2)"/&gt;
+    
 &lt;/canvas&gt;
-</programlisting><?lzx-edit programs/media-resources-$5.lzx></example?>
-
-<para/><section><title>Frame rates</title>
-<para>As of OpenLaszlo 3.1, all LZX applications are compiled to Macromedia
-Flash (SWF) files.  With the exception of audio files noted below, SWF files are played by the Flash plugin at a
-fixed frame rate and all imported animations are played at that frame
-rate.  This frame rate is fixed at 30 frames per
-second. </para>
-<para/><section><title>Audio rates</title>
-<para>
-  Animations that include an audio soundtrack are played
-at a rate that maintains the original audio/video synchronization in
-the incoming animation.</para>
-
-<para/></section></section></section><section id="media-resources.loading"><title>Resource loading</title>
-<para>In the examples above, we've declaratively tied resources to view.
-But we haven't expressed anything about when or how the application
-should pull in the needed resource.  We call this <indexterm significance="preferred"><primary>resource
-loading</primary></indexterm><glossterm>resource
-loading</glossterm> and LZX provides flexibility over how and when
-the application loads resources.  The most important choice is whether
-a resource should be loaded at <glossterm>compile time</glossterm> or
-<glossterm>run time</glossterm>.</para>
-
-<para/><section><title>Compile time resources</title>
-<para>
-Resources that are loaded at compile time are included in the application 
-binary and add to the initial download size of the application.</para>
-
-<example role="live-example"><title>Including a resource at compile time</title><programlisting>
-  &lt;resource name="myname" src="resources/logo.gif"/&gt;
-</programlisting></example>
-
-<para>Compile-time resource inclusion is good for </para>
-<itemizedlist spacing="compact"><listitem><para>small assets that are fixed for the life-time of the running application.</para></listitem><listitem><para>assets that are needed by all users of an application</para></listitem></itemizedlist>
-<para>
-Examples of resources that are included at compile time include most
-of the assets associated with user-interface components.  
-</para>
-<para>The LZX compiler may transcode compile-time resources for inclusion in
-the SWF application; the OpenLaszlo Server caches the results of these transcodes.
-The compiler checks the last-modified time of all compile-time-included 
-resources to determine if an application needs to be recompiled.</para>
-
-<para/></section><section id="media-resources.runtime-resources"><title>Run-time resources</title>
-<para>There are two main ways to load resources at run-time.  The first is to use
-special syntax that is understood by the <indexterm><primary>view</primary></indexterm><sgmltag class="element">&lt;view&gt;</sgmltag><remark role="fixme">[unknown tag]</remark>
-<!--unknown tag: view-->
-'s 
-<literal>resource</literal> attribute.  If you specify a value for this attribute that
-is an HTTP url, the compiler assumes that this resource should be loaded at runtime:</para>
-
-<example role="live-example">
-   <title>Loading a resource at runtime</title>
-   <programlisting language="lzx">
-   <textobject><textdata fileref="programs/media-resources-$7.lzx"/></textobject> 
-   </programlisting>
-</example>
-<?example role="live-example"><title>Loading a resource at runtime</title><programlisting role="lzx-embednew"><filename>media-resources-$7.lzx</filename><parameter/><code>
-&lt;canvas height="180"&gt;
-  &lt;view resource="http:../resources/logo.gif"/&gt;
-&lt;/canvas&gt;
-</code></programlisting><programlisting>
-&lt;canvas height="180"&gt;
-  &lt;view resource="http:../resources/logo.gif"/&gt;
-&lt;/canvas&gt;
-</programlisting><?lzx-edit programs/media-resources-$7.lzx></example?>
-
-<para>The second method is to use the <indexterm><primary><literal>LzView.setSource()()</literal></primary></indexterm><methodname>LzView.setSource()()</methodname> method.
-The previous example is equivalent to the following one:</para>
-
-<example role="live-example">
-   <title>Loading a resource at runtime using script</title>
-   <programlisting language="lzx">
-   <textobject><textdata fileref="programs/media-resources-$8.lzx"/></textobject> 
-   </programlisting>
-</example>
-<?example role="live-example"><title>Loading a resource at runtime via script</title><programlisting role="lzx-embednew"><filename>media-resources-$8.lzx</filename><parameter/><code>
-&lt;canvas height="180"&gt;
-  &lt;view oninit="this.setSource('http:../resources/logo.gif')"/&gt;
-&lt;/canvas&gt;
-</code></programlisting><programlisting>
-&lt;canvas height="180"&gt;
-  &lt;view oninit="this.setSource('http:../resources/logo.gif')"/&gt;
-&lt;/canvas&gt;
-</programlisting><?lzx-edit programs/media-resources-$8.lzx></example?>
-
-<note><para>LZX treats HTTP URLs that omit the two slashes <literal>//</literal> after the colon (:) as being
-relative to the application.</para></note>
-<para>
-<indexterm><primary><literal>LzView.setSource()()</literal></primary></indexterm><methodname>LzView.setSource()()</methodname> provides more control over
-the loading of the resource.  Using this method, you can:</para>
-<itemizedlist spacing="compact"><listitem><para>choose whether or not the server and/or client should cache the resource;</para></listitem><listitem><para>specify a URL that instructs the server to use a specific protocol to
-    fetch the resource;</para></listitem><listitem><para>specify HTTP request headers that should be used when fetching the resource
-    over HTTP.</para></listitem></itemizedlist>
-
-<para/><section><title>Protocols for proxied applications</title>
-<note><para>
-This section does not apply to SOLO applications.
-</para></note>
-<para>
-Before sending resources to a running, proxied, OpenLaszlo application,
-the OpenLaszlo Server first fetches (or proxies) the resource.  The server uses
-the URL for the resource to determine how and where to get the resource.
-The term <emphasis role="i">back-end</emphasis> is used to refer to the server that is 
-ultimately providing the resource.  Depending on your
-configuration, the back-end can be the OpenLaszlo Server
-host itself.   Or it may be another distinct host.
-</para>
-<para>
-The OpenLaszlo Server determines the protocol to use to communicate to the back-end
-based on the URL for the resource.  By default, URLs that are to be
-loaded at runtime, that don't specify the protocol are assumed to be
-HTTP urls.  OpenLaszlo supports communication to back-end hosts 
-(including localhost itself) via the HTTP protocol.  
-Relative HTTP URLs are thus fetched using a localhost HTTP transfer. 
-</para>
-
-<para/></section><section><title>Caching</title>
-<para>
-By default, in proxied applications, media that is accessed at runtime is cached both in the
-server <emphasis role="em">and</emphasis> in the client browser.  The OpenLaszlo Server uses the standard
-HTTP If-Modified-Since/Last-Modified caching mechanism specified in the <ulink url="http://www.w3.org/Protocols/rfc2616/rfc2616.html">HTTP 1.1
-specification</ulink>.</para>
-
-<para>
-The OpenLaszlo Server actually maintains two media caches.  One cache is used
-for resources that are requested at runtime.  This is simply called
-the <indexterm significance="preferred"><primary>Media Cache</primary></indexterm><glossterm>Media Cache</glossterm>.  It also maintains a second cache for
-resources that are compiled into applications called the <indexterm significance="preferred"><primary>Compiler
-Media Cache</primary></indexterm><glossterm>Compiler
-Media Cache</glossterm>.  In general, the Compiler Media Cache settings only
-affect the speed of the OpenLaszlo compiler.  The settings for the Media
-Cache can affect server performance.  See <ulink url="../deploy/" type="">The Deployer's Guide</ulink>for details.
-</para>
-
-<para>
-The example below provides a text input area for you to type in urls that
-you'd like to test. To run the example, copy it into your local environment and compile it:
-</para>
-
-<example role="live-example"><title>Testing runtime resource loading</title><programlisting>
-&lt;canvas height="400"&gt;
-  &lt;font src="helmetr.ttf" name="helvet"/&gt;
-  &lt;simplelayout spacing="3"/&gt;
-
-  &lt;view&gt;
-    &lt;simplelayout axis="x" spacing="2"/&gt;
-    &lt;text valign="middle"&gt;Type url:&lt;/text&gt;
-    &lt;edittext width="500" id="url"&gt;http:../resources/logo.gif&lt;/edittext&gt;
-  &lt;/view&gt;
-  &lt;text&gt;(also try resources/logo.swf)&lt;/text&gt;
-
-  &lt;command onselect="butt.doit();"  key="['Enter']" active="true"/&gt;
-
-  &lt;checkbox text="Cache in client" id="ccache"/&gt;
-  &lt;checkbox text="Cache in server" id="scache"/&gt;
-
-  &lt;button id="butt"&gt;Make request
-    &lt;handler name="onclick"&gt;
-      this.doit();
-    &lt;/handler&gt;
-
-    &lt;method name="doit"&gt;
-    &lt;![CDATA[
-      status.setText("Requesting: " + url.getText()); 
-
-      // Determine caching from checkboxes
-      var caching = 'none'
-      if (ccache.getValue() &amp; scache.getValue()) {
-          caching = 'both';
-      } else if (ccache.getValue()) {
-          caching = 'clientonly';
-      } else if (scache.getValue()) {
-          caching = 'serveronly';
-      }
-
-      me.setSource(url.getText(), caching) ;
-    ]]&gt;&lt;/method&gt;
-  &lt;/button&gt;
-  &lt;button onclick="me.stop()"&gt; Stop &lt;/button&gt;
-  &lt;button onclick="me.play()"&gt; Play &lt;/button&gt;
-  &lt;text text="${me.frame + ' out of ' + me.totalframes + ' frame(s)'}"/&gt;
-  &lt;text multiline="true" width="200" height="100" id="status"/&gt;
-  &lt;view id="me"&gt;
-    &lt;handler name="onload" args="e"&gt;
-      status.setText('loaded: ' + e);
-    &lt;/handler&gt;
-    &lt;handler name="onerror" args="e"&gt;
-      status.setText('error: ' + e);
-    &lt;/handler&gt;
-    &lt;handler name="ontimeout" args="e"&gt;
-      status.setText('timeout: ' + e);
-    &lt;/handler&gt;
-  &lt;/view&gt;
-&lt;/canvas&gt;
-</programlisting></example>
-<para/></section></section></section><section><title>Using the &lt;image&gt; tag</title>
-<para>
-The <indexterm><primary>image</primary></indexterm><sgmltag class="element">&lt;image&gt;</sgmltag><remark role="fixme">[unknown tag]</remark>
-<!--unknown tag: image-->
- tag has the effect of declaring a view and associating a 
-resource with it. This is a convenient shorthand that can make your programs easier to read and maintain.  Do not confuse the <indexterm><primary>image</primary></indexterm><sgmltag class="element">&lt;image&gt;</sgmltag> with the <indexterm><primary>img</primary></indexterm><sgmltag class="element">&lt;img&gt;</sgmltag><remark role="fixme">[unknown tag]</remark>
-<!--unknown tag: img-->
-. The latter is used to include images inside HTML text and behaves like the &lt;img&gt; tag in HTML.
-</para>
-
-
-<para/></section></chapter>
+    </programlisting><?lzx-edit programs/media-resources-$5.lzx></example?>
+    <section>
+      <title>Frame rates</title>
+      <para>As of OpenLaszlo 3.1, all LZX applications are compiled to Macromedia Flash (SWF) files. With the exception of audio files noted below, SWF files are played by the Flash plugin at a fixed frame rate and all imported animations are played at that frame rate. This frame rate is fixed at 30 frames per second.</para>
+      <section>
+        <title>Audio rates</title>
+        <para>Animations that include an audio soundtrack are played at a rate that maintains the original audio/video synchronization in the incoming animation.</para>
+      </section>
+    </section>
+  </section>
+  <section id="media-resources.loading">
+    <title>Resource loading</title>
+    <para>In the examples above, we've declaratively tied resources to view. But we haven't expressed anything about when or how the application should pull in the needed resource. We call this <indexterm significance="preferred"><primary>resource loading</primary></indexterm><glossterm>resource loading</glossterm> and LZX provides flexibility over how and when the application loads resources. The most important choice is whether a resource should be loaded at <glossterm>compile time</glossterm> or <glossterm>run time</glossterm>.</para>
+    <section>
+      <title>Compile time resources</title>
+      <para>Resources that are loaded at compile time are included in the application binary and add to the initial download size of the application.</para>
+      <example role="live-example">
+        <title>Including a resource at compile time</title>
+        <programlisting>&lt;resource name="myname" src="resources/logo.gif"/&gt;</programlisting>
+      </example>
+      <para>Compile-time resource inclusion is good for</para>
+      <itemizedlist spacing="compact">
+        <listitem>
+          <para>small assets that are fixed for the life-time of the running application.</para>
+        </listitem>
+        <listitem>
+          <para>assets that are needed by all users of an application</para>
+        </listitem>
+      </itemizedlist>
+      <para>Examples of resources that are included at compile time include most of the assets associated with user-interface components.</para>
+      <para>The LZX compiler may transcode compile-time resources for inclusion in the SWF application; the OpenLaszlo Server caches the results of these transcodes. The compiler checks the last-modified time of all compile-time-included resources to determine if an application needs to be recompiled.</para>
+    </section>
+    <section id="media-resources.runtime-resources">
+      <title>Run-time resources</title>
+      <para>There are two main ways to load resources at run-time. The first is to use special syntax that is understood by the <sgmltag class="element" role="LzView">view</sgmltag>'s <sgmltag class="attribute" role="LzView.__ivars__.resource">resource</sgmltag> attribute. If you specify a value for this attribute that is an HTTP url, the compiler assumes that this resource should be loaded at runtime:</para>
+      <example role="live-example">
+        <title>Loading a resource at runtime</title>
+        <programlisting language="lzx">
+          <textobject>
+            <textdata fileref="programs/media-resources-$7.lzx" />
+          </textobject>
+        </programlisting>
+      </example><?example role="live-example"><title>Loading a resource at runtime</title><programlisting role="lzx-embednew"><filename>media-resources-$7.lzx</filename><parameter/><code>
+      &lt;canvas height="180"&gt;
+        &lt;view resource="http:../resources/logo.gif"/&gt;
+      &lt;/canvas&gt;
+      </code></programlisting><programlisting>
+      &lt;canvas height="180"&gt;
+        &lt;view resource="http:../resources/logo.gif"/&gt;
+      &lt;/canvas&gt;
+      </programlisting><?lzx-edit programs/media-resources-$7.lzx></example?>
+      <para>The second method is to use the <methodname role="LzView.prototype.setSource">setSource()</methodname> method. The previous example is equivalent to the following one:</para>
+      <example role="live-example">
+        <title>Loading a resource at runtime using script</title>
+        <programlisting language="lzx">
+          <textobject>
+            <textdata fileref="programs/media-resources-$8.lzx" />
+          </textobject>
+        </programlisting>
+      </example>
+      <note>
+        <para>LZX treats HTTP URLs that omit the two slashes <literal>//</literal> after the colon (:) as being relative to the application.</para>
+      </note>
+      <para><indexterm><primary>setSource</primary></indexterm><methodname role="LzView.prototype.setSource">setSource()</methodname> provides more control over the loading of the resource. Using this method, you can:</para>
+      <itemizedlist spacing="compact">
+        <listitem>
+          <para>choose whether or not the server and/or client should cache the resource;</para>
+        </listitem>
+        <listitem>
+          <para>specify a URL that instructs the server to use a specific protocol to fetch the resource;</para>
+        </listitem>
+        <listitem>
+          <para>specify HTTP request headers that should be used when fetching the resource over HTTP.</para>
+        </listitem>
+      </itemizedlist>
+      <section>
+        <title>Protocols for proxied applications</title>
+        <note>
+          <para>This section does not apply to SOLO applications.</para>
+        </note>
+        <para>Before sending resources to a running, proxied, OpenLaszlo application, the OpenLaszlo Server first fetches (or proxies) the resource. The server uses the URL for the resource to determine how and where to get the resource. The term 
+        <emphasis>back-end</emphasis>is used to refer to the server that is ultimately providing the resource. Depending on your configuration, the back-end can be the OpenLaszlo Server host itself. Or it may be another distinct host.</para>
+        <para>The OpenLaszlo Server determines the protocol to use to communicate to the back-end based on the URL for the resource. By default, URLs that are to be loaded at runtime, that don't specify the protocol are assumed to be HTTP urls. OpenLaszlo supports communication to back-end hosts (including localhost itself) via the HTTP protocol. Relative HTTP URLs are thus fetched using a localhost HTTP transfer.</para>
+      </section>
+      <section>
+        <title>Caching</title>
+        <para>By default, in proxied applications, media that is accessed at runtime is cached both in the server <emphasis role="bold">and</emphasis> in the client browser. The OpenLaszlo Server uses the standard HTTP If-Modified-Since/Last-Modified caching mechanism specified in the <ulink url="http://www.w3.org/Protocols/rfc2616/rfc2616.html">HTTP 1.1 specification</ulink>.</para>
+        <para>The OpenLaszlo Server actually maintains two media caches. One cache is used for resources that are requested at runtime. This is simply called the <indexterm significance="preferred"><primary>Media Cache</primary></indexterm><glossterm>Media Cache</glossterm>. It also maintains a second cache for resources that are compiled into applications called the <indexterm significance="preferred"><primary>Compiler Media Cache</primary></indexterm><glossterm>Compiler Media Cache</glossterm>. In general, the Compiler Media Cache settings only affect the speed of the OpenLaszlo compiler. The settings for the Media Cache can affect server performance. See <ulink url="../deploy/" type="">The Deployer's Guide</ulink> for details.</para>
+        <para>The example below provides a text input area for you to type in urls that you'd like to test. To run the example, copy it into your local environment and compile it:</para>
+        <example>
+          <title>Testing runtime resource loading</title>
+          <programlisting language="lzx">
+            <textobject>
+              <textdata fileref="programs/media-resources-$9.lzx" />
+            </textobject>
+          </programlisting>
+        </example>
+      </section>
+    </section>
+  </section>
+  <section>
+    <title>Using the &lt;image&gt; tag</title>
+    <para>The <sgmltag class="element" role="lz.image">image</sgmltag> tag has the effect of declaring a view and associating a resource with it. This is a convenient shorthand that can make your programs easier to read and maintain. Do not confuse the <sgmltag class="element" role="lz.image">image</sgmltag> tag with the <sgmltag class="element" role="img">img</sgmltag> tag. The latter is used to include images inside HTML text and behaves like the &lt;img&gt; tag in HTML.</para>
+  </section>
+</chapter>

Modified: openlaszlo/branches/doctools/docs/src/developers/methods-events-attributes.dbk
===================================================================
--- openlaszlo/branches/doctools/docs/src/developers/methods-events-attributes.dbk	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/docs/src/developers/methods-events-attributes.dbk	2007-07-05 17:08:17 UTC (rev 5594)
@@ -715,7 +715,7 @@
 &lt;attribute name="onsomeevent" value="null"/&gt;
 </programlisting>
 <para>
-Then, you had to check to see if it was a valid LzEvent before calling <indexterm><primary><literal>sendEvent()()</literal></primary></indexterm><methodname>sendEvent()()</methodname> on it. Ways of making that test look like this:</para>
+Then, you had to check to see if it was a valid LzEvent before calling <methodname role="LzEvent.prototype.sendEvent">sendEvent()</methodname> on it. Ways of making that test look like this:</para>
 <programlisting>
     if ( onsomeevent instanceof LzEvent) {
        onsomeevent.sendEvent();
@@ -1438,7 +1438,7 @@
 
 <para>
 There are four ways of getting and setting attributes in LZX, each with benefits and drawbacks:</para>
-<itemizedlist spacing="compact"><listitem><para>Using <indexterm><primary><literal>setAttribute()()</literal></primary></indexterm><methodname>setAttribute()()</methodname> and <indexterm><primary><literal>getAttribute()()</literal></primary></indexterm><methodname>getAttribute()()</methodname></para></listitem><listitem><para>Using predefined "setters" for certain attributes, such as <indexterm><primary><literal>onx()</literal></primary></indexterm><methodname>onx()</methodname> and <indexterm><primary><literal>ony()</literal></primary></indexterm><methodname>ony()</methodname></para></listitem><listitem><para>using custom getter and setter methods, as explained above</para></listitem><listitem><para>Reading and writing attributes directly—that is, without using a setter or getter method</para></listitem></itemizedlist>
+<itemizedlist spacing="compact"><listitem><para>Using <methodname role="LzNode.prototype.setAttribute">setAttribute()</methodname> and <methodname role="LzNode.prototype.getAttribute">getAttribute()</methodname></para></listitem><listitem><para>Using predefined "setters" for certain attributes, such as <indexterm><primary><literal>onx()</literal></primary></indexterm><methodname>onx()</methodname> and <indexterm><primary><literal>ony()</literal></primary></indexterm><methodname>ony()</methodname></para></listitem><listitem><para>using custom getter and setter methods, as explained above</para></listitem><listitem><para>Reading and writing attributes directly—that is, without using a setter or getter method</para></listitem></itemizedlist>
 
 
 <para/><section><title>setAttribute() and getAttribute() </title>

Modified: openlaszlo/branches/doctools/docs/src/developers/persistent_connection.dbk
===================================================================
--- openlaszlo/branches/doctools/docs/src/developers/persistent_connection.dbk	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/docs/src/developers/persistent_connection.dbk	2007-07-05 17:08:17 UTC (rev 5594)
@@ -573,7 +573,7 @@
 
 <para>The results of the call are returned in the connection datasource's
 <literal>sendMessageDset</literal> and <literal>sendXMLDset</literal>, respectively. Both
-<indexterm><primary><literal>sendMessage()()</literal></primary></indexterm><methodname>sendMessage()()</methodname> and <indexterm><primary><literal>sendXML()()</literal></primary></indexterm><methodname>sendXML()()</methodname> send data to <glossterm>users</glossterm> and
+<methodname role="LzDatasource.prototype.sendMessage">sendMessage()</methodname> and <methodname role="LzDatasource.prototype.sendXML">sendXML()</methodname> send data to <glossterm>users</glossterm> and
 <glossterm>agents</glossterm>. You can narrow that domain by using <indexterm><primary><literal>sendUserXML()</literal></primary></indexterm><methodname>sendUserXML()</methodname> and
 <indexterm><primary><literal>sendAgentXML()</literal></primary></indexterm><methodname>sendAgentXML()</methodname>. Users are peer applications and agents are back-end
 servers.</para>

Added: openlaszlo/branches/doctools/docs/src/developers/programs/media-resources-$9.lzx


Property changes on: openlaszlo/branches/doctools/docs/src/developers/programs/media-resources-$9.lzx
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native

Modified: openlaszlo/branches/doctools/docs/src/developers/rpc-soap.dbk
===================================================================
--- openlaszlo/branches/doctools/docs/src/developers/rpc-soap.dbk	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/docs/src/developers/rpc-soap.dbk	2007-07-05 17:08:17 UTC (rev 5594)
@@ -99,7 +99,7 @@
 <para>Note that <literal>proxy</literal> is not defined until the <literal>onload </literal>event is sent, thus
 function stubs cannot be invoked until <literal>onload.</literal> Each function stub requires two
 arguments: an array of parameters and delegate. You can unload it (i.e., set to
-null) by calling the <indexterm><primary><literal>unload()()</literal></primary></indexterm><methodname>unload()()</methodname> method. Go to the proxy section in the RPC chapter
+null) by calling the <methodname>unload()</methodname> method. Go to the proxy section in the RPC chapter
 for details.</para>
 
 

Modified: openlaszlo/branches/doctools/docs/src/developers/rpc.dbk
===================================================================
--- openlaszlo/branches/doctools/docs/src/developers/rpc.dbk	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/docs/src/developers/rpc.dbk	2007-07-05 17:08:17 UTC (rev 5594)
@@ -835,7 +835,7 @@
 <para/></section></section><section><title>Using dataobject to map return values</title>
 
 <para>There is more convenient way to generate data mapped return values. Instead
-of calling <indexterm><primary><literal>LzDataElement.valueToElement()()</literal></primary></indexterm><methodname>LzDataElement.valueToElement()()</methodname> after each call, a <literal>dataobject</literal> property
+of calling <methodname role="LzDataElement.prototype.valueToElement">valueToElement()</methodname> after each call, a <literal>dataobject</literal> property
 can be set in the delegate. <indexterm significance="preferred"><primary>Dataobject</primary></indexterm><glossterm>Dataobject</glossterm> must be a dataset or an
 LzDataElement and tells the RPC function to create a data mapped return value
 and set it on the dataobject. If the dataobject is a dataset, the child nodes of

Modified: openlaszlo/branches/doctools/docs/src/developers/survey-chapter.dbk
===================================================================
--- openlaszlo/branches/doctools/docs/src/developers/survey-chapter.dbk	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/docs/src/developers/survey-chapter.dbk	2007-07-05 17:08:17 UTC (rev 5594)
@@ -176,7 +176,7 @@
 </literal>
 </programlisting>
 <para>
-The function of this tag is to associate the form with the dataset.  Later, when the <indexterm><primary><literal>submit()()</literal></primary></indexterm><methodname>submit()()</methodname> is invoked,
+The function of this tag is to associate the form with the dataset.  Later, when the <methodname role="LzDataset.prototype.submit">submit()</methodname> is invoked,
 the data will be sent to the server.
 </para>
 <para/></section></section><section><title>Extending the &lt;alert&gt; component</title>

Modified: openlaszlo/branches/doctools/docs/src/developers/text.dbk
===================================================================
--- openlaszlo/branches/doctools/docs/src/developers/text.dbk	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/docs/src/developers/text.dbk	2007-07-05 17:08:17 UTC (rev 5594)
@@ -537,7 +537,7 @@
 then it will be sized to the height of the current font. 
 </para>
 <para>Setting the <indexterm><primary>resize</primary></indexterm><sgmltag class="attribute">resize</sgmltag> on a text field will cause it to be resized to
-fit its text content at runtime, whenever the <indexterm><primary><literal>setText()()</literal></primary></indexterm><methodname>setText()()</methodname> method is called.
+fit its text content at runtime, whenever the <methodname role="LzText.prototype.setText">setText()</methodname> method is called.
 </para>
 
 <para>

Modified: openlaszlo/branches/doctools/docs/src/developers/tutorials/art_assets.dbk
===================================================================
--- openlaszlo/branches/doctools/docs/src/developers/tutorials/art_assets.dbk	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/docs/src/developers/tutorials/art_assets.dbk	2007-07-05 17:08:17 UTC (rev 5594)
@@ -11,26 +11,26 @@
 <para>
 In this tutorial we'll be talking about using resources attached to views, which is the more general mechanism. This technique allows you to import not only images, but audio, video "progressive" images and similar complex media.
 </para>
-<para/><section><title>Runtime Considerations</title>
+<section><title>Runtime Considerations</title>
 <para>Depending on which runtime (SWF or DHTML) you're compiling to and whether your application is deployed proxied or SOLO, there may be certain types of assets that may be available. For example, in applications deployed to SWF, you can use assets in SWF format, these are not available in applications compiled to DHTML. Additionally, various formats that are not natively supported by the Flash Player are available only when you run in proxied mode, in which the OpenLaszlo Server transcodes formats.
 </para>
 <para>
-When you insert an image into HTML text, you can only include images in the formats natively supported by the targeted runtime.  For a discussion of how to use the <indexterm><primary>img</primary></indexterm><sgmltag class="element">&lt;img&gt;</sgmltag><remark role="fixme">[unknown tag]</remark>
+When you insert an image into HTML text, you can only include images in the formats natively supported by the targeted runtime.  For a discussion of how to use the <sgmltag class="element" role="img">img</sgmltag>
 <!--unknown tag: img-->
  tag within HTML text, see <xref linkend="text"/>.
 </para>
 <para>Being able to bring in art assets is not just for pictures - you can create your own custom view system too.</para>
 
 
-<para/></section><section id="art_assets.basics"><title>Resources</title>
+</section><section id="art_assets.basics"><title>Resources</title>
 <para>
 
-In OpenLaszlo applications, <indexterm><primary>view</primary></indexterm><sgmltag class="element">&lt;view&gt;</sgmltag><remark role="fixme">[unknown tag]</remark>
+In OpenLaszlo applications, <sgmltag class="element" role="LzView">&lt;view&gt;</sgmltag>
 <!--unknown tag: view-->
 s are the fundamental visible entities, and resources
 are externally generated media to be incorporated in applications. Resources are made available by being
 attatched to views. Thus in OpenLaszlo applications you don't "insert an image" into a view; 
-instead you insert a view whose <emphasis role="i">resource</emphasis> is an image. 
+instead you insert a view whose <emphasis>resource</emphasis> is an image. 
 </para>
 
 <para>Let's look at the simplest way of including an art asset (resource). 
@@ -78,11 +78,11 @@
 
 
 
-<para/></section><section id="art_assets.including"><title>Ways to include resources</title>
+</section><section id="art_assets.including"><title>Ways to include resources</title>
 
 <para>In the example above, we included an image from the current local directory that was loaded when the application was compiled on the server. This may or may not be right for the particular application, so LZX has four ways to load images:</para>
 
-<para/><section><title>Loading resources at compile time</title>
+<section><title>Loading resources at compile time</title>
 <para>The resource gets bundled with the rest of the application when it is compiled on the server, so there will be a larger initial download, but the images will display instantly.</para>
 
 <para>All of these four methods will eventually show the same result on screen:</para>
@@ -101,7 +101,7 @@
 </programlisting></example>
 
 
-<para/></section><section><title>Loading resources at run-time</title>
+</section><section><title>Loading resources at run-time</title>
 <para>The resource does not get loaded until the view is initialized, so the rest of the application will load and there may be a visible delay. The initial download will be smaller, because the images are not bundled with it. The server that does the compiling requests the image (if it resides on a different server), and it routes it to the app that is already running in the client.</para>
 
 <example role="live-example"><title>Absolute referencing</title><programlisting>
@@ -116,14 +116,10 @@
 &lt;/canvas&gt;
 </programlisting></example>
 
-<para>The best way to include a resources that are part of your application 
-is usually with the global identifier (using the <indexterm><primary>resource</primary></indexterm><sgmltag class="element">&lt;resource&gt;</sgmltag><remark role="fixme">[unknown tag]</remark>
-<!--unknown tag: resource-->
- tag). That way all resources
- can be included in one place, and if you need to change a resource's location or the resource itself, you only 
-need to change it once. (Reasons to use other ways of including resources are described in later chapters.)</para>
+<para>The best way to include a resources that are part of your application is usually with the global identifier (using the <sgmltag class="element" role="resource">resource</sgmltag> tag). That way all resources can be included in one place, and if you need to change a resource's location or the resource itself, you only need to change it once. (Reasons to use other ways of including resources are described in later chapters.)</para>
+</section></section>
 
-<para/></section></section><section id="art_assets.types"><title>File types</title>
+<section id="art_assets.types"><title>File types</title>
 
 <example role="live-example">
    <title>Stretching resources</title>
@@ -157,7 +153,7 @@
 
 <para> OpenLaszlo supports GIFs, JPEGs and PNGs. They can all be resized by setting the <indexterm><primary>stretches</primary></indexterm><sgmltag class="attribute">stretches</sgmltag> attribute of the view that contains the resource to <literal>both</literal>, <literal>width</literal> or <literal>height</literal>.</para>
 
-<para/></section><section id="art_assets.multiframe"><title>Multi-frame Resources</title>
+</section><section id="art_assets.multiframe"><title>Multi-frame Resources</title>
 
 <para>Resources can be multi frame, meaning that a single resource is actually made up of a number of different resources, each of which can only be shown one at a time.</para>
 
@@ -192,9 +188,9 @@
 </programlisting><?lzx-edit programs/art_assets-$8.lzx></example?>
 
 <para>The resources nested within the resource tag are numbered starting with 1.</para>
-<para>As you can see, OpenLaszlo supports GIFs, JPEGs and PNGs. They can all be resized by setting the <indexterm><primary>stretches</primary></indexterm><sgmltag class="attribute">stretches</sgmltag> attribute of the view that contains the resource to either <literal>both</literal>, <literal>width</literal> or <literal>height</literal>.</para>
+<para>As you can see, OpenLaszlo supports GIFs, JPEGs and PNGs. They can all be resized by setting the <sgmltag class="attribute" role="LzView.stretches">stretches</sgmltag> attribute of the view that contains the resource to either <literal>both</literal>, <literal>width</literal> or <literal>height</literal>.</para>
 
-<para/></section><section id="art_assets.swfs"><title condition="swf">Working with SWFs</title>
+</section><section id="art_assets.swfs"><title condition="swf">Working with SWFs</title>
 
 <para>In applications compiled to SWF, you can treat SWF-formatted assets as resources, whether they are animated or not:</para>
 
@@ -204,19 +200,8 @@
    <textobject><textdata fileref="programs/art_assets-$9.lzx"/></textobject> 
    </programlisting>
 </example>
-<?example role="live-example"><title>Working with swf files</title><programlisting role="lzx-embednew"><filename>art_assets-$9.lzx</filename><parameter/><code>
-&lt;canvas width="500" height="100"&gt;
-  &lt;view resource="../resources/still_swf.swf"/&gt;
-  &lt;view x="150" y="20" resource="../resources/anim_swf.swf"/&gt;
-&lt;/canvas&gt;
-</code></programlisting><programlisting>
-&lt;canvas width="500" height="100"&gt;
-  &lt;view resource="../resources/still_swf.swf"/&gt;
-  &lt;view x="150" y="20" resource="../resources/anim_swf.swf"/&gt;
-&lt;/canvas&gt;
-</programlisting><?lzx-edit programs/art_assets-$9.lzx></example?>
 
-<para>Any animation will loop <emphasis role="i">ad infinitum</emphasis>. You will probably want to control the animation of a SWF file from the script in your application. To prevent it from playing, we can tell it to stop when the view is initialized:</para>
+<para>Any animation will loop <emphasis>ad infinitum</emphasis>. You will probably want to control the animation of a SWF file from the script in your application. To prevent it from playing, we can tell it to stop when the view is initialized:</para>
 
 <programlisting>&lt;view x="150" y="20" resource="anim_swf.swf" <emphasis role="em">oninit="this.stop();"</emphasis>/&gt;</programlisting>
 
@@ -226,33 +211,31 @@
    <textobject><textdata fileref="programs/art_assets-$10.lzx"/></textobject> 
    </programlisting>
 </example>
-<?example role="live-example"><title>Stopping swf animations</title><programlisting role="lzx-embednew"><filename>art_assets-$10.lzx</filename><parameter/><code>
-&lt;canvas width="500" height="150"&gt;
-  &lt;view name="spinningClock" resource="../resources/clock.swf" 
-        onclick="this.stop();"
-        clickable="true"/&gt;
-&lt;/canvas&gt;
-</code></programlisting><programlisting>
-&lt;canvas width="500" height="150"&gt;
-  &lt;view name="spinningClock" resource="../resources/clock.swf" 
-        onclick="this.stop();"
-        clickable="true"/&gt;
-&lt;/canvas&gt;
-</programlisting><?lzx-edit programs/art_assets-$10.lzx></example?>
 
-<para>Clicking on the image will cause the animation to stop. The <indexterm><primary>onclick event</primary></indexterm><literal>onclick</literal> event handler will be covered in the "Scripting" tutorial.</para>
+<para>Clicking on the image will cause the animation to stop. The <property role="LzView.prototype.onclick">onclick</property> event handler will be covered in the "Scripting" tutorial.</para>
 
-<para>Instead of just using <indexterm><primary><literal>stop()</literal></primary></indexterm><methodname>stop()</methodname>, we could have passed the <indexterm><primary><literal>stop()</literal></primary></indexterm><methodname>stop()</methodname> method an argument instructing it at which frame to stop.
- In addition, we could have used the <indexterm><primary><literal>play()</literal></primary></indexterm><methodname>play()</methodname> method (also with optional frame argument) to play from a given frame.</para>
+<para>Instead of just using <methodname role="LzView.prototype.stop">stop()</methodname>, we could have passed the <methodname role="LzView.prototype.stop">stop()</methodname> method an argument instructing it at which frame to stop.
+ In addition, we could have used the <methodname role="LzView.prototype.play">play()</methodname> method (also with optional frame argument) to play from a given frame.</para>
 
 <para>We can't really progress beyond this point without covering scripting, but here is a preview of some of 
 the other
- attributes and methods of <indexterm><primary>view</primary></indexterm><sgmltag class="element">&lt;view&gt;</sgmltag>s that pertain to resources:</para>
+ attributes and methods of <sgmltag class="element" role="LzView">view</sgmltag>s that pertain to resources:</para>
 
-<variablelist><varlistentry><term><indexterm><primary>view.playing</primary></indexterm><sgmltag class="attribute">view.playing</sgmltag></term><listitem>
-  <para>An attribute that is true if the SWF is currently playing; false if it is stopped.</para></listitem></varlistentry><varlistentry><term><indexterm><primary>view.frame</primary></indexterm><sgmltag class="attribute">view.frame</sgmltag></term><listitem>
-  <para>The number of the current frame.</para></listitem></varlistentry><varlistentry><term><indexterm><primary>view.totalframes</primary></indexterm><sgmltag class="attribute">view.totalframes</sgmltag></term><listitem>
-  <para>The total number of frames in the SWF.</para></listitem></varlistentry><varlistentry><term><literal>view.seek(n)</literal></term><listitem>
-  <para>Jumps forward or backward <emphasis role="i">n</emphasis> seconds through the SWF.</para></listitem></varlistentry></variablelist>
+<variablelist>
+<?ignore no longer supported?
+  <varlistentry><term><sgmltag class="attribute" role="LzView.__ivars__.playing">playing</sgmltag></term>
+    <listitem><para>An attribute that is true if the SWF is currently playing; false if it is stopped.</para></listitem>
+  </varlistentry>
+?>
+  <varlistentry><term><sgmltag class="attribute" role="LzView.__ivars__.frame">frame</sgmltag></term>
+    <listitem><para>The number of the current frame.</para></listitem>
+  </varlistentry>
+  <varlistentry><term><sgmltag class="attribute" role="LzView.__ivars__.totalframes">totalframes</sgmltag></term>
+    <listitem><para>The total number of frames in the SWF.</para></listitem>
+  </varlistentry>
+  <varlistentry><term><methodname role="LzView.prototype.seek">seek</methodname></term>
+    <listitem><para>Jumps forward or backward <emphasis>n</emphasis> seconds through the SWF.</para></listitem>
+  </varlistentry>
+</variablelist>
 <para>These and other APIs are discussed in greater detail in <xref linkend="media-resources"/>.</para>
-<para/></section></chapter>
+</section></chapter>

Modified: openlaszlo/branches/doctools/docs/src/developers/tutorials/drawview-intro.dbk
===================================================================
--- openlaszlo/branches/doctools/docs/src/developers/tutorials/drawview-intro.dbk	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/docs/src/developers/tutorials/drawview-intro.dbk	2007-07-05 17:08:17 UTC (rev 5594)
@@ -108,7 +108,7 @@
     &lt;/canvas&gt;
 </programlisting><?lzx-edit programs/drawview-intro-$3.lzx></example?>
 <para>
-The <indexterm><primary><literal>closePath()()</literal></primary></indexterm><methodname>closePath()()</methodname> method draws a line back to the beginning of the current path:
+The <methodname role="drawview.__ivars__.closePath">closePath</methodname> method draws a line back to the beginning of the current path:
 </para>
 <example role="live-example">
    <title>Stroking the line</title>
@@ -228,7 +228,7 @@
 </para>
 <para>
 A <literal>fillStyle</literal> can be a color gradient, that is, a pattern that blends colors over its area. To use a gradient, first create it using the appropriate (linear or radial) constructor function, then set the <literal>fillStyle</literal> to be the gradient.  A gradient is an object of the type <indexterm><primary>LzCanvasGradient</primary></indexterm><classname>LzCanvasGradient</classname>; you define
-the parameters of the gradient by using methods such as <indexterm><primary><literal>addColorStop()()</literal></primary></indexterm><methodname>addColorStop()()</methodname> on it. <indexterm><primary><literal>addColorStop()()</literal></primary></indexterm><methodname>addColorStop()()</methodname> takes two arguments: the number of the stop,
+the parameters of the gradient by using methods such as <methodname role="drawview.prototype.addColorStop">addColorStop</methodname> on it. <methodname role="lz.drawview.prototype.addColorStop">addColorStop</methodname> takes two arguments: the number of the stop,
 and the color.  
 </para>
 <example role="live-example">
@@ -338,7 +338,7 @@
 </para>
 <para/></section><section><title>Starting Over</title>
 <para>
-We've said that drawing a line is like moving a pen. So, how do you pick up the pen in order to move it to another spot on the canvas? Use the <indexterm><primary><literal>beginPath()()</literal></primary></indexterm><methodname>beginPath()()</methodname>
+We've said that drawing a line is like moving a pen. So, how do you pick up the pen in order to move it to another spot on the canvas? Use the <methodname role="lz.drawview.prototype.beginPath">beginPath</methodname>
 method.
 </para>
 <example role="live-example">
@@ -435,7 +435,7 @@
  API is procedural, it's simple to blend the procedural drawing API with the declarative LZX style. The
 following little program illustrates this. The <literal>r</literal> attribute is modulated in by an <indexterm><primary>animator</primary></indexterm><sgmltag class="element">&lt;animator&gt;</sgmltag><remark role="fixme">[unknown tag]</remark>
 <!--unknown tag: animator-->
- element; when <literal>r </literal>changes, the <indexterm><primary><literal>redraw()()</literal></primary></indexterm><methodname>redraw()()</methodname>
+ element; when <literal>r </literal>changes, the <methodname role="lz.drawview.prototype.redraw">redraw</methodname>
 method is evoked.
 </para>
 

Modified: openlaszlo/branches/doctools/docs/src/xsl/dbkpreprocessexamples.xsl
===================================================================
--- openlaszlo/branches/doctools/docs/src/xsl/dbkpreprocessexamples.xsl	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/docs/src/xsl/dbkpreprocessexamples.xsl	2007-07-05 17:08:17 UTC (rev 5594)
@@ -102,6 +102,23 @@
     </xsl:copy>
   </xsl:template>
 
+  <xsl:template match="structfield[@role] | property[@role] | methodname[@role] | sgmltag[@role]">
+    <xsl:variable name="itemname">
+      <xsl:choose>
+        <xsl:when test="contains(text(), '()')">
+          <xsl:value-of select="substring-before(text(), '()')"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="text()"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <indexterm><primary><xsl:value-of select="$itemname"/></primary></indexterm>
+    <link linkend="{@role}">
+      <xsl:element name="{local-name()}"><xsl:value-of select="text()"/></xsl:element>
+    </link>
+  </xsl:template>
+
   <xsl:template mode="canvas-width" match="/">
     <xsl:choose>
       <xsl:when test="canvas/@width">

Modified: openlaszlo/branches/doctools/docs/src/xsl/js2doc-comment2dbk.xsl
===================================================================
--- openlaszlo/branches/doctools/docs/src/xsl/js2doc-comment2dbk.xsl	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/docs/src/xsl/js2doc-comment2dbk.xsl	2007-07-05 17:08:17 UTC (rev 5594)
@@ -62,7 +62,7 @@
     </title>
   </xsl:template>
   
-  <xsl:template match="code|tt">
+  <xsl:template match="code|tt" mode="html2dbk">
     <literal>
       <xsl:if test="@class">
         <xsl:attribute name="role"><xsl:value-of select="@class"/></xsl:attribute>
@@ -255,7 +255,7 @@
     </simplelist>
   </xsl:template>
   
-  <xsl:template match="pre">
+  <xsl:template match="pre" mode="html2dbk">
     <programlisting language="lzx">
       <xsl:apply-templates/>
     </programlisting>

Modified: openlaszlo/branches/doctools/docs/src/xsl/js2doc2dbk.xsl
===================================================================
--- openlaszlo/branches/doctools/docs/src/xsl/js2doc2dbk.xsl	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/docs/src/xsl/js2doc2dbk.xsl	2007-07-05 17:08:17 UTC (rev 5594)
@@ -367,7 +367,6 @@
               </xsl:if>
               <xsl:value-of select="$name"/>
             </primary>
-            <secondary>Described</secondary>
           </indexterm>
           <xsl:value-of select="$desc"/>
         </term>
@@ -635,7 +634,6 @@
       </xsl:if>
       <xsl:variable name="parentid" select="@unitid"/>
       <xsl:if test="$parentid">
-        <xsl:message><xsl:value-of select="concat('parentid: ', $parentid)"/></xsl:message>
         <xsl:variable name="visibility"><xsl:value-of select="key('id',$parentid)/@access"/></xsl:variable>
         <xsl:if test="contains($visibility.filter, $visibility)">
           <indexterm zone="{$parentid}">

Modified: openlaszlo/branches/doctools/lps/components/base/basedatepicker.lzx
===================================================================
--- openlaszlo/branches/doctools/lps/components/base/basedatepicker.lzx	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/lps/components/base/basedatepicker.lzx	2007-07-05 17:08:17 UTC (rev 5594)
@@ -601,7 +601,7 @@
                 basedatepickerday and basedatepickerweek will be overridden to provide full
                 functionality of a datepicker.  For datepicker, these methods include
                 doSpaceUp(), doEnterUp(), and optionally setMonthToShow().  See the source code of
-                datepicker for a more extensive example.  See also <xref linkend="basedatepickerday"/> and <xref linkend="basedatepickerweek"/>
+                datepicker for a more extensive example.  See also <xref linkend="lz.basedatepickerday"/> and <xref linkend="lz.basedatepickerweek"/>
             
             </p>
             <example class="program" id="basedatepicker-1">

Modified: openlaszlo/branches/doctools/lps/components/base/basedatepickerday.lzx
===================================================================
--- openlaszlo/branches/doctools/lps/components/base/basedatepickerday.lzx	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/lps/components/base/basedatepickerday.lzx	2007-07-05 17:08:17 UTC (rev 5594)
@@ -62,7 +62,7 @@
                 functionality of a datepicker.  For basedatepickerday, these methods include
                 buttonpush(), buttonrelease(), gotFocus(), and removeFocus().  See the source code of
                 datepicker for a more extensive example. 
-               See also <xref linkend="basedatepicker"/> and <xref linkend="basedatepickerweek"/>
+               See also <xref linkend="lz.basedatepicker"/> and <xref linkend="lz.basedatepickerweek"/>
             
             </p>
           </text>

Modified: openlaszlo/branches/doctools/lps/components/base/basedatepickerweek.lzx
===================================================================
--- openlaszlo/branches/doctools/lps/components/base/basedatepickerweek.lzx	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/lps/components/base/basedatepickerweek.lzx	2007-07-05 17:08:17 UTC (rev 5594)
@@ -194,8 +194,8 @@
           <text>
             <p> 
                Basedatepickerweek is an abstract class representing a week for use with the 
-               basedatepicker.  See also <xref linkend="basedatepicker"/>
-               and <xref linkend="basedatepickerday"/>
+               basedatepicker.  See also <xref linkend="lz.basedatepicker"/>
+               and <xref linkend="lz.basedatepickerday"/>
             
             </p>
           </text>

Modified: openlaszlo/branches/doctools/lps/components/base/basescrollbar.lzx
===================================================================
--- openlaszlo/branches/doctools/lps/components/base/basescrollbar.lzx	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/lps/components/base/basescrollbar.lzx	2007-07-05 17:08:17 UTC (rev 5594)
@@ -548,7 +548,7 @@
                  mouse button is released.
             </p>
             
-            <p>  See <xref linkend="basescrollbar"/> for more details. </p>
+            <p>  See <xref linkend="lz.basescrollbar"/> for more details. </p>
           </text>
         </doc>
     </class>
@@ -576,7 +576,7 @@
           <text>
             <p>
                 This class must be used with basescrollbar.
-                See <xref linkend="basescrollbar"/> for more details.
+                See <xref linkend="lz.basescrollbar"/> for more details.
             </p>
           </text>
         </doc>

Modified: openlaszlo/branches/doctools/lps/components/charts/common/viewspoolmanager.lzx
===================================================================
--- openlaszlo/branches/doctools/lps/components/charts/common/viewspoolmanager.lzx	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/lps/components/charts/common/viewspoolmanager.lzx	2007-07-05 17:08:17 UTC (rev 5594)
@@ -118,35 +118,35 @@
         </method>        
     </class>  
     
-     <!--- @keyword private
-     a pool of ordered view  
-     -->
+     <!--- A pool of ordered view  
+         - @keyword private
+        -->
     <class name="viewslist" extends="node">             
-        <attribute name="list" value="$once{[]}"/>
+        <attribute name="vlist" value="$once{[]}"/>
         <attribute name="parentview" value="${parent}"/>
         <attribute name="viewclass" type="string" value="$once{null}"/>
         
         <!-- get a view the pool -->
         <method name="getViewAt" args="index, args">            
-            if(this.list[index] == null)
+            if(this.vlist[index] == null)
             {
-                this.list[index] = new global[viewclass](parentview, args);                 
+                this.vlist[index] = new global[viewclass](parentview, args);                 
             }
             else
             {
-                this.list[index].setVisible(true);
+                this.vlist[index].setVisible(true);
             }
-            return this.list[index];            
+            return this.vlist[index];            
         </method>   
         
         <!-- put are the view back to the pools -->         
         <method name="reclaimAll">
         <![CDATA[             
-             for(var i = 0; i < list.length; i++)
+             for(var i = 0; i < vlist.length; i++)
              {                
-                 if(list[i] != undefined){
-                    list[i].setVisible(false);
-                    //list[i].clear();
+                 if(vlist[i] != undefined){
+                    vlist[i].setVisible(false);
+                    //vlist[i].clear();
                 }
              }
         ]]>
@@ -155,7 +155,7 @@
 </library>   
 <!-- * X_LZ_COPYRIGHT_BEGIN 
 ***************************************************
-* Copyright 2001-2006 Laszlo Systems, Inc.  All Rights Reserved.              
+* Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.              
 * Use is subject to license terms.                                            
 * X_LZ_COPYRIGHT_END 
 ****************************************************** -->

Modified: openlaszlo/branches/doctools/lps/components/incubator/draglib.lzx
===================================================================
--- openlaszlo/branches/doctools/lps/components/incubator/draglib.lzx	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/lps/components/incubator/draglib.lzx	2007-07-05 17:08:17 UTC (rev 5594)
@@ -4,7 +4,7 @@
 <library>
   <!---  This should be declared as a child of the thing for which you want to
         enable dragging.  You will need to define a view (an instance of a
-        subclass of <xref linkend="basedragimage"/>)
+        subclass of <xref linkend="lz.basedragimage"/>)
         to define the visual look of the thing while its being dragged.
         <example executable="false">
         &lt;class name="dragger" &gt;
@@ -90,7 +90,7 @@
   
   
   <!--- the visual representation of an object being dragged.
-        See <xref linkend="checkdragstate"/> for usage details 
+        See <xref linkend="lz.checkdragstate"/> for usage details 
         @access public
   -->
   <class name="basedragimage"  options="ignorelayout"

Modified: openlaszlo/branches/doctools/lps/components/incubator/rich-text/formatbtn.lzx
===================================================================
--- openlaszlo/branches/doctools/lps/components/incubator/rich-text/formatbtn.lzx	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/lps/components/incubator/rich-text/formatbtn.lzx	2007-07-05 17:08:17 UTC (rev 5594)
@@ -8,7 +8,7 @@
     <include href="../stylishbutton.lzx" />
     <include href="../tooltip/tooltip.lzx" />
     
-    <!--- class for use of <xref linkend="richtexttoolbar" /> buttons  -->
+    <!--- class for use of <xref linkend="lz.richtexttoolbar" /> buttons  -->
     <class name="formatbtn" extends="stylishbutton" width="26" 
            focusable="false" style="formatbtn_style">
         <!--- the format type that the button will control -->

Modified: openlaszlo/branches/doctools/lps/components/lzunit/lzunit.lzx
===================================================================
--- openlaszlo/branches/doctools/lps/components/lzunit/lzunit.lzx	2007-07-05 15:00:59 UTC (rev 5593)
+++ openlaszlo/branches/doctools/lps/components/lzunit/lzunit.lzx	2007-07-05 17:08:17 UTC (rev 5594)
@@ -235,7 +235,7 @@
   It accumulates the results of the test and defines the various
   assert methods that can be used to implement each test.
 
-  <xref linkend="TestCase"/> and <xref linkend="TestResult"/> extend this class to provide
+  <xref linkend="lz.TestCase"/> and <xref linkend="lz.TestResult"/> extend this class to provide
   functionality.
 
   @param semantics: one of "javascript" or "actionscript", defaults to
@@ -567,7 +567,7 @@
 <!---
   TestCase implements an individual test case.
 
-  See the documentation for <xref linkend="TestSuite"/>
+  See the documentation for <xref linkend="lz.TestSuite"/>
   for an example of this tag.
 
   @param testName: the name of the test
@@ -764,7 +764,7 @@
   its first child view so the results of the test suite will be
   displayed.
 
-  See the documentation for <xref linkend="TestSuite"/>
+  See the documentation for <xref linkend="lz.TestSuite"/>
   for an example of this tag.
 -->
 <class name="TestResult" extends="DebugObject">



More information about the Laszlo-checkins mailing list