[Laszlo-checkins] r7085 - openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9

pbr@openlaszlo.org pbr at openlaszlo.org
Thu Nov 1 13:22:16 PDT 2007


Author: pbr
Date: 2007-11-01 13:22:09 -0700 (Thu, 01 Nov 2007)
New Revision: 7085

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/Library.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzAudio.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzFontManager.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzFunctions.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzHTTPLoader.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzKeyboardKernel.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzLoadQueue.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMakeLoadSprite.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMediaLoader.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMouseKernel.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzRequires.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzScreenKernel.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSoundMC.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzXMLParser.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzXMLTranslator.lzs
Log:
Change 20071026-Philip-8 by Philip at Philip-DC on 2007-10-26 15:32:12 EDT
     in /cygdrive/f/laszlo/svn/src/svn/openlaszlo/trunk
     for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Convert swf kernel to lfc class system (swf9 kernel)

New Features:

Bugs Fixed: LPP-NaN

Technical Reviewer: ptw
QA Reviewer: max
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
Convert the *.as files to *.lzs files by converting each file to the lfc class system. No functionality changes have been made. No indentation changes have been
  made to minimize the changes.

Note, any changes to the kernel/swf files (beyond r6975) will have to be merged to the /swf9 directory.

Some files contained singleton objects. These were converted to classes with a single instance. For example, LzScreenKernel becomes LzScreenKernelClass which is
  instantiated at the end of the file,
    var LzScreenKernel = new LzScreenKernelClass;

There are some commented labeled //TODO or //PBR TODO which highlight some items I need to verify or modify. They don't seem to prevent the
swf9 kernel from running.

The two most interesting files to review are LzScreenKernel.lzs and LzMouseKernel.lzs. Another interesting change is with LzTextSprite.set{Width,Height}.

I did not convert the dojo directories. I don't know if there is a
flash9 version of these files. The file kernel/swf9/Library.lzs references the /swf/dojo files for now.


Tests:

Modify /kernel/Library.lzs to call
     #include "kernel/swf9/Library.lzs"
instead of
     #include "kernel/swf/Library.lzs"

Rebuild and applications continue to work. I tested with lzpix, calendar, component sampler, and tree.



Files:
M      WEB-INF/lps/lfc/kernel/swf9/LzMakeLoadSprite.lzs
M      WEB-INF/lps/lfc/kernel/swf9/LzMediaLoader.lzs
M      WEB-INF/lps/lfc/kernel/swf9/LzHTTPLoader.lzs
M      WEB-INF/lps/lfc/kernel/swf9/LzSprite.lzs
M      WEB-INF/lps/lfc/kernel/swf9/LzSoundMC.lzs
M      WEB-INF/lps/lfc/kernel/swf9/LzFunctions.lzs
M      WEB-INF/lps/lfc/kernel/swf9/LzXMLTranslator.lzs
M      WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.lzs
M      WEB-INF/lps/lfc/kernel/swf9/LzXMLParser.lzs
M      WEB-INF/lps/lfc/kernel/swf9/LzScreenKernel.lzs
M      WEB-INF/lps/lfc/kernel/swf9/LzLoadQueue.lzs
M      WEB-INF/lps/lfc/kernel/swf9/LzMouseKernel.lzs
M      WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.lzs
M      WEB-INF/lps/lfc/kernel/swf9/Library.lzs
M      WEB-INF/lps/lfc/kernel/swf9/LzRequires.lzs
M      WEB-INF/lps/lfc/kernel/swf9/LzAudio.lzs
M      WEB-INF/lps/lfc/kernel/swf9/LzFontManager.lzs
M      WEB-INF/lps/lfc/kernel/swf9/LzKeyboardKernel.lzs

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20071026-Philip-8.tar



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/Library.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/Library.lzs	2007-11-01 20:05:16 UTC (rev 7084)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/Library.lzs	2007-11-01 20:22:09 UTC (rev 7085)
@@ -8,26 +8,27 @@
   * @subtopic AS2
   */
 
-#include "kernel/swf/LzRequires.as"
-#include "kernel/swf/LzSprite.as"
-#include "kernel/swf/LzTextSprite.as"
-#include "kernel/swf/LzInputTextSprite.as"
-#include "kernel/swf/LzMakeLoadSprite.as"
-#include "kernel/swf/LzLoader.lzs"
-#include "kernel/swf/LzMediaLoader.lzs"
-#include "kernel/swf/LzLibraryLoader.lzs"
-#include "kernel/swf/LzFontManager.as"
-#include "kernel/swf/LzLoadQueue.as"
-#include "kernel/swf/LzFunctions.as"
-#include "kernel/swf/LzSoundMC.as"
-#include "kernel/swf/LzLibrary.lzs"
-#include "kernel/swf/LzXMLParser.as"
-#include "kernel/swf/LzXMLTranslator.as"
-#include "kernel/swf/LzHTTPLoader.as"
-#include "kernel/swf/LzMouseKernel.as"
-#include "kernel/swf/LzKeyboardKernel.as"
-#include "kernel/swf/LzAudio.as"
-#include "kernel/swf/LzScreenKernel.as"
-#include "kernel/swf/LzContextMenu.lzs"
+#include "kernel/swf9/LzRequires.lzs"
+#include "kernel/swf9/LzSprite.lzs"
+#include "kernel/swf9/LzTextSprite.lzs"
+#include "kernel/swf9/LzInputTextSprite.lzs"
+#include "kernel/swf9/LzMakeLoadSprite.lzs"
+#include "kernel/swf9/LzLoader.lzs"
+#include "kernel/swf9/LzMediaLoader.lzs"
+#include "kernel/swf9/LzLibraryLoader.lzs"
+#include "kernel/swf9/LzFontManager.lzs"
+#include "kernel/swf9/LzLoadQueue.lzs"
+#include "kernel/swf9/LzFunctions.lzs"
+#include "kernel/swf9/LzSoundMC.lzs"
+#include "kernel/swf9/LzLibrary.lzs"
+#include "kernel/swf9/LzXMLParser.lzs"
+#include "kernel/swf9/LzXMLTranslator.lzs"
+#include "kernel/swf9/LzHTTPLoader.lzs"
+#include "kernel/swf9/LzMouseKernel.lzs"
+#include "kernel/swf9/LzAudio.lzs"
+#include "kernel/swf9/LzScreenKernel.lzs"
+#include "kernel/swf9/LzKeyboardKernel.lzs"
+#include "kernel/swf9/LzContextMenu.lzs"
+
+//Use swf version until we decide what swf9 version looks like
 #include "kernel/swf/dojo/Library.lzs"
-

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzAudio.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzAudio.lzs	2007-11-01 20:05:16 UTC (rev 7084)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzAudio.lzs	2007-11-01 20:22:09 UTC (rev 7085)
@@ -1,5 +1,5 @@
 /**
-  * LzAudio.as
+  * LzAudio.lzx
   *
   * @copyright Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
@@ -12,21 +12,19 @@
   * @shortdesc This service manages audio resource playback.
   * 
   */
-var LzAudio = new Object;
-{
-#pragma "passThrough=true"
-LzAudio.globalSound = new Sound();
-}
-LzAudio.globalSound.$xxx = "globsnd" ;
+class LzAudioClass {
 
+var globalSound = new Sound();
+//TODO
+//LzAudio.globalSound.$xxx = "globsnd" ;
+
 /**
   * Sets the current sound resource and starts playing it. 
   * @param String snd: Name of a sound resource to play
   */
-LzAudio.playSound = function ( snd , t ){
+function playSound ( snd , t ){
     // Intentionally undocumented 
     // @param Object t: MovieClip for sound to act upon
-    #pragma "passThrough=true"
     var s = new Sound(t); 
     s.attachSound(snd);  
     s.start(); 
@@ -35,10 +33,9 @@
 /**
   * Stop playing the current sound
   * */
-LzAudio.stopSound = function ( t ){
+function stopSound ( t ){
     // Intentionally undocumented 
     // @param Object t: MovieClip for sound to act upon
-    #pragma "passThrough=true"
     var s = new Sound(t); 
     s.stop(); 
 }
@@ -46,10 +43,9 @@
 /**
   * Start playing the current sound
   * */
-LzAudio.startSound = function (t) {
+function startSound (t) {
     // Intentionally undocumented 
     // @param Object t: MovieClip for sound to act upon
-    #pragma "passThrough=true"
     var s = new Sound(t);
     s.start(v);
 }
@@ -57,10 +53,9 @@
 /**
   * @access private
   */
-LzAudio.getSoundObject = function (t) {
+function getSoundObject (t) {
     if ( t == null ) return this.globalSound;
     if ( t.$snd == null ){
-        #pragma "passThrough=true"
         t.$snd = new Sound(t);
     }
     return t.$snd;
@@ -71,7 +66,7 @@
   * @param Object t: MovieClip for sound to act upon
   * @return Number: volume from 0 to 100 (0 is silent).
   */
-LzAudio.getVolume = function (t) {
+function getVolume (t) {
     // Intentionally undocumented 
     return this.getSoundObject(t).getVolume();
 }
@@ -80,7 +75,7 @@
   * Set the global volume.
   * @param Number v: linear volume from 0 to 100 (0 is silent).
   */
-LzAudio.setVolume = function (v, t) {
+function setVolume (v, t) {
     // Intentionally undocumented 
     // @param Object t: MovieClip for sound to act upon
     var s = this.getSoundObject( t );
@@ -96,7 +91,7 @@
   * Get the global pan.
   * @return Number: linear pan from -100 to +100 (left to right)
   */
-LzAudio.getPan = function (t) {
+function getPan (t) {
     // Intentionally undocumented 
     // @param Object t: MovieClip for sound to act upon
     var s = this.getSoundObject( t );
@@ -107,7 +102,7 @@
   * Set the global pan.
   * @param Number p: linear pan from -100 to +100 (left to right)
   */
-LzAudio.setPan = function (p, t) {
+function setPan (p, t) {
     // Intentionally undocumented 
     // @param Object t: MovieClip for sound to act upon
     var s = this.getSoundObject( t );
@@ -118,3 +113,7 @@
         s.setPan(100);
     }
 }
+
+} // End of LzAudioClass
+
+var LzAudio = new LzAudioClass ();

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzFontManager.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzFontManager.lzs	2007-11-01 20:05:16 UTC (rev 7084)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzFontManager.lzs	2007-11-01 20:22:09 UTC (rev 7085)
@@ -1,5 +1,5 @@
 /**
-  * LzFontManager.as
+  * LzFontManager.lzs
   *
   * @copyright Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
@@ -17,7 +17,7 @@
   * Each font object contains slots for the styles that are available
   * (plain, bold, italic, and/or bolditalic).
   */
-var LzFontManager = new Object;
+class LzFontManagerClass {
 
 /** @devnote currently doesn't support sending variables...
   */
@@ -34,7 +34,7 @@
   * @param Object bi: The bold italic style of the font.
   * @access private
   */
-LzFontManager.addFont = function (  fontname , n , b , i , bi ){
+function addFont (  fontname , n , b , i , bi ){
 
     var ff = new Object;
     ff.name = fontname;
@@ -66,7 +66,7 @@
   * @return any: An <class>LzFont</class> object, or undefined if not found
   * 
   */
-LzFontManager.getFont = function ( fontname , style ){
+function getFont ( fontname , style ){
     if ( style == null ) { style = "plain" }
     var fns = fontname.split(',');
     if (fns.length > 0) {
@@ -97,7 +97,7 @@
   * @return LzFont:  The new <class>LzFont</class>.
   * @access private
   */
-LzFontManager.addStyle = function ( f , s ){
+function addStyle ( f , s ){
     //not pretty -- especially if the complexity of styles grows -- but works
     //for now
 
@@ -126,30 +126,30 @@
 
 // Map {font-name -> true} of client font names.  convertFontList
 // initializes this.
-LzFontManager.__clientFontNames = null;
+var __clientFontNames = null;
 
 // A map from CSS generic font family names such as 'sans-serif' to
 // Flash names such as '_sans'.
-LzFontManager.__fontFamilyMap = {'monospace': '_typewriter', 'serif': '_serif', 'sans-serif': '_sans'};
+var __fontFamilyMap = {'monospace': '_typewriter', 'serif': '_serif', 'sans-serif': '_sans'};
 
 // A hashset of device font family names.
-LzFontManager.__genericClientFontFamilyNames = {'_typewriter': true, '_serif': true, '_sans': true};
+var __genericClientFontFamilyNames = {'_typewriter': true, '_serif': true, '_sans': true};
 
 if ($debug) {
     // The runtime warns about the use of Flash-specific names.
     // This is a list of names that have been warned about, to
     // eliminate duplicate warnings.
-    LzFontManager.__debugWarnedFonts = {};
+    var __debugWarnedFonts = {};
 }
 
-LzFontManager.__fontnameCacheMap = {};
+var __fontnameCacheMap = {};
 
 /**
   * Convert an LZX font name to one that the Flash runtime can render.
   * This involves removing whitespace, and changing CSS generic font family
   * names such as 'sans-serif' to Flash names such as '_sans'.
   */
-LzFontManager.__convertFontName = function (name) {
+function __convertFontName (name) {
     // FIXME [2004-11-29 ows]: trim other types of whitespace too
     while (name.charAt(0) == ' ') name = name.slice(1);
     while (name.charAt(name.length - 1) == ' ') name = name.slice(0, name.length-1);
@@ -172,7 +172,7 @@
   * none of the names can be rendered. str is a comma-separated list
   * of font names.
   */
-LzFontManager.__findMatchingFont = function (str) {
+function __findMatchingFont (str) {
     if (this.__clientFontNames == null) {
         this.__clientFontNames = {};
         var fonts = TextField.getFontList()
@@ -194,7 +194,7 @@
         name = this.__convertFontName(str);
     }
     if ($debug) {
-        if (!LzFontManager.__fontExists(name) && !this.__debugWarnedFonts[name]) {
+        if (!LzFontManagerClass.__fontExists(name) && !this.__debugWarnedFonts[name]) {
             this.__debugWarnedFonts[name] = true;
             Debug.warn("Undefined font %w", name);
         }
@@ -207,9 +207,13 @@
 /**
   * @access private
   */
-LzFontManager.__fontExists = function (str) {
+function __fontExists (str) {
     return (this.fonts[ str ] != null ||
             this.__clientFontNames[str] != null ||
             this.__genericClientFontFamilyNames[str] != null ||
             this.__fontFamilyMap[str] != null);
 }
+
+} // End of LzFontManager
+
+var LzFontManager = new LzFontManagerClass ();

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzFunctions.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzFunctions.lzs	2007-11-01 20:05:16 UTC (rev 7084)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzFunctions.lzs	2007-11-01 20:22:09 UTC (rev 7085)
@@ -1,5 +1,5 @@
 /**
-  * LzFunctions.as
+  * LzFunctions.lzs
   *
   * @copyright Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzHTTPLoader.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzHTTPLoader.lzs	2007-11-01 20:05:16 UTC (rev 7084)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzHTTPLoader.lzs	2007-11-01 20:22:09 UTC (rev 7085)
@@ -1,5 +1,5 @@
 /**
-  * LzHTTPLoader.as
+  * LzHTTPLoader.lzs
   *
   * @copyright Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
@@ -13,7 +13,9 @@
   */
 
 // We have an internal 'lzloader' property which points to an LzLoader (Flash-7-8-specific)
-var LzHTTPLoader = function (owner, proxied) {
+class LzHTTPLoader {
+
+function initialize (owner, proxied) {
     this.lzloader = this.makeLzLoader(proxied);
     this.owner = owner;
     this.options = {
@@ -34,68 +36,67 @@
 
 // Default callback handlers
 
-LzHTTPLoader.prototype._loadSuccessHandler = function (data) { this.loadSuccess(this,data); }
-LzHTTPLoader.prototype._loadErrorHandler   = function (data) { this.loadError  (this,data); }
-LzHTTPLoader.prototype._loadTimeoutHandler = function (data) { this.loadTimeout(this,data); }
+function _loadSuccessHandler (data) { this.loadSuccess(this,data); }
+function _loadErrorHandler (data) { this.loadError  (this,data); }
+function _loadTimeoutHandler (data) { this.loadTimeout(this,data); }
 
-LzHTTPLoader.GET_METHOD    = "GET";
-LzHTTPLoader.POST_METHOD   = "POST";
-LzHTTPLoader.PUT_METHOD    = "PUT";
-LzHTTPLoader.DELETE_METHOD = "DELETE";
+static var GET_METHOD    = "GET";
+static var POST_METHOD   = "POST";
+static var PUT_METHOD    = "PUT";
+static var DELETE_METHOD = "DELETE";
 
-LzHTTPLoader.prototype.lzloader = null;
+var lzloader = null;
 
-
 /* Returns the response as a string  */
-LzHTTPLoader.prototype.getResponse = function () {
+function getResponse () {
     return this.lzloader.rawtext;
 }
 
 /* Returns the parsed native XML DOM object, if any */
-LzHTTPLoader.prototype.getNativeXMLObject = function () {
+function getNativeXMLObject () {
     // nyi
 }
 
 /* Returns numeric status code (200, 404, 500, etc...) */
-LzHTTPLoader.prototype.getResponseStatus = function () {
+function getResponseStatus () {
     // nyi
 }
 
 /* Returns an array of response headers  */
-LzHTTPLoader.prototype.getResponseHeaders = function () {
+function getResponseHeaders () {
     // nyi
 }
 
-LzHTTPLoader.prototype.setRequestHeaders = function (obj) {
+function setRequestHeaders (obj) {
     this.requestheaders = obj;
 }
 
-LzHTTPLoader.prototype.setRequestHeader = function (key, val) {
+function setRequestHeader (key, val) {
     this.requestheaders[key] = val;
 }
 
-LzHTTPLoader.prototype.abort = function () {
+function abort () {
     this.lzloader.abort();
 }
 
-LzHTTPLoader.prototype.setOption = function (key, val) {
+function setOption (key, val) {
     this.options[key] = val;
 }
 
 /* @public */
-LzHTTPLoader.prototype.setProxied = function (proxied) {
+function setProxied (proxied) {
     this.setOption('proxied', proxied);
 }
 
 /* @public
  */
-LzHTTPLoader.prototype.setQueryParams = function (qparams) {
+function setQueryParams (qparams) {
     this.queryparams = qparams;
 }
 
 /* @public
  */
-LzHTTPLoader.prototype.setQueryString = function (qstring) {
+function setQueryString (qstring) {
     this.querystring = qstring;
 }
 
@@ -103,17 +104,17 @@
  If queueRequests is true, subsequent requests will made sequentially
  If queueRequests is false, subsequent requests will interrupt requests already in process
 */
-LzHTTPLoader.prototype.setQueueing = function (queuing) {
+function setQueueing (queuing) {
     this.lzloader.queuing = queuing;
     this.setOption('queuing', queuing);
 }
 
-LzHTTPLoader.prototype.getResponseHeader = function (key) {
+function getResponseHeader (key) {
 }
 
 
 // headers can be a hashtable or null
-LzHTTPLoader.prototype.open = function (method, url, username, password) {
+function open (method, url, username, password) {
     // set loadobj.reqtype to this
     this.requestmethod = method;
 
@@ -156,7 +157,7 @@
     this.xmlrequestobj = xmlrequestobj;
 }
 
-LzHTTPLoader.prototype.send = function (content) {
+function send (content) {
     //Debug.write('LzHTTPLoader.prototype.send', this, this.lzloader);
     this.xmlrequestobj.rawpostbody = content;
     this.lzloader.setHeaders(this.requestheaders);
@@ -169,7 +170,7 @@
 //   @param  String reqtype: 'POST' or 'GET'
 //   @param  String lzt: LPS server Responder type, default is "xmldata"
 //   @param Object headers: hash table of HTTP request headers
-LzHTTPLoader.prototype.makeProxiedURL = function ( url,  reqtype, lzt, headers) {
+function makeProxiedURL ( url,  reqtype, lzt, headers) {
     var proxyurl = LzBrowser.getBaseURL( );
     var qargs = {
         lzt: (lzt != null) ? lzt : "xmldata",
@@ -218,9 +219,9 @@
 }
 
 
-LzHTTPLoader.prototype.timeout = Infinity;
+var timeout = Infinity;
 
-LzHTTPLoader.prototype.setTimeout = function (timeout) {
+function setTimeout (timeout) {
     this.timeout = timeout;
     // [todo hqm 2006-07] Should we have  an API method for setting LzLoader timeout?
     this.lzloader.timeout = timeout;
@@ -234,7 +235,7 @@
   * @access private
   * @return LzLoader 
   */
-LzHTTPLoader.prototype.makeLzLoader = function (proxied){
+function makeLzLoader (proxied){
     if ( ! $dataloaders ){
         // SWF-specific
         _root.attachMovie("empty", "$dataloaders", 4242);
@@ -254,6 +255,8 @@
                                        proxied: proxied} );
 }
 
-LzHTTPLoader.urlencode = function (str) {
+function urlencode (str) {
     return escape(str);
 }
+
+} // End of LzHTTPLoader

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.lzs	2007-11-01 20:05:16 UTC (rev 7084)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.lzs	2007-11-01 20:22:09 UTC (rev 7085)
@@ -1,5 +1,5 @@
 /**
-  * LzInputTextSprite.as
+  * LzInputTextSprite.lzs
   *
   * @copyright Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
@@ -12,7 +12,14 @@
   * @shortdesc Used for input text.
   * 
   */
-var LzInputTextSprite = function(newowner, args) {
+class LzInputTextSprite extends LzTextSprite {
+
+function initialize(newowner, args) {
+    // [todo pbr 10-31-07]
+    // I'm not calling super.initialize because this appears to do what
+    // LzInputSprite ctor does 
+    // super.initialize.apply(this, arguments);
+
     this.__LZdepth = newowner.immediateparent.sprite.__LZsvdepth++;
     this.__LZsvdepth = 0;
 
@@ -49,27 +56,19 @@
     
     this.password = args.password  ? true : false;
     textclip.password = this.password;
-
 }
 
 
 
-
-LzInputTextSprite.prototype = new LzTextSprite(null);
-
-LzInputTextSprite.prototype.defaultattrs.selectable = true;
-LzInputTextSprite.prototype.defaultattrs.enabled = true;
-
-
 /**
   * @access private
   */
-LzInputTextSprite.prototype.construct = function ( parent , args ){
+function construct ( parent , args ){
 }
 
-LzInputTextSprite.prototype.focusable = true;
+var focusable = true;
 
-LzInputTextSprite.prototype.__initTextProperties = function (args) {
+function __initTextProperties (args) {
     var textclip = this.__LZtextclip;
 
     // conditionalize this; set to false for inputtext for back compatibility with lps 2.1
@@ -180,14 +179,14 @@
 /**
   * @access private
   */
-LzInputTextSprite.prototype.gotFocus = function (  ){
+function gotFocus (  ){
     //Debug.write('LzInputTextSprite.__handleOnFocus');
     if ( this.hasFocus ) { return; }
     this.select();
     this.hasFocus = true;
 }
 
-LzInputTextSprite.prototype.select = function (  ){
+function select (  ){
     var sf = targetPath(this.__LZtextclip);
 
     // calling setFocus() seems to bash the scroll value, so save it
@@ -202,7 +201,7 @@
 }
 
 
-LzInputTextSprite.prototype.deselect = function (  ){
+function deselect (  ){
     var sf =  targetPath(this.__LZtextclip);
     if( Selection.getFocus() == sf ) {
         Selection.setFocus( null );
@@ -212,7 +211,7 @@
 /**
   * @access private
   */
-LzInputTextSprite.prototype.gotBlur = function (  ){
+function gotBlur (  ){
     //Debug.write('LzInputTextSprite.__handleOnBlur');
     this.hasFocus = false;
     this.deselect();
@@ -225,7 +224,7 @@
   * 
   * @access private
   */
-TextField.prototype.__gotFocus = function ( oldfocus ){
+function __gotFocus ( oldfocus ){
     // scroll text fields horizontally back to start
     if (this.__lzview) this.__lzview.inputtextevent('onfocus');
 }
@@ -237,14 +236,14 @@
   * into a LFC ontext event. 
   * @access private
   */
-TextField.prototype.__onChanged = function ( ){
+function __onChanged ( ){
     if (this.__lzview) this.__lzview.inputtextevent('onchange', this.text);
 }
 
 /**
   * @access private
   */
-TextField.prototype.__lostFocus = function ( ){
+function __lostFocus ( ){
     if (this['__handlelostFocusdel'] == null) this.__handlelostFocusdel = new LzDelegate(this, "__handlelostFocus");
     LzIdle.callOnIdle(this.__handlelostFocusdel);
 }
@@ -255,7 +254,7 @@
   * cleared, the button doesn't send mouse events.
   * @access private
   */
-TextField.prototype.__handlelostFocus = function ( ){
+function __handlelostFocus ( ){
     //Debug.write('lostfocus', this.__lzview.hasFocus, LzFocus.lastfocus, this, LzFocus.getFocus(), this.__lzview, this.__lzview.inputtextevent);
     if (this.__lzview == LzFocus.getFocus()) {
         LzFocus.clearFocus();
@@ -268,7 +267,7 @@
   * <code>LzDatapath.updateData</code> for more on this.
   * @access protected
   */
-LzInputTextSprite.prototype.updateData = function (){
+function updateData (){
     return this.__LZtextclip.text;
 }
 
@@ -277,7 +276,7 @@
   * Sets whether user can modify input text field
   * @param Boolean enabled: true if the text field can be edited
   */
-LzInputTextSprite.prototype.setEnabled = function (enabled){
+function setEnabled (enabled){
     var mc = this.__LZtextclip;
     this.enabled = enabled;
     if (enabled) {
@@ -290,7 +289,7 @@
 /**
   * Set the html flag on this text view
   */
-LzInputTextSprite.prototype.setHTML = function (htmlp) {
+function setHTML (htmlp) {
     this.__LZtextclip.html = htmlp;
 }
 
@@ -298,7 +297,7 @@
   * setText sets the text of the field to display
   * @param String t: the string to which to set the text
   */
-LzInputTextSprite.prototype.setText = function ( t ){
+function setText ( t ){
     //Debug.write('LzInputTextSprite.setText', this, t);
     if (typeof(t) == 'undefined' || t == null) {
         t = "";
@@ -335,10 +334,12 @@
     //@event ontext: Sent whenever the text in the field changes.
     //this.owner.ontext.sendEvent(t);
 }
-LzInputTextSprite.prototype.getTextfieldHeight = function ( ){
+function getTextfieldHeight ( ){
     return this.__LZtextclip._height
 }
 
-LzTextSprite.prototype.getText = function ( ){
+function getText ( ){
     return this.__LZtextclip.text;
 }
+
+} // End of LzInputTextSprite

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzKeyboardKernel.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzKeyboardKernel.lzs	2007-11-01 20:05:16 UTC (rev 7084)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzKeyboardKernel.lzs	2007-11-01 20:22:09 UTC (rev 7085)
@@ -1,5 +1,5 @@
 /**
-  * LzKeyboardKernel.as
+  * LzKeyboardKernel.lzs
   *
   * @copyright Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
@@ -9,12 +9,14 @@
   */
 
 // Receives keyboard events from the runtime
-var LzKeyboardKernel = { 
-    __downKeysHash: {}
-    ,__keyboardEvent: function ( k, t ){   
+class LzKeyboardKernelClass
+{
+    var __downKeysHash = {};
+
+    function __keyboardEvent ( k, t ){   
         var delta = {};
         var s = String.fromCharCode(k).toLowerCase();
-        var dh = LzKeyboardKernel.__downKeysHash;
+        var dh = this.__downKeysHash;
         var dirty = false;
         if (t == 'onkeyup') {
             if (dh[s] != false) {
@@ -31,12 +33,16 @@
         }    
 
         //Debug.write('downKeysHash', t, k, dh, delta);
-        if (dirty && LzKeyboardKernel.__callback) LzKeyboardKernel.__scope[LzKeyboardKernel.__callback](delta, k, t);
+        if (dirty && this.__callback) this.__scope[this.__callback](delta, k, t);
     }
-    ,__callback: null
-    ,__scope: null
-    ,setCallback: function (scope, funcname) {
+
+    var __callback = null;
+    var __scope = null;
+
+    function setCallback (scope, funcname) {
         this.__scope = scope;
         this.__callback = funcname;
     }    
-}
+} // End of LzKeyboardKernelClass
+
+var LzKeyboardKernel = new LzKeyboardKernelClass ();

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzLoadQueue.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzLoadQueue.lzs	2007-11-01 20:05:16 UTC (rev 7084)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzLoadQueue.lzs	2007-11-01 20:22:09 UTC (rev 7085)
@@ -1,5 +1,5 @@
 /**
-  * LzLoadQueue.as
+  * LzLoadQueue.lzs
   *
   * @copyright Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
@@ -12,60 +12,69 @@
   * The load queue controls the queuing of data, media, and persistent 
   * connection requests at runtime.
   */
-var LzLoadQueue = new Object;
+class LzLoadQueueClass {
 
-LzLoadQueue.maxOpen = 8;
+function initialize () {
+    this.addPriorityFunction( LzLoadQueueClass.defaultPriorityAssignment );
+    this.timeoutDel = new LzDelegate( this , "checkTimeout" );
 
+    if ($debug) {
+        this.__LZinit();
+    }
+}
 
+var maxOpen = 8;
+
+
 if ($debug) {
 /**
   * Set to true to monitor loadQueue state changes when debugging
   * @access private
   */
-LzLoadQueue.__LZmonitorState = false;
+var __LZmonitorState = false;
 }
+
 /**
   * @access private
   */
-LzLoadQueue.openConx = 0;
+var openConx = 0;
 if ($debug) {
     /**
       * Debug setup
       * @access private
       */
-    LzLoadQueue.__LZinit = function () {
-        if (LzLoadQueue.__LZmonitorState) {
-            Debug.monitor(LzLoadQueue, 'openConx');
+function __LZinit () {
+        if (this.__LZmonitorState) {
+            Debug.monitor(this, 'openConx');
         }
     }
-        LzLoadQueue.__LZinit();
 }
 
 /**
   * @access private
   */
-LzLoadQueue.listofqs = [];
+var listofqs = [];
 /**
   * @access private
   */
-LzLoadQueue.loading = [];
+var loading = [];
 /**
   * @access private
   */
-LzLoadQueue.queueSorters = [];
+var queueSorters = [];
 /**
   * @access private
   */
-LzLoadQueue.timeoutDel = new LzDelegate( LzLoadQueue , "checkTimeout" );
+var timeoutDel = null;
 /**
   * @access private
   */
-LzLoadQueue.nextcheck = Infinity;
+var nextcheck = Infinity;
 
 /**
   * @access private
   */
-LzLoadQueue.enqueueRequest = function( loadmc ){
+function enqueueRequest( loadmc ){
     //@field Number maxOpen: The maximum number of open connections the client
     //can maintain. By default, this value is set to 2, since all compatible
     //browsers support at least two connections. Although this value may be set
@@ -92,41 +101,43 @@
   * XML object which is being used to handle the load request. It is *not* bound to 
   * LzLoadQueue!
   */
-LzLoadQueue.XMLOnDataHandler = function (src) {
+static function XMLOnDataHandler (src) {
+  var flashxml = this; // Ugly, but it hides that 'this' isn't what you think
+
     if (src == undefined) {
-        Debug.warn("LzLoadQueue.XMLOnDataHandler load failed from URL %w, no data received.", this.url);
+        Debug.warn("LzLoadQueue.XMLOnDataHandler load failed from URL %w, no data received.", flashxml.url);
         Debug.warn("Failure to load data in serverless apps may be caused by Flash player security policies. Check your data server crossdomain.xml file");
-        this.onload(false);
-        //Debug.write("this.loader.onerror.ready =", this.loader.onerror.ready);
-        if (this.loader.onerror.ready) {
-            this.loader.onerror.sendEvent(null);
+        flashxml.onload(false);
+        //Debug.write("flashxml.loader.onerror.ready =", flashxml.loader.onerror.ready);
+        if (flashxml.loader.onerror.ready) {
+            flashxml.loader.onerror.sendEvent(null);
         }
         // cancel the timeout handler
-        LzLoadQueue.unloadRequest(this);
+        flashxml.unloadRequest(flashxml);
   } else {
         // If we timed out, and this response came in late, ignore it.
-        if (this.timedout) {
+        if (flashxml.timedout) {
             return;
         }
 
-      //Debug.write("LzLoadQueue.XMLOnDataHandler success", this, this.loader);
+      //Debug.write("LzLoadQueue.XMLOnDataHandler success", flashxml, flashxml.loader);
       // Create a queue containing one root node, myself, and convert it and all children to
       // LzDataNodes.
 
       // Stash the raw text on the xml object, in case someone wants it (XMLHTTPRequest, for example)
-      this.loader.rawtext = src;
-      this.parseXML(src);
-      this.onload(true);
+      flashxml.loader.rawtext = src;
+      flashxml.parseXML(src);
+      flashxml.onload(true);
       // Free up the network connection, so it can be reused, while we do the copy task in background.
       // Copy the Flash XML tree into  tree of LFC LzData classes
-      this.loader.queuedCopyFlashXML(this);
+      flashxml.loader.queuedCopyFlashXML(flashxml);
   }
 }
 
 /**
   * @access private
   */
-LzLoadQueue.checkTimeout = function( ){
+function checkTimeout( ){
     // A timed out load may cause new entries on loading, so it is
     // important to make a second pass to compute the next timeout
     var ct = getTimer();
@@ -165,7 +176,7 @@
 /**
   * @access private
   */
-LzLoadQueue.loadFinished = function( loadmc ){
+function loadFinished( loadmc ){
     this.openConx--;
     //Debug.write('LzLoadQueue.loadFinished', this.openConx);
 
@@ -193,7 +204,7 @@
 /**
   * @access private
   */
-LzLoadQueue.unloadRequest = function( loadmc ){
+function unloadRequest( loadmc ){
     var isLoading = false;
     for ( var i = 0; i < this.loading.length; i++ ){
         if ( this.loading[ i ] == loadmc ) {
@@ -208,7 +219,7 @@
 /**
   * @access private
   */
-LzLoadQueue.addToQueue = function( loadmc ){
+function addToQueue( loadmc ){
     var prior;
     for ( var i = this.queueSorters.length - 1; i>=0 ; i-- ){
         prior = this.queueSorters[i]( loadmc , prior );
@@ -224,7 +235,7 @@
 /**
   * @access private
   */
-LzLoadQueue.getNextFromQueue = function( ){
+function getNextFromQueue( ){
     for ( var i = 0; i < this.listofqs.length; i++ ){
         if ( this.listofqs[ i ].length ) {
             return this.listofqs[ i ].shift();
@@ -235,7 +246,7 @@
 /**
   * @access private
   */
-LzLoadQueue.hasMoreInQueue= function( ){
+function hasMoreInQueue( ){
     for ( var i = 0; i < this.listofqs.length; i++ ){
         if ( this.listofqs[ i ].length ) {
             return true;
@@ -247,7 +258,7 @@
 /**
   * @access private
   */
-LzLoadQueue.defaultPriorityAssignment = function( loadmc , prior ){
+static function defaultPriorityAssignment( loadmc , prior ){
     if ( prior != null ) return prior;
     if ( loadmc.lzt == "eval" ) return 2;
     if ( loadmc.lzt == "data" ) return 4;
@@ -264,13 +275,11 @@
   * to manipulate the priority of data requests
   * @access private
   */
-LzLoadQueue.addPriorityFunction = function ( f ){
+function addPriorityFunction ( f ){
     this.queueSorters.push( f );
 }
 
-LzLoadQueue.addPriorityFunction( LzLoadQueue.defaultPriorityAssignment );
 
-
 ////////////////////////////////////////////////////////////////
 /**
   * Makes a serverless or proxied request. If loadobj is a movieclip, it
@@ -283,7 +292,7 @@
   * @access private
   */
 
-LzLoadQueue.makeRequest = function( loadobj ){
+function makeRequest( loadobj ){
     if ( !loadobj.valid ) return;
 
     if (loadobj.loading || loadobj.loaded) {
@@ -331,7 +340,7 @@
 /**
   * @access private
   */
-LzLoadQueue.loadMovieProxiedOrDirect = function (loadobj) {
+function loadMovieProxiedOrDirect (loadobj) {
     var reqstr;
     if ( !loadobj.proxied ) {
         reqstr = LzBrowser.toAbsoluteURL(loadobj.reqobj.url, false);
@@ -419,9 +428,9 @@
 /**
   * @access private
   */
-LzLoadQueue.loadXML = function (loadobj) {
+function loadXML (loadobj) {
     // Set the onData handler to intercept returning data
-    loadobj.onData = LzLoadQueue.XMLOnDataHandler;
+    loadobj.onData = LzLoadQueueClass.XMLOnDataHandler;
     var dopost = (loadobj.reqtype.toUpperCase() == 'POST');
     
     //
@@ -502,5 +511,6 @@
     }
 }
 
+} // End of LzLoadQueueClass
 
-
+var LzLoadQueue = new LzLoadQueueClass ();

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMakeLoadSprite.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMakeLoadSprite.lzs	2007-11-01 20:05:16 UTC (rev 7084)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMakeLoadSprite.lzs	2007-11-01 20:22:09 UTC (rev 7085)
@@ -1,5 +1,5 @@
 /**
-  * LzMakeLoadSprite.as
+  * LzMakeLoadSprite.lzs
   *
   * @copyright Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
@@ -11,17 +11,16 @@
 /**
   * @access private
   */
-function LzMakeLoadSprite(  ){
-    
-}
 
-LzMakeLoadSprite.transformerID = 0;
+class LzMakeLoadSpriteClass {
 
+var transformerID = 0;
 
+
 /**
   * Makes the given view able to load a remote resource
   */
-LzMakeLoadSprite.transform = function ( v , src , cache, headers ){
+function transform ( v , src , cache, headers ){
     //super.transform( v );
 
     for ( var k in this){
@@ -57,7 +56,7 @@
 /**
   * @access private
   */
-LzMakeLoadSprite.doReplaceResource = function (){
+function doReplaceResource (){
     //this gets called when a view applies the load transformer but it
     //already had a resource
 
@@ -71,7 +70,7 @@
 /**
   * @access private
   */
-LzMakeLoadSprite.createLoader = function (){
+function createLoader (){
     this.loader = new LzMediaLoader( this , {} );
     this.updateDel = new LzDelegate( this , "updateAfterLoad" );
     this.updateDel.register( this.loader , "onloaddone" );
@@ -97,7 +96,7 @@
   * "none" , "clientonly" , "serveronly" , "both" -- where both is the default.
   * @param String headers: Headers to send with the request (if any.)
   */
-LzMakeLoadSprite.setSource = function ( newSrc , cache , headers ){
+function setSource ( newSrc , cache , headers ){
     if (this.loader.mc.loading == true) {
         LzLoadQueue.unloadRequest(this.loader.mc);
     }
@@ -127,7 +126,7 @@
   * load-transformed views and those that aren't
   * @access private
   */
-LzMakeLoadSprite.setResource = function ( nresc ){
+function setResource ( nresc ){
     // unload anything currently loading...
     if (this.loader.mc.loading == true) {
         LzLoadQueue.unloadRequest(this.loader.mc);
@@ -155,7 +154,7 @@
   * Updates movieclip properties after the resource has loaded
   * @access private
   */
-LzMakeLoadSprite.updateAfterLoad = function (){
+function updateAfterLoad (){
 
     this.isloaded = true;
     var mc = this.getMCRef();
@@ -204,7 +203,7 @@
   * Unloads the media
   * @access private
   */
-LzMakeLoadSprite.unload = function () {
+function unload () {
     this.loader.unload( this.loader.mc );
 }
 
@@ -212,7 +211,7 @@
   * Get a reference to the control mc
   * @access private
   */
-LzMakeLoadSprite.getMCRef = function () {
+function getMCRef () {
     //return null if not loaded
     if (this.loader.isaudio) return this.loader.mc;
     return this.isloaded ? this.loader.getLoadMC() : null;
@@ -222,7 +221,7 @@
   * Get the number of bytes loaded so far
   * @return: A number that is the maximum offset for this resource
   */
-LzMakeLoadSprite.getLoadBytes = function (){
+function getLoadBytes (){
     return this.getMCRef().getBytesLoaded();
 }
 
@@ -230,14 +229,14 @@
   * Get the total number of bytes for the attached resource
   * @return: A number that is the maximum offset for this resource
   */
-LzMakeLoadSprite.getMaxBytes = function (){
+function getMaxBytes (){
     return this.getMCRef().getBytesTotal();
 }
 
 /**
   * @access private
   */
-LzMakeLoadSprite.__LZsendError = function ( e ){
+function __LZsendError ( e ){
     this.resourcewidth = 0;
     this.resourceheight = 0;
     if (this.owner) this.owner.resourceloaderror( e )
@@ -246,7 +245,7 @@
 /**
   * @access private
   */
-LzMakeLoadSprite.__LZsendTimeout = function ( e ){
+function __LZsendTimeout ( e ){
     this.resourcewidth = 0;
     this.resourceheight = 0;
     if (this.owner) this.owner.resourceloadtimeout( e )
@@ -255,7 +254,7 @@
 /**
   * @access private
   */
-LzMakeLoadSprite.destroy = function (recur) {
+function destroy (recur) {
     if ('updateDel' in this)
          this.updateDel.unregisterAll();
     if ('errorDel' in this)
@@ -268,3 +267,7 @@
     // call shadowed destroy()
     this.___destroy( recur ); 
 }
+
+} // End of LzMakeLoadSpriteClass
+
+var LzMakeLoadSprite  = new LzMakeLoadSpriteClass;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMediaLoader.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMediaLoader.lzs	2007-11-01 20:05:16 UTC (rev 7084)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMediaLoader.lzs	2007-11-01 20:22:09 UTC (rev 7085)
@@ -70,7 +70,7 @@
         this.mc = m;
     } else if (this.isaudio == true && this._oldmc == null) {
         this._oldmc = this.mc;
-        this.mc = new SoundMC(this.mc);
+        this.mc = new LzSoundMC(this.mc);
         this.initializeRequestObj(this.mc);
         if ($debug) {
             LzLoader.debugLoadObj(this.mc, 'MediaLoadObj');

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMouseKernel.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMouseKernel.lzs	2007-11-01 20:05:16 UTC (rev 7084)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMouseKernel.lzs	2007-11-01 20:22:09 UTC (rev 7085)
@@ -1,5 +1,5 @@
 /**
-  * LzMouseKernel.as
+  * LzMouseKernel.lzs
   *
   * @copyright Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
@@ -10,19 +10,22 @@
 
 // Receives mouse events from the runtime
 // Sent from org/openlaszlo/compiler/SWFFile.java
-var LzMouseKernel = {
-    __mouseEvent: function(eventname) {
-        if (LzMouseKernel.__callback) LzMouseKernel.__scope[LzMouseKernel.__callback](eventname);
+class LzMouseKernelClass {
+
+    function __mouseEvent (eventname) {
+        if (this.__callback) this.__scope[this.__callback](eventname);
         //Debug.write('LzMouseKernel event', eventname);
     }
-    ,__callback: null
-    ,__scope: null
-    ,__listeneradded: false 
-    ,setCallback: function (scope, funcname) {
+
+    var __callback =  null;
+    var __scope = null;
+    var __listeneradded = false ;
+
+    function setCallback (scope, funcname) {
         this.__scope = scope;
         this.__callback = funcname;
         if (this.__listeneradded == false) {
-            Mouse.addListener(LzMouseKernel.__mouselistener);
+            Mouse.addListener(LzMouseKernelClass.__mouselistener);
             this.__listeneradded = true;
         }
     }    
@@ -31,7 +34,7 @@
     * Shows or hides the hand cursor for all clickable views.
     * @param Boolean show: true shows the hand cursor for buttons, false hides it
     */
-    ,showHandCursor: function (show) {
+    function showHandCursor (show) {
         Button.prototype.useHandCursor = show;
     }
 
@@ -39,8 +42,8 @@
     * Sets the cursor to a resource
     * @param String what: The resource to use as the cursor. 
     */
-    ,setCursorGlobal: function ( what ){
-        if ( LzMouseKernel.__amLocked ) { return; }
+    function setCursorGlobal ( what ){
+        if ( this.__amLocked ) { return; }
         _root.attachMovie (what , "cCursor" , 5555 );
         _root.cCursor._x = _root._xmouse;
         _root.cCursor._y = _root._ymouse;
@@ -54,8 +57,8 @@
     * 
     * @access private
     */
-    ,restoreCursor: function ( ){
-        if ( LzMouseKernel.__amLocked ) { return; }
+    function restoreCursor ( ){
+        if ( this.__amLocked ) { return; }
         // SWF-specific
         _root.cCursor.stopDrag();
         _root.cCursor.removeMovieClip (  );
@@ -66,22 +69,25 @@
     * Prevents the cursor from being changed until unlock is called.
     * 
     */
-    ,lock: function (){
-        LzMouseKernel.__amLocked = true;
+    function lock (){
+        this.__amLocked = true;
     }
 
     /**
     * Restores the default cursor.
     * 
     */
-    ,unlock: function (){
-        LzMouseKernel.__amLocked = false;
-        LzMouseKernel.restoreCursor(); 
+    function unlock (){
+        this.__amLocked = false;
+        this.restoreCursor(); 
     }
-    ,__mouselistener: {
-        onMouseMove: function () { 
+
+    static var __mouselistener = {
+        onMouseMove: function () {
             LzGlobalMouse.__mouseEvent('onmousemove');
         }
     }
-    
-}
+
+} // End of LzMouseKernelClass
+
+var LzMouseKernel = new LzMouseKernelClass;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzRequires.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzRequires.lzs	2007-11-01 20:05:16 UTC (rev 7084)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzRequires.lzs	2007-11-01 20:22:09 UTC (rev 7085)
@@ -1,5 +1,5 @@
 /**
-  * LzRequires.as
+  * LzRequires.lzs
   *
   * @copyright Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
@@ -10,6 +10,7 @@
 
 // Default to opacity being on...
 $modules.runtime.provides['opacity'] = true; 
+
 /* X_LZ_COPYRIGHT_BEGIN ***************************************************
 * Copyright 2001-2006 Laszlo Systems, Inc.  All Rights Reserved.          *
 * Use is subject to license terms.                                        *
@@ -18,5 +19,3 @@
 * Date: 7-28-2006                                                          *
 * X_LZ_COPYRIGHT_END ******************************************************/
 
-// Default to opacity being on...
-$modules.runtime.provides['opacity'] = true; 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzScreenKernel.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzScreenKernel.lzs	2007-11-01 20:05:16 UTC (rev 7084)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzScreenKernel.lzs	2007-11-01 20:22:09 UTC (rev 7085)
@@ -14,29 +14,39 @@
 
 // Receives mouse events from the runtime
 // Sent from org/openlaszlo/compiler/SWFFile.java
-var LzScreenKernel = {
-    width: null
-    ,height: null
-    ,__resizeEvent: function() {
-        LzScreenKernel.width = Stage.width;
-        LzScreenKernel.height = Stage.height;
+class LzScreenKernelClass {
+    var width  = null;
+    var height = null;
 
-        if (LzScreenKernel.__callback) LzScreenKernel.__scope[LzScreenKernel.__callback]({width: LzScreenKernel.width, height: LzScreenKernel.height});
-        //Debug.write('LzScreenKernel event', {width: LzScreenKernel.width, height: LzScreenKernel.height});
+    function __resizeEvent() {
+        this.width  = Stage.width;
+        this.height = Stage.height;
+
+        if (this.__callback) this.__scope[this.__callback]({width: this.width, height: this.height});
+        //Debug.write('LzScreenKernel event', {width: this.width, height: this.height});
     }
-    ,__init: function() {
-        var listener = {
-            onResize: LzScreenKernel.__resizeEvent
+
+    static var __screenlistener = {
+        onResize: function () {
+            LzScreenKernel.__resizeEvent();
         }
-        Stage.addListener(listener);
     }
-    ,__callback: null
-    ,__scope: null
-    ,setCallback: function (scope, funcname) {
+
+    function __init() {
+        Stage.addListener(LzScreenKernelClass.__screenlistener);
+    }
+
+    var __callback = null;
+    var __scope = null;
+
+    function setCallback (scope, funcname) {
         //Debug.write('setCallback', scope, funcname);
         this.__scope = scope;
         this.__callback = funcname;
         this.__init();
-        LzScreenKernel.__resizeEvent();
+        this.__resizeEvent();
     }    
-}
+} // End of LzScreenKernelClass
+
+
+var LzScreenKernel = new LzScreenKernelClass;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSoundMC.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSoundMC.lzs	2007-11-01 20:05:16 UTC (rev 7084)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSoundMC.lzs	2007-11-01 20:22:09 UTC (rev 7085)
@@ -14,24 +14,27 @@
   * 
   * @access private
   */
-var SoundMC = function(mc) {
+class LzSoundMC {
+
+function initialize (mc) {
     this.init(mc);
     this._playdel = new LzDelegate( this , "testPlay" );
 }
 
-SoundMC.prototype = new MovieClip();
+//PBR TODO
+//SoundMC.prototype = new MovieClip();
 
-SoundMC.prototype._currentframe = 0;
-SoundMC.prototype._framesloaded = 0;
-SoundMC.prototype._totalframes = 0;
-SoundMC.prototype._fps = 30;
-SoundMC.prototype.isaudio = true;
-SoundMC.prototype.loadstate = 0;
+var _currentframe = 0;
+var _framesloaded = 0;
+var _totalframes = 0;
+var _fps = 30;
+var isaudio = true;
+var loadstate = 0;
 
 /**
   * @access private
   */
-SoundMC.prototype.play = function() {
+function play() {
     var t = this._currentframe / this._fps;
     if (t < 0) t = 0;
     this._sound.stop();
@@ -44,7 +47,7 @@
 /**
   * @access private
   */
-SoundMC.prototype.gotoAndPlay = function(f) {
+function gotoAndPlay(f) {
     this._currentframe = f;
     this.play();
 }
@@ -53,7 +56,7 @@
 /**
   * @access private
   */
-SoundMC.prototype.stop = function() {
+function stop() {
     this._sound.stop();
     this._playdel.unregisterAll();
     this.testPlay();
@@ -62,7 +65,7 @@
 /**
   * @access private
   */
-SoundMC.prototype.gotoAndStop = function(f) {
+function gotoAndStop(f) {
     this.stop();
     this._currentframe = f;
 }
@@ -71,7 +74,7 @@
 /**
   * @access private
   */
-SoundMC.prototype.loadMovie = function( reqstr ) {
+function loadMovie( reqstr ) {
     //Debug.warn('SoundMC loading mp3 %w', reqstr);
     this.init();
     this._sound.loadSound(reqstr, true);
@@ -85,7 +88,7 @@
 /**
   * @access private
   */
-SoundMC.prototype.getBytesLoaded = function( ) {
+function getBytesLoaded( ) {
     //Debug.warn('getBytesLoaded %w', this._sound.getBytesLoaded());
     this.testPlay();
     return this._sound.getBytesLoaded();
@@ -95,7 +98,7 @@
 /**
   * @access private
   */
-SoundMC.prototype.getBytesTotal = function( ) {
+function getBytesTotal( ) {
     //Debug.warn('getBytesTotal %w', this._sound.getBytesTotal());
     this.testPlay();
     return this._sound.getBytesTotal();
@@ -104,7 +107,7 @@
 /**
   * @access private
   */
-SoundMC.prototype.unload = function( ) {
+function unload( ) {
     //Debug.warn('unload %w', this._sound.getBytesTotal());
     this.stop();
     delete this._sound;
@@ -114,7 +117,7 @@
 /**
   * @access private
   */
-SoundMC.prototype.testPlay = function() {
+function testPlay() {
     this._totalframes = Math.floor(this._sound.duration * .001 * this._fps);
     this._currentframe = Math.floor(this._sound.position * .001 * this._fps);
     this._framesloaded = Math.floor((this._sound.getBytesLoaded() / this._sound.getBytesTotal()) * this._totalframes)
@@ -124,7 +127,7 @@
 /**
   * @access private
   */
-SoundMC.prototype.setPan = function(p) {
+function setPan(p) {
     //Debug.write('setPan', p);
     this._sound.setPan(p);
 }
@@ -132,7 +135,7 @@
 /**
   * @access private
   */
-SoundMC.prototype.setVolume = function(v) {
+function setVolume(v) {
     //Debug.write('setVolume', v);
     this._sound.setVolume(v);
 }
@@ -140,21 +143,21 @@
 /**
   * @access private
   */
-SoundMC.prototype.getPan = function(p) {
+function getPan(p) {
     return this._sound.getPan(p);
 }
 
 /**
   * @access private
   */
-SoundMC.prototype.getVolume = function(v) {
+function getVolume(v) {
     return this._sound.getVolume(v);
 }
 
 /**
   * @access private
   */
-SoundMC.prototype.loadDone = function(success) {
+function loadDone(success) {
     if (success != true) {
         if ($debug) {
             Debug.warn("failed to load %w", this.reqobj.url);
@@ -171,7 +174,7 @@
 /**
   * @access private
   */
-SoundMC.prototype.init = function(mc) {
+function init(mc) {
     this._sound.stop();
     delete this._sound;
     if (mc != null) {
@@ -182,11 +185,11 @@
     this._sound.checkPolicyFile = true;
     this._sound.mc = this;
 /** @access private */
-    this._sound.onLoad = function(success) {
+function onLoad(success) {
         this.mc.loadDone(success);
     }
 /** @access private */
-    this._sound.onSoundDone = function() {
+function onSoundDone() {
         this.mc.testPlay();
     }
 
@@ -200,21 +203,21 @@
 /**
   * @access private
   */
-SoundMC.prototype.getTotalTime = function() {
+function getTotalTime() {
     return this._sound.duration * .001;
 }
 
 /**
   * @access private
   */
-SoundMC.prototype.getCurrentTime = function() {
+function getCurrentTime() {
     return this._sound.position * .001;
 }
 
 /**
   * @access private
   */
-SoundMC.prototype.seek = function(secs, playing) {
+function seek(secs, playing) {
     //Debug.write('seek', secs, playing);
     this._sound.stop();
     this._sound.start(this.getCurrentTime() + secs);
@@ -224,7 +227,9 @@
 /**
   * @access private
   */
-SoundMC.prototype.getID3 = function() {
+function getID3() {
     //Debug.write('getID3', this._sound);
     return this._sound.id3;
 }
+
+} // End of LzSoundMC

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.lzs	2007-11-01 20:05:16 UTC (rev 7084)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.lzs	2007-11-01 20:22:09 UTC (rev 7085)
@@ -1,5 +1,5 @@
 /**
-  * LzSprite.as
+  * LzSprite.lzs
   *
   * @copyright Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
@@ -8,7 +8,10 @@
   * @subtopic AS2
   */
 
-var LzSprite = function(newowner, isroot, args) {
+class LzSprite {
+
+function initialize(newowner, isroot, args) {
+    super.initialize.apply(this, arguments);
     if (newowner == null) return this;
     this.owner = newowner;
     //Debug.write('---> New sprite', newowner, newowner.immediateparent, newowner.immediateparent.sprite);
@@ -32,7 +35,7 @@
     }
 }
 
-LzSprite.prototype.capabilities = {
+var capabilities = {
     rotation: true
     // Avoid scaling canvas to percentage values - SWF already scales the viewport size, so take window size literally to avoid scaling twice
     ,scalecanvastopercentage: false
@@ -49,7 +52,7 @@
 /**
   * @param Boolean accessible
   */
-LzSprite.prototype.setAccessible = function(accessible) {
+function setAccessible(accessible) {
     _root._focusrect = accessible == true ? true : 0;
 }
 
@@ -57,7 +60,7 @@
   * Activate/inactivate children for accessibility
   * @param Boolean s: If true, activate the current view and all of its children
   */
-LzSprite.prototype.setAAActive = function( s, mc ){
+function setAAActive( s, mc ){
     if (mc == null || mc == 'aaactive') mc = this.getMCRef();
     //Debug.write('setAAActive ', s + ' ' + mc);
     if (mc._accProps == null) mc._accProps = {};
@@ -77,7 +80,7 @@
   * Set accessibility name
   * @param string s: Sets the accessibility name for this view
   */
-LzBrowser.prototype.setAAName = function( s, mc ){
+function setAAName( s, mc ){
     if (mc == null || mc == 'aaname') mc = this.getMCRef();
     //Debug.write('setAAName ', s + ' ' + mc);
     if (mc._accProps == null) mc._accProps = {};
@@ -94,7 +97,7 @@
   * Set accessibility description
   * @param string s: Sets the accessibility name for this view
   */
-LzBrowser.prototype.setAADescription = function( s, mc ){
+function setAADescription( s, mc ){
     if (mc == null || mc == 'aadescription') mc = this.getMCRef();
     //Debug.write('setAADescription ', s + ' ' + mc);
     if (mc._accProps == null) mc._accProps = {};
@@ -111,7 +114,7 @@
   * Set accessibility tab order
   * @param number s: The tab order index for this view.  Must be a unique number.
   */
-LzBrowser.prototype.setAATabIndex = function( s, mc ){
+function setAATabIndex( s, mc ){
     if (mc == null || mc == 'aatabindex') mc = this.getMCRef();
     //Debug.write('setAATabIndex ', mc);
     mc.tabIndex = s;
@@ -123,7 +126,7 @@
   * @param string s: If true, this view is made silent to the screen reader.  
   * If false, it is active to the screen reader.
   */
-LzBrowser.prototype.setAASilent = function( s, mc ){
+function setAASilent( s, mc ){
     if (mc == null || mc == 'aasilent') mc = this.getMCRef();
     //Debug.write('setAASilent ', s + ' ' + mc);
     if (mc._accProps == null) mc._accProps = {};
@@ -139,75 +142,75 @@
 // FIRST_SUBVIEW_DEPTH: This is so that default objects (such as
 // buttons, and in swf6 masks) can be attached above the view's
 // subviews.  11 is an arbitrary number chosen by Adam
-LzSprite.prototype.FIRST_SUBVIEW_DEPTH = 11;
-LzSprite.prototype.BUTTON_DEPTH = 2;
-LzSprite.prototype.MASK_DEPTH = 3;
+static var FIRST_SUBVIEW_DEPTH = 11;
+static var BUTTON_DEPTH = 2;
+static var MASK_DEPTH = 3;
 // There can be up to two clips for each subview: background,
 // foreground.  We have to leave room for them in the depth stack
-LzSprite.prototype.CLIPS_PER_SUBVIEW = 2;
-LzSprite.prototype.BACKGROUND_DEPTH_OFFSET = -1;
-LzSprite.prototype.FOREGROUND_DEPTH_OFFSET = 0;
+static var CLIPS_PER_SUBVIEW = 2;
+static var BACKGROUND_DEPTH_OFFSET = -1;
+static var FOREGROUND_DEPTH_OFFSET = 0;
 
 
 //@field Boolean focusable: If true, this view will participate in keyboard
 // focus and will receive focus events and keyboard events
 // when it has the focus. (see LzFocus for more details)
-LzSprite.prototype.focusable = false;
+var focusable = false;
 
-LzSprite.prototype.visible =   true;
+var visible =   true;
 
-LzSprite.prototype.opacity =   1;
-LzSprite.prototype.bgcolor =   null;
-LzSprite.prototype.x =   0;
-LzSprite.prototype.y =   0;
-LzSprite.prototype.rotation =   0;
-LzSprite.prototype.width =   0;
-LzSprite.prototype.height =   0;
-LzSprite.prototype.__LZclickregion =  "LzMouseEvents";
+var opacity =   1;
+var bgcolor =   null;
+var x =   0;
+var y =   0;
+var rotation =   0;
+var width =   0;
+var height =   0;
+var __LZclickregion =  "LzMouseEvents";
 
-LzSprite.prototype._xscale =   1;
-LzSprite.prototype._yscale =   1;
+var _xscale =   1;
+var _yscale =   1;
 
 //@field Number totalframes: The total number of frames for this view's
 //resource.
-LzSprite.prototype.totalframes =   0;
-LzSprite.prototype.frame =   0;
+var totalframes =   0;
+var frame =   0;
 
 //deprecated
-LzSprite.prototype.loadperc =   0;
+var loadperc =   0;
 //@field Number framesloadratio: For views whose resource is loaded at runtime,
 //the ratio of the loaded frames to the total frames. This is a number between
 //zero and 1.
-LzSprite.prototype.framesloadratio =   0;
+var framesloadratio =   0;
 //@field Number loadratio: For views whose resource is loaded at runtime,
 //ratio of the loaded bytes to the total bytes. This is a number between 
 //zero and 1.
-LzSprite.prototype.loadratio =   0;
+var loadratio =   0;
 
 //@field Boolean hassetwidth: If true, then setWidth() has been called on this
 //view, and the view will not be sized to its contents. 
-LzSprite.prototype.hassetheight = false;
+var hassetheight = false;
 //@field Boolean hassetheight: If true, then setHeight() has been called on this
 //view, and the view will not be sized to its contents. 
-LzSprite.prototype.hassetwidth = false;
+var hassetwidth = false;
 
 //need quick check for viewness
-LzSprite.prototype.__LZisView = true;
+var __LZisView = true;
 
 // maximum number of frames to wait to load an mp3 audio
-LzSprite.prototype.__lzskipplaychecklimitmax = 20;
+var __lzskipplaychecklimitmax = 20;
 
 
 //@field Boolean _setrescwidth: If true, the view does not set its
 //resource to the width given in a call to
 //<method>setAttribute</method>. By default, views do not scale their
 //resource
-LzSprite.prototype._setrescwidth = false;
+var _setrescwidth = false;
 //@field Boolean _setrescheight: If true, the view does not set its
 //resource to the height given in a call to
 //<method>setAttribute</method>. By default, views do not scale their
 //resource
-LzSprite.prototype._setrescheight = false;
+var _setrescheight = false;
 
 /**
   * Called right before the view is shown. See <method
@@ -215,7 +218,7 @@
   * 
   * @access protected
   */
-LzSprite.prototype.init = function( ) {
+function init( ) {
     this.__LZmovieClipRef._visible = this.visible;
     this.__LZbgRef._visible = this.visible;
 }
@@ -228,7 +231,7 @@
   * 
   * @param String resourceName: a string naming the id of the resource to attach
   */
-LzSprite.prototype.setResource = function ( resourceName ) {
+function setResource ( resourceName ) {
     /*
     if (LzLoader.__LZmonitorState) {
         Debug.monitor(this, 'isloaded');
@@ -266,7 +269,7 @@
   * @access private
   * May be overridden by loader
   */
-LzSprite.prototype.doReplaceResource = function(resourceName) {
+function doReplaceResource(resourceName) {
     if ( this.owner.subviews.length ){
         if ( $debug ){
             Debug.error( "%w cannot set resource to %w because it already has subviews", this, resourceName );
@@ -295,7 +298,7 @@
   * 
   * @access private
   */
-LzSprite.prototype.makeContainerResource = function ( ) {
+function makeContainerResource ( ) {
     //Debug.write('LzSprite.makeContainerResource');
     return this.setResource( "empty" );
 }
@@ -309,7 +312,7 @@
   * 
   * @param String mc: a reference to the flash movie clip that the view controls
   */
-LzSprite.prototype.setMovieClip = function ( mc , mcID) {
+function setMovieClip ( mc , mcID) {
     this.__LZmovieClipRef = mc;
     //mc.tabIndex = tabindexcounter++;
     if (this.masked) {
@@ -367,7 +370,7 @@
   * 
   * @return: a reference to the newly attached resource
   */
-LzSprite.prototype.attachResourceToChildView = function ( resourceName,
+function attachResourceToChildView ( resourceName,
                                                         childsprite, instName ){
     if (this.__LZmovieClipRef == null){
         this.makeContainerResource( );
@@ -385,10 +388,10 @@
 
     //mc.tabIndex = tabindexcounter++;
 
-    //Debug.write('Sprite.depth', this.FIRST_SUBVIEW_DEPTH, childsprite.owner.sprite.__LZdepth, this.CLIPS_PER_SUBVIEW, this.FOREGROUND_DEPTH_OFFSET)
-    var depth = this.FIRST_SUBVIEW_DEPTH + 
-      (childsprite.__LZdepth * this.CLIPS_PER_SUBVIEW) + 
-      this.FOREGROUND_DEPTH_OFFSET;
+    //Debug.write('Sprite.depth', LzSprite.FIRST_SUBVIEW_DEPTH, childsprite.owner.sprite.__LZdepth, LzSprite.CLIPS_PER_SUBVIEW, LzSprite.FOREGROUND_DEPTH_OFFSET)
+    var depth = LzSprite.FIRST_SUBVIEW_DEPTH + 
+      (childsprite.__LZdepth * LzSprite.CLIPS_PER_SUBVIEW) + 
+      LzSprite.FOREGROUND_DEPTH_OFFSET;
     
     var newmc = this.__LZmovieClipRef.attachMovie( resourceName, instName, depth);
 
@@ -404,7 +407,7 @@
 /**
   * @access private
   */
-LzSprite.prototype.attachBackgroundToChild = function ( childsprite ){
+function attachBackgroundToChild ( childsprite ){
 
     if (this.__LZmovieClipRef == null){
         this.makeContainerResource( );
@@ -416,9 +419,9 @@
         this.__LZsubUniqueNum++;
     }
 
-    var depth = this.FIRST_SUBVIEW_DEPTH +
-      (childsprite.__LZdepth * this.CLIPS_PER_SUBVIEW) +
-      this.BACKGROUND_DEPTH_OFFSET;
+    var depth = LzSprite.FIRST_SUBVIEW_DEPTH +
+      (childsprite.__LZdepth * LzSprite.CLIPS_PER_SUBVIEW) +
+      LzSprite.BACKGROUND_DEPTH_OFFSET;
 
     var mc = this.__LZmovieClipRef.attachMovie( "swatch", "$b" + this.__LZsubUniqueNum, depth );
     childsprite.__LZbgRef = mc;
@@ -440,7 +443,7 @@
   * Gives the view a bgcolor that is the same size as the view.
   * @param Integer bgc: The 0-FFFFFF number to be used for the new background color.
   */
-LzSprite.prototype.setBGColor = function ( bgc ) {
+function setBGColor ( bgc ) {
     //@field Number bgcolor: The color of background of this view. Null if there is
     //no bgcolor. A number from 0 - 0xFFFFFF.
     if (bgc != null) {
@@ -475,7 +478,7 @@
 /**
   * @access private
   */
-LzSprite.prototype.removeBG = function () {
+function removeBG () {
     if (this.__LZisBackgrounded ) {
         this.__LZbgRef.removeMovieClip();
         this.__LZbgRef = null;
@@ -487,7 +490,7 @@
 /**
   * @access private
   */
-LzSprite.prototype.applyBG = function () {
+function applyBG () {
     if (! this.__LZisBackgrounded ) {
         this.owner.immediateparent.sprite.attachBackgroundToChild( this );
         this.__LZisBackgrounded = true;
@@ -506,7 +509,7 @@
   * Sets the <attribute>x</attribute> position of the view to the given value.
   * @param Number v: The new value for <attribute>x</attribute>.
   */
-LzSprite.prototype.setX = function ( v ){
+function setX ( v ){
     //Debug.warn('Sprite.setX');
     //@field Number x: The x position of the view
     this.x = v;
@@ -519,7 +522,7 @@
   * Sets the <attribute>y</attribute> position for the view to the given value.
   * @param Number v: The new value for <attribute>y</attribute>.
   */
-LzSprite.prototype.setY = function ( v ){
+function setY ( v ){
     //@field Number y: The y position for the view
     this.y = v;
     this.__LZmovieClipRef._y = v;
@@ -535,7 +538,7 @@
   * 
   * @param Boolean amVisible: boolean for visibility of view
   */
-LzSprite.prototype.setVisible = function( amVisible ) {
+function setVisible( amVisible ) {
     this.visible = amVisible;
     this.__LZmovieClipRef._visible = amVisible;
     this.__LZbgRef._visible = amVisible;
@@ -549,7 +552,7 @@
   * the size of its contents.
   * @param Number v: The new value for the width
   */
-LzSprite.prototype.setWidth = function ( v ){
+function setWidth ( v ){
     //if (this.owner.id == 'photoscontainer') Debug.write('LzSprite.setWidth', this, v, this.hassetwidth);
 
     if ( v == null ){
@@ -593,7 +596,7 @@
   * of the view will be the size measured of its contents.
   * @param Number v: The new value for the height
   */
-LzSprite.prototype.setHeight = function ( v ){
+function setHeight ( v ){
     if ( v == null ){
         this.hassetheight = false;
         if ( this._setrescheight ){
@@ -628,7 +631,7 @@
         this.__LZbgRef._yscale = v;
 }
 
-LzSprite.prototype.setOpacity = function ( v ){
+function setOpacity ( v ){
     //@field Number opacity: The opacity value for the view,
     //a number between 0 and 1
     this.opacity = v;
@@ -655,7 +658,7 @@
   * has loaded, this method is provided to force the view to update its size, 
   * taking into account the current size of its resource. 
   */
-LzSprite.prototype.updateResourceSize = function ( ){
+function updateResourceSize ( ){
     this.__LZmovieClipRef._xscale = 100;
     this.__LZmovieClipRef._yscale = 100;
     this.resourcewidth = this.__LZmovieClipRef._width;
@@ -674,7 +677,7 @@
   * @param String xory: If this is defined, set the resource to stretch only in the given axis ("width" or
   * "height").  Otherwise set the resource to stretch in both axes.
   */
-LzSprite.prototype.stretchResource = function ( xory ){
+function stretchResource ( xory ){
     //TODO: Remove null, x, y options from here when components are moved
     if ( xory == null || xory == "x" || xory=="width" || xory=="both" ){
         this._setrescwidth = true;
@@ -688,7 +691,7 @@
 /**
   * This function sets or removes the clip/mask
   */
-LzSprite.prototype.setClip = function (c){
+function setClip (c){
     if (c) {
         this.makeMasked();
     } else {
@@ -700,7 +703,7 @@
   * This function applies the MakeMasked view transformer.
   * @access private
   */
-LzSprite.prototype.makeMasked = function ( ){
+function makeMasked ( ){
     this.masked = true;
     this.mask = this;
 }
@@ -708,7 +711,7 @@
 /**
   * @access private
   */
-LzSprite.prototype.removeMask = function () {
+function removeMask () {
     //Debug.write(this, '.removeMask');
     this.__LZmovieClipRef.setMask(null);
     var mask = this.__LZmaskClip;
@@ -721,7 +724,7 @@
 /**
   * @access private
   */
-LzSprite.prototype.applyMask = function (s) {
+function applyMask (s) {
     if ( this.__LZmovieClipRef == null ){
         Debug.warn("Cannot apply mask before resource has been attached in",
                     this);
@@ -729,9 +732,9 @@
     }
     var mc = this.__LZmovieClipRef;
     if (s) {
-        var mask = mc.createEmptyMovieClip("$mcM", this.MASK_DEPTH);
+        var mask = mc.createEmptyMovieClip("$mcM", LzSprite.MASK_DEPTH);
     } else {
-        var mask = mc.attachMovie( "swatch", "$mcM", this.MASK_DEPTH);
+        var mask = mc.attachMovie( "swatch", "$mcM", LzSprite.MASK_DEPTH);
     }
     //mask.tabIndex = tabindexcounter++;
     // The mask is attached as a child of the view clip, so we just
@@ -752,7 +755,7 @@
 /**
   * @access private
   * */
-LzSprite.prototype.__LZsetClickRegion = function ( cr ){
+function __LZsetClickRegion ( cr ){
     this.__LZclickregion = cr;
 }
 
@@ -761,7 +764,7 @@
   * Makes a view clickable or not clickable.
   * @param amclickable: Boolean indicating the view's clickability
   */
-LzSprite.prototype.setClickable = function ( amclickable ){
+function setClickable ( amclickable ){
     //@event onmousedown: Sent when the mouse button goes down over a view
     //onmousedown is only sent by views which are clickable
     //@event onmouseup:Sent when the mouse button comes up after going down over
@@ -796,7 +799,7 @@
     }
 
     if ( amclickable != false && !this.__LZbuttonRef){
-        var mc = this.__LZmovieClipRef.attachMovie( this.__LZclickregion, "$mcB", this.BUTTON_DEPTH );
+        var mc = this.__LZmovieClipRef.attachMovie( this.__LZclickregion, "$mcB", LzSprite.BUTTON_DEPTH );
         mc._height = 0;
         mc._width = 0;
 
@@ -824,7 +827,7 @@
 /**
   * @access private
   */
-LzSprite.prototype._setButtonSize = function ( axis , bsize ){
+function _setButtonSize ( axis , bsize ){
     var sc ="_" + ( axis =="width" ? "x" : "y" ) + "scale" ;
     if ( this[ "_setresc" + axis ] && this[ 'hasset' + axis ]){
         var resdim = this.__LZmovieClipRef[ "_" + axis ];
@@ -845,7 +848,7 @@
   * <code>none</code> , <code>clientonly</code> , <code>serveronly</code> , <code>both</code> (the default).
   * @param String headers: Headers to send with the request, if any.
   */
-LzSprite.prototype.setSource = function ( source , cache, headers){
+function setSource ( source , cache, headers){
     //@event onerror: Sent when there is an error loading the view's resource.
     //The argument sent with the event is the error string sent by the server.
     //@event ontimeout: Sent when the request to load media for the view times
@@ -860,14 +863,14 @@
   * @access protected
   * @param LzSprite s: The new sprite
   */
-LzSprite.prototype.addChildSprite = function ( s ){
+function addChildSprite ( s ){
     if ( s.addedToParent ) return;
     if ( ! this.__LZmovieClipRef ) { this.makeContainerResource() };
 
     s.addedToParent = true;
 }
 
-LzSprite.prototype.predestroy = function(){
+function predestroy(){
     this.bringToFront();
 }
 
@@ -875,7 +878,7 @@
   * Sets the <attribute>rotation</attribute> for the view to the given value.
   * @param Number v: The new value for <attribute>rotation</attribute>.
   */
-LzSprite.prototype.setRotation = function ( v ){
+function setRotation ( v ){
     //@field Number rotation: The rotation value for the view (in degrees)
     //Value may be less than zero or greater than 360.
     this.rotation = v;
@@ -884,11 +887,11 @@
     return true;
 }
 
-LzSprite.prototype.setFontName = function ( val ,prop ){
+function setFontName ( val ,prop ){
     this.fontname = val;
 }
 
-LzSprite.prototype.predestroy = function(){
+function predestroy(){
     this.bringToFront();
 }
 
@@ -897,7 +900,7 @@
   * @access private
   * 
   */
-LzSprite.prototype.destroy = function(recursive){
+function destroy(recursive){
     if (recursive) {
         if (this.owner.subviews) {
             for (var i = 0; i < this.owner.subviews.length; i++) {
@@ -920,7 +923,7 @@
 /**
   * @access private
   */
-LzSprite.prototype.__LZFinishDestroyOnIdle = function (){
+function __LZFinishDestroyOnIdle (){
     if ( this.__LZmovieClipRef != null ){
         //Debug.write( "remove movieclip" );
         removeMovieClip( this.__LZmovieClipRef );
@@ -938,7 +941,7 @@
   * 
   * @return Object: The x and y position of the mouse relative to this sprite.
   */
-LzSprite.prototype.getMouse = function() {
+function getMouse() {
     if ( ! this.__LZmovieClipRef ) { this.makeContainerResource() };
     return {x: Math.round(this.__LZmovieClipRef._xmouse), y: Math.round(this.__LZmovieClipRef._ymouse)}
 }
@@ -947,7 +950,7 @@
   * Get a reference to the control mc - may be overridden by loader
   * @access private
   */
-LzSprite.prototype.getMCRef = function () {
+function getMCRef () {
     if (this.__LZmovieClipRef == null){
         this.makeContainerResource( );
     }
@@ -961,7 +964,7 @@
   * <method>setColorTransform</method> to tint a view.
   * @param Integer c: A color in rgb format; for example, 0xff0000 is red.
   */
-LzSprite.prototype.setColor = function ( c ){
+function setColor ( c ){
     this.fgcolor = c;
     this.getColorObj().setRGB( c );
 }
@@ -971,7 +974,7 @@
   * as set with setColor().
   * Returns A color in rgb format; for example, 0xff0000 is red.
   */
-LzSprite.prototype.getColor = function (){
+function getColor (){
     return this.getColorObj().getRGB();
 }
 
@@ -990,7 +993,7 @@
   * o.aa: percentage overall alpha (-100 to 100);
   * o.ab: overall offset (-255 to 255);
   */
-LzSprite.prototype.setColorTransform = function ( o ){
+function setColorTransform ( o ){
     this.getColorObj().setTransform( o );
 }
 
@@ -1008,14 +1011,14 @@
   * o.aa: percentage overall alpha (-100 to 100);
   * o.ab: overall offset (-255 to 255);
   */
-LzSprite.prototype.getColorTransform = function (){
+function getColorTransform (){
     return this.getColorObj().getTransform( );
 }
 
 /**
   * @access private
   */
-LzSprite.prototype.getColorObj = function (){
+function getColorObj (){
     if ( this.__LZcolorobj == null ){
         if ( this.__LZmovieClipRef == null ){
             this.makeContainerResource();
@@ -1033,7 +1036,7 @@
   * @keywords protected 
   * @deprecated
   */
-LzSprite.prototype.getWidth = function (){
+function getWidth (){
     return this.width;
 }
 
@@ -1042,7 +1045,7 @@
   * @keywords protected 
   * @deprecated
   */
-LzSprite.prototype.getHeight = function (){
+function getHeight (){
     return this.height;
 }
 
@@ -1050,7 +1053,7 @@
 /**
   * This method makes this view the frontmost subview of this view's parent.
   * */
-LzSprite.prototype.bringToFront = function ( ){
+function bringToFront ( ){
     //Debug.write('bringToFront', this);
     //this is really a function of the parent view
     this.owner.immediateparent.sprite.changeOrder ( this , 1);
@@ -1059,7 +1062,7 @@
 /**
   * This method makes this view the hindmost subview of this view's parent.
   */
-LzSprite.prototype.sendToBack = function ( ){
+function sendToBack ( ){
     //Debug.write('sendToBack', this);
     //this is really a function of the parent view
     this.owner.immediateparent.sprite.changeOrder ( this , -1);
@@ -1071,7 +1074,7 @@
   * view is null or not a sibling, the method has no effect.
   * @return Boolean: Method returns true if the operation is successful.
   */
-LzSprite.prototype.sendBehind = function ( v ){
+function sendBehind ( v ){
     return this.owner.immediateparent.sprite.changeOrder( this, -1, v , false );
 }
 
@@ -1081,7 +1084,7 @@
   * view is null or not a sibling, the method has no effect.
   * @return Boolean: Method returns true if the operation is successful.
   */
-LzSprite.prototype.sendInFrontOf = function ( v ){
+function sendInFrontOf ( v ){
     return this.owner.immediateparent.sprite.changeOrder( this, 1, v , true );
 }
 
@@ -1091,7 +1094,7 @@
   * 
   * @param cSprite: a reference to the child sprite to be moved to the front
   */
-LzSprite.prototype.changeOrder = function (cSprite , dir , fv , inf ){
+function changeOrder (cSprite , dir , fv , inf ){
     var dl = this.getDepthList();
     var dll = dl.length;
     var sw;
@@ -1196,7 +1199,7 @@
   * Returns an array of subviews in depth order
   * @return [LzSprite]: An array of this view's subviews in depth order
   */
-LzSprite.prototype.getDepthList = function (){
+function getDepthList (){
     var a = [];
     for ( var i = this.owner.subviews.length-1; i >= 0; i-- ){
         var sv = this.owner.subviews[ i ].sprite;
@@ -1208,7 +1211,7 @@
 /**
   * @access private
   */
-LzSprite.prototype.__LZfindNextNonNull = function ( arr, pos , dir ){
+function __LZfindNextNonNull ( arr, pos , dir ){
     for ( var i = pos + dir; i >= 0 && i < arr.length; i += dir ){
         if ( arr[ i ] != null ){
             return arr[ i ];
@@ -1221,7 +1224,7 @@
   * Gets the movieclip of childview which is the direct child of this view's movieclip
   * @access private
   */
-LzSprite.prototype.getAttachPoint = function ( cSprite ){
+function getAttachPoint ( cSprite ){
     //Debug.write('getAttachPoint', this, cSprite);
     if ( ! this.__LZmovieClipRef || ! cSprite.__LZmovieClipRef ) return;
     var mcr = cSprite.__LZmovieClipRef;
@@ -1242,7 +1245,7 @@
   * @param Boolean s: true shows the hand cursor for this view, false hides 
   * it
   */
-LzSprite.prototype.setShowHandCursor = function ( s ){
+function setShowHandCursor ( s ){
     if (this.__LZbuttonRef.but){
         this.__LZbuttonRef.but.useHandCursor = s;
     }
@@ -1254,7 +1257,7 @@
   * @param String cursor: The name of the resource to use as a cursor when it is over
   * this view.
   */
-LzSprite.prototype.setCursor = function( cursor ){
+function setCursor( cursor ){
     if (cursor == null) return;
 
     this._cures = cursor;
@@ -1271,14 +1274,14 @@
 }
 
 /** @access private */
-LzSprite.prototype._cursorGotMouseover = function() {
+function _cursorGotMouseover() {
     LzMouseKernel.setCursorGlobal(this._cures);
 }
 
 /**
   * @access private
   */
-LzSprite.prototype.trackPlay = function() {
+function trackPlay() {
     if ( this.playing ) return;
     //Debug.write('trackPlay', this);
     this.playing = true;
@@ -1298,7 +1301,7 @@
 /**
   * @access private
   */
-LzSprite.prototype.stopTrackPlay = function() {
+function stopTrackPlay() {
     this.playing = false;
     this.owner.playing = false;
     this.updatePlayStatus();
@@ -1311,7 +1314,7 @@
   * Updates the play percentage
   * @access private
   */
-LzSprite.prototype.updatePlayStatus = function (){
+function updatePlayStatus (){
     var c = this.getMCRef()._currentframe;
     //Debug.write('updatePlayStatus', c);
 
@@ -1345,7 +1348,7 @@
   * Called to begin the process of checking if the frame number changed.  Calls
   * checkPlayStatus2 once after a frame.
   */
-LzSprite.prototype.checkPlayStatus = function (){
+function checkPlayStatus (){
     this.playing = false;
     this.updatePlayStatus();
     if ( this.checkPlayStatusDel == null ){
@@ -1356,7 +1359,7 @@
     this.__lzskipplaycheck = 0;
     this.__lzskipplaychecklimit = 4;
     // skip more frames for mp3 audio resources to allow tracking to work correctly
-     if (('isaudio' in this.getMCRef()) && (this.getMCRef().isaudio == true)) this.__lzskipplaychecklimit = LzSprite.prototype.__lzskipplaychecklimitmax;
+     if (('isaudio' in this.getMCRef()) && (this.getMCRef().isaudio == true)) this.__lzskipplaychecklimit = this.__lzskipplaychecklimitmax;
     
     //Debug.warn('checkPlayStatus %w %w %w %w', this.__lzcheckframe, this.frame, this.totalframes, this.__lzskipplaychecklimit);
     LzIdle.callOnIdle( this.checkPlayStatusDel );
@@ -1367,7 +1370,7 @@
   * Called after one frame by checkPlayStatus2 to see the frame number has 
   * changed.  May call itself
   */
-LzSprite.prototype.checkPlayStatus2 = function (){
+function checkPlayStatus2 (){
     //Debug.write('checkPlayStatus2 ', this);
     this.updatePlayStatus();
     this.__lzskipplaycheck++;
@@ -1400,7 +1403,7 @@
   * begin playing at the current frame.
   * @param Boolean rel: If true, f is relative to the current frame.  Otherwise f is relative to the beginning of the resource.
   */
-LzSprite.prototype.play = function (f, rel){
+function play (f, rel){
     var m = this.getMCRef();
     if ( m == null ) {
         this.queuePlayAction( "play" , f , rel );
@@ -1425,7 +1428,7 @@
   * stop at the current frame.
   * @param Boolean rel: If true, f is relative to the current frame.  Otherwise it is relative to the start position of the resource.
   */
-LzSprite.prototype.stop = function (f, rel){
+function stop (f, rel){
     var m = this.getMCRef();
     if ( m == null ) {
         // always stop on the first frame
@@ -1450,7 +1453,7 @@
 /**
   * @access private
   */
-LzSprite.prototype.queuePlayAction = function ( a , arg1 , arg2 ){
+function queuePlayAction ( a , arg1 , arg2 ){
     //Debug.write('queuePlayAction', a, arg1, arg2);
     if ( this.queuedplayaction == null ){
         this.queuedplayaction = [];
@@ -1465,7 +1468,7 @@
 /**
   * @access private
   */
-LzSprite.prototype.doQueuedPlayAction = function (){
+function doQueuedPlayAction (){
     for (var i=0; i < this.queuedplayaction.length; i++) {
         var qa = this.queuedplayaction[i];
         //Debug.write('doQueuedPlayAction', qa);
@@ -1475,7 +1478,7 @@
 }
 
 
-LzSprite.prototype.toString = function () {
+function toString () {
     return 'LzSprite for ' + this.owner;
 }
 
@@ -1483,7 +1486,7 @@
   * Set the volume of the attached resource
   * @param Integer v: A number from 0 to 100 representing a volume level
   */
-LzSprite.prototype.setVolume = function (v) {
+function setVolume (v) {
     var m = this.getMCRef();
     //if null is passed to LzAudio.setVolume, it sets the global volume, which
     //is not what you want here.
@@ -1499,7 +1502,7 @@
   * Get the volume of the attached resource
   * @return Integer: A number from 0 to 100 representing a volume level
   */
-LzSprite.prototype.getVolume = function() {
+function getVolume() {
     var m = this.getMCRef();
     if (m.isaudio == true) {
         return m.getVolume();
@@ -1512,7 +1515,7 @@
   * Set the pan of the attached resource
   * @param Integer p: A number from -100 to 100 representing a pan level
   */
-LzSprite.prototype.setPan = function(p) {
+function setPan(p) {
     var m = this.getMCRef();
     if (m.isaudio == true) {
         m.setPan(p);
@@ -1525,7 +1528,7 @@
   * Get the pan of the attached resource
   * @return Integer: A number from -100 to 100 representing a pan level
   */
-LzSprite.prototype.getPan = function() {
+function getPan() {
     var m = this.getMCRef();
     if (m.isaudio == true) {
         return m.getPan();
@@ -1538,7 +1541,7 @@
   * Get the current z order of the sprite
   * @return Integer: A number representing z orderin
   */
-LzSprite.prototype.getZ = function() {
+function getZ() {
     return this.__LZdepth;
 }
 
@@ -1547,7 +1550,7 @@
   * Install menu items for the right-mouse-button 
   * @param LzContextMenu cmenu: LzContextMenu to install on this view
   */
-LzSprite.prototype.setContextMenu = function ( cmenu ){
+function setContextMenu ( cmenu ){
     // For back compatibility, we accept either LzContextMenu or (Flash primitive) ContextMenu
     if (! (cmenu instanceof ContextMenu)) {
         this.__contextmenu = cmenu;
@@ -1573,7 +1576,7 @@
     }
 }
 
-LzSprite.prototype.setDefaultContextMenu = function ( cmenu ){
+function setDefaultContextMenu ( cmenu ){
     MovieClip.prototype.menu = cmenu.__LZcontextMenu();
 }
 
@@ -1581,7 +1584,7 @@
   * LzView.getContextMenu
   * Return the current context menu
   */
-LzSprite.prototype.getContextMenu = function() {
+function getContextMenu() {
     return this.__contextmenu;
 }
 
@@ -1592,7 +1595,7 @@
   * 
   * @access private
   */
-Button.prototype.__gotFocus = function ( oldfocus ){
+function __gotFocus ( oldfocus ){
   // SWF-specific
     if (_root._focusrect != true) return;
     //Debug.write('__gotFocus', oldfocus);
@@ -1605,9 +1608,11 @@
 /**
   * @access private
   */
-Button.prototype.__lostFocus = function ( ){
+function __lostFocus ( ){
   // SWF-specific
     if (_root._focusrect != true) return;
     //Debug.write('__lostFocus');
     if (this.__lzview.hasFocus) LzFocus.clearFocus();
 }
+
+} // End of LzSprite

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.lzs	2007-11-01 20:05:16 UTC (rev 7084)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.lzs	2007-11-01 20:22:09 UTC (rev 7085)
@@ -1,5 +1,5 @@
 /**
-  * LzTextSprite.as
+  * LzTextSprite.lzs
   *
   * @copyright Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
@@ -8,7 +8,14 @@
   * @subtopic AS2
   */
 
-var LzTextSprite = function(newowner, args) {
+class LzTextSprite extends LzSprite {
+
+function initialize(newowner, args) {
+    // [todo pbr 10-31-07]
+    // I'm not calling super.initialize because this appears to do what
+    // LzInputSprite ctor does 
+    // super.initialize.apply(this, arguments);
+
     if (newowner == null) return this;
     this.__LZdepth = newowner.immediateparent.sprite.__LZsvdepth++;
     this.__LZsvdepth = 0;
@@ -54,11 +61,9 @@
     
 }
 
-LzTextSprite.prototype = new LzSprite(null);
+var colorstring = "#000000"; // black
 
-LzTextSprite.prototype.colorstring = "#000000"; // black
-
-LzTextSprite.prototype.__initTextProperties = function (args) {
+function __initTextProperties (args) {
     this.password = args.password  ? true : false;
     var textclip = this.__LZtextclip;
     textclip.password = this.password;
@@ -128,7 +133,7 @@
   * Get a reference to the control mc
   * @access private
   */
-LzTextSprite.prototype.getMCRef = function () {
+function getMCRef () {
     return this.__LZtextclip;
 }
 
@@ -141,7 +146,7 @@
   * this transition.
   * @access private
   */
-TextField.prototype.__cacheSelection = function () {
+function __cacheSelection () {
     this.__cacheSelectionPos  = Selection.getBeginIndex();
     this.__cacheSelectionSize = Selection.getEndIndex() - Selection.getBeginIndex();
 }
@@ -150,68 +155,64 @@
 /**
   * @access private
   */
-LzTextSprite.prototype.scroll = 0;
+var scroll = 0;
 /**
   * @access private
   */
-LzTextSprite.prototype.maxscroll = 0;
+var maxscroll = 0;
 /**
   * @access private
   */
-LzTextSprite.prototype.hscroll = 0;
+var hscroll = 0;
 /**
   * @access private
   */
-LzTextSprite.prototype.maxhscroll = 0;
+var maxhscroll = 0;
 
 
 // [todo: 2004-3-29 hqm] lines seem to get the ends clipped off if you use the TextField.textWidth
 // from Flash, so I am adding a constant. Am I missing something here? 
-LzTextSprite.prototype.PAD_TEXTWIDTH = 4;
+static var PAD_TEXTWIDTH = 4;
 
-LzTextSprite.prototype.classname = "LzTextSprite";
+static var DEFAULT_SIZE = 8;
 
-LzTextSprite.prototype.DEFAULT_SIZE = 8;
-
 /**
   * setResize set behavior of text field width when new text is added.
   * LzTextSprite only (cannot be used with LzInputText).
   * @param Boolean val: if true, the textfield will recompute it's width after setText() is called
   */
-LzTextSprite.prototype.setResize = function ( val ){
+function setResize ( val ){
     this.resize = val;
 }
 
 /**
   * @access private
   */
-LzTextSprite.prototype.setWidth = function ( val ){
+function setWidth ( val ){
     this.__LZtextclip._width = val;
-    this._viewsetWidth( val );
+    super.setWidth.apply(this, arguments);
+
     // recalculate height
     if (this.sizeToHeight) {
         this.setHeight(this.__LZtextclip._height);
     }
 }
 
-LzTextSprite.prototype._viewsetWidth = LzSprite.prototype.setWidth;
 
-
 /**
   * @access private
   */
-LzTextSprite.prototype.setHeight = function ( val ){
+function setHeight ( val ){
     this.__LZtextclip._height = val;
-    this._viewsetHeight( val );
+    super.setHeight.apply(this, arguments);
 }
-LzTextSprite.prototype._viewsetHeight = LzSprite.prototype.setHeight;
 
 
 /**
   * @access private
   * Set the maximum number of chars a textfield can contain
   */
-LzTextSprite.prototype.setMaxLength = function ( val ){
+function setMaxLength ( val ){
     this.__LZtextclip.maxChars = val;
 }
 
@@ -219,7 +220,7 @@
   * @access private
   * Set the maximum number of chars a textfield can contain
   */
-LzTextSprite.prototype.setPattern = function ( val ){
+function setPattern ( val ){
     if (val == null || val == "") {
         this.__LZtextclip.restrict = null;
     } else if (val.substring(0,1) == "[" &&
@@ -233,13 +234,13 @@
 /**
   * Calculates the current width of the text held by the text field.
   */
-LzTextSprite.prototype.getTextWidth = function ( ){
+function getTextWidth ( ){
     var mc = this.__LZtextclip;
     var ml = mc.multiline;
     var mw = mc.wordWrap;
     mc.multiline = false;
     mc.wordWrap = false;
-    var twidth = (mc.textWidth == 0) ? 0 : mc.textWidth + this.PAD_TEXTWIDTH;
+    var twidth = (mc.textWidth == 0) ? 0 : mc.textWidth + LzTextSprite.PAD_TEXTWIDTH;
     mc.multiline = ml;
     mc.wordWrap = mw;
     return twidth;
@@ -249,11 +250,11 @@
 /**
   * Calculates the current height of the text held by the text field.
   */
-LzTextSprite.prototype.getTextHeight = function ( ){
+function getTextHeight ( ){
     return this.__LZtextclip.textHeight;
 }
 
-LzTextSprite.prototype.getTextfieldHeight = function ( ){
+function getTextfieldHeight ( ){
     if (this.multiline) {
         return this.__LZtextclip._height
     } else {
@@ -280,14 +281,14 @@
 /**
   * @access private
   */
-LzTextSprite.prototype.setScroll = function ( h ){
+function setScroll ( h ){
     this.__LZtextclip.scroll = h;
 }
 
 /**
   * @access private
   */
-LzTextSprite.prototype.getScroll = function ( ){
+function getScroll ( ){
     return this.__LZtextclip.scroll;
 }
 
@@ -295,7 +296,7 @@
 /**
   * @access private
   */
-LzTextSprite.prototype.getMaxScroll = function ( ){
+function getMaxScroll ( ){
     return this.__LZtextclip.maxscroll;
 }
 
@@ -303,7 +304,7 @@
 /**
   * @access private
   */
-LzTextSprite.prototype.getBottomScroll = function ( ){
+function getBottomScroll ( ){
     return this.__LZtextclip.bottomScroll;
 }
 
@@ -313,7 +314,7 @@
   * n pixels vertically
   * (n is always &lt; 0)
   */
-LzTextSprite.prototype.setXScroll = function ( n ){
+function setXScroll ( n ){
     this.__LZtextclip._x = Math.floor(Math.min(0, n));
     this.xscroll = this.__LZtextclip._x;
     if (this.onxscroll.ready) this.onxscroll.sendEvent(this.__LZtextclip._x);
@@ -324,7 +325,7 @@
   * @param Number n: set the top line of the textfield to offset n pixels
   * vertically (n is always &lt; 0)
   */
-LzTextSprite.prototype.setYScroll = function ( n ){
+function setYScroll ( n ){
     // Implementation note: This uses both the simple mechanism of
     // offsetting the _y of the text field and also attempts to use
     // the scroll/maxscroll feature of Flash text, in order to scroll
@@ -367,7 +368,7 @@
 /**
   * @access private
   */
-LzTextSprite.prototype.annotateAAimg = function (txt) {
+function annotateAAimg (txt) {
     if (typeof(txt) == "undefined") { return; }
     if (txt.length == 0) { return };
     
@@ -407,7 +408,7 @@
 /**
   * @access private
   */
-LzTextSprite.prototype.parseImgAttributes = function(attrs, str) {
+function parseImgAttributes(attrs, str) {
     var i;
     var end = 0;
     var ATTNAME = 'attrname';
@@ -460,7 +461,7 @@
   * setText sets the text of the field to display
   * @param String t: the string to which to set the text
   */
-LzTextSprite.prototype.setText = function ( t ){
+function setText ( t ){
     if (typeof(t) == 'undefined' || t == 'null') {
         t = "";
     } else if (typeof(t) != "string") {
@@ -521,7 +522,7 @@
   *
   * @access private
   */
-LzTextSprite.prototype.updateMaxLines = function (){
+function updateMaxLines (){
     var newlin = Math.floor( this.height / (  this.font.height -1 ) );
     if ( newlin != this.maxlines ){
         this.maxlines = newlin;
@@ -533,7 +534,7 @@
   * Sets the selectability (with Ibeam cursor) of the text field
   * @param Boolean isSel: true if the text may be selected by the user
   */
-LzTextSprite.prototype.setSelectable = function ( isSel ){
+function setSelectable ( isSel ){
     this.__LZtextclip.selectable = isSel;
 
 }
@@ -542,7 +543,7 @@
   * Sets the format string for the text field.
   * @access private
   */
-LzTextSprite.prototype.__setFormat = function (){
+function __setFormat (){
     this.setFontInfo();
     var cfontname = LzFontManager.__fontnameCacheMap[this.fontname];
     if (cfontname == null) {
@@ -578,19 +579,19 @@
     }
 }
 
-LzTextSprite.prototype.setFontInfo = function () {
+function setFontInfo () {
     this.font = LzFontManager.getFont( this.fontname , this.fontstyle );
 
     if (this.font != null) {
         this.lineheight = this.font.leading + ( this.font.height *
-                                                this.fontsize/ LzText.DEFAULT_SIZE );
+                                                this.fontsize/ LzTextSprite.DEFAULT_SIZE );
     }
 }
 
 /**
   * @access private
   */
-LzTextSprite.prototype.setFontName = function ( fname ){
+function setFontName ( fname ){
     this.fontname = fname;
     this.__setFormat();
     // force recompute of height if needed
@@ -600,7 +601,7 @@
 /**
   * @access private
   */
-LzTextSprite.prototype.setFontSize = function ( fsize ){
+function setFontSize ( fsize ){
     this.fontsize = fsize;
     this.__setFormat();
     // force recompute of height if needed
@@ -611,7 +612,7 @@
 /**
   * @access private
   */
-LzTextSprite.prototype.setFontStyle = function ( fstyle ){
+function setFontStyle ( fstyle ){
     this.fontstyle = fstyle;
     this.__setFormat();
     // force recompute of height if needed
@@ -622,7 +623,7 @@
   * Sets the color of all the text in the field to the given hex color.
   * @param Number c: The color for the text -- from 0x0 (black) to 0xFFFFFF (white)
   */
-LzTextSprite.prototype.setColor = function ( c ){
+function setColor ( c ){
     this.colorstring = "#" + c.toString( 16 );
     this.__setFormat();
     this.setText( this.text );
@@ -634,7 +635,7 @@
   * multiple lines.
   * @param Boolean ml: true if the text field should allow multiple lines
   */
-LzTextSprite.prototype.setMultiline = function ( ml ){
+function setMultiline ( ml ){
     this.multiline = (ml == true);
     var mc = this.__LZtextclip;
     if (this.multiline) {
@@ -652,7 +653,7 @@
 /**
   * @access private
   */
-LzTextSprite.prototype.setBorder = function ( onroff ){
+function setBorder ( onroff ){
     this.__LZtextclip.border = (onroff == true);
 }
 
@@ -660,7 +661,7 @@
 /**
   * @access private
   */
-LzTextSprite.prototype.setWordWrap = function ( wrap ){
+function setWordWrap ( wrap ){
     var mc = this.__LZtextclip;
     mc.wordWrap = wrap;
 }
@@ -669,7 +670,7 @@
 /**
   * @access private
   */
-LzTextSprite.prototype.setEmbedFonts = function ( onroff ){
+function setEmbedFonts ( onroff ){
     this.__LZtextclip.embedFonts = (onroff == true);
 }
 
@@ -679,14 +680,14 @@
  * and higher. 
  * @param aliasType "normal" or "advanced"
  */
-LzTextSprite.prototype.setAntiAliasType = function( aliasType ){
+function setAntiAliasType( aliasType ){
     this.__LZtextclip.antiAliasType = aliasType;
 }
 
 /**
  * Gets the kind of antialiasing set on this text object
  */ 
-LzTextSprite.prototype.getAntiAliasType = function() {
+function getAntiAliasType() {
     return this.__LZtextclip.antiAliasType;
 }
 
@@ -695,14 +696,14 @@
  * and higher. 
  * @param gridFit "none" "subpixel" or "pixel"
  */
-LzTextSprite.prototype.setGridFit = function( gridFit ){
+function setGridFit( gridFit ){
     this.__LZtextclip.gridFit = gridFit;
 }
 
 /**
  * Gets the kind of antialiasing set on this text object
  */ 
-LzTextSprite.prototype.getGridFit = function() {
+function getGridFit() {
     return this.__LZtextclip.gridFit; 
 }
 
@@ -713,14 +714,14 @@
  * Only works in swf8 and higher. 
  * @param sharpness -400 to 400
  */
-LzTextSprite.prototype.setSharpness = function( sharpness ){
+function setSharpness( sharpness ){
     this.__LZtextclip.sharpness = sharpness;
 }
 
 /**
 * Gets the sharpness rendering property of this text object
  */ 
-LzTextSprite.prototype.getSharpness = function() {
+function getSharpness() {
     return this.__LZtextclip.sharpness;
 }
 
@@ -729,21 +730,21 @@
  * Only works in swf8 and higher. 
  * @param thickness -200 to 200
  */
-LzTextSprite.prototype.setThickness = function( thickness ){
+function setThickness( thickness ){
      this.__LZtextclip.thickness = thickness;
 }
 
 /**
 * Gets the thickness rendering property of this text object
  */ 
-LzTextSprite.prototype.getThickness = function() {
+function getThickness() {
     return this.__LZtextclip.thickness;
 }
 
 /**
   * @access private
   */
-LzTextSprite.prototype.__LZforceScrollAttrs = function () {
+function __LZforceScrollAttrs () {
     this.__LZtextclip.onScroller();
 }
 
@@ -753,7 +754,7 @@
   * object, not the LzTextSprite class, because this is called as a method on
   * __LZtextclip from __LZforceScrollAttrs
   */
-LzTextSprite.prototype.__updatefieldsize = function ( ){
+function __updatefieldsize ( ){
     if ( this.__lzview.scroll != this.scroll) {
         this.__lzview.scroll = this.scroll;
         if (this.__lzview.onscroll.ready) this.__lzview.onscroll.sendEvent(this.scroll)
@@ -775,7 +776,7 @@
 /**
   * 
   */
-LzTextSprite.prototype.setHScroll = function (s){
+function setHScroll (s){
     this.__LZtextclip.hscroll = s;
 }
 
@@ -790,7 +791,7 @@
   * then the text cursor is positioned at the start point, but no text is 
   * selected.
   */
-LzTextSprite.prototype.setSelection = function ( start , end ){
+function setSelection ( start , end ){
     var sf = targetPath( this.__LZtextclip);
     if( Selection.getFocus() != sf ) {
         Selection.setFocus( sf );
@@ -809,7 +810,7 @@
   * @return Number: The position of the text cursor within this textfield, 0
   * based. If the text cursor is not in the textfield, this method returns -1.
   */
-LzTextSprite.prototype.getSelectionPosition = function ( ){
+function getSelectionPosition ( ){
     var sf = targetPath( this.__LZtextclip) ;
     if( Selection.getFocus() != sf ) {
         var tc = this.__LZtextclip;
@@ -831,7 +832,7 @@
   * @return Number: The length of the text selection within this textfield.
   * If the text cursor is not in the textfield, this method returns -1.
   */
-LzTextSprite.prototype.getSelectionSize = function ( ){
+function getSelectionSize ( ){
     var sf = targetPath( this.__LZtextclip);
     if( Selection.getFocus() != sf ) {
         var tc = this.__LZtextclip;
@@ -846,3 +847,5 @@
     var siz = Selection.getEndIndex() - Selection.getBeginIndex();
     return siz;
 }
+
+} // End of LzTextSprite

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzXMLParser.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzXMLParser.lzs	2007-11-01 20:05:16 UTC (rev 7084)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzXMLParser.lzs	2007-11-01 20:22:09 UTC (rev 7085)
@@ -1,5 +1,5 @@
 /**
-  * LzXMLParser.as
+  * LzXMLParser.lzs
   *
   * @copyright Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
@@ -12,7 +12,7 @@
   * @shortdesc Utility for parsing text into native XML DOM object
   */
 
-var LzXMLParser = new Object;
+class LzXMLParser {
 
 /**
   * Converts string to platform-native XML data.
@@ -23,10 +23,11 @@
   * @param boolean trimwhitespace: if true, text nodes have whitespace trimmed from start and end.
   * @return nativeXMLObject: An XML DOM object native to the runtime platform
   */
-LzXMLParser.parseXML = function( str, trimwhitespace, nsprefix ){
+static function parseXML( str, trimwhitespace, nsprefix ){
         var xmlobj = new XML();
         xmlobj.ignoreWhite = true;
         xmlobj.parseXML( str );
         return xmlobj;
 }
 
+} // End of LzXMLParser

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzXMLTranslator.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzXMLTranslator.lzs	2007-11-01 20:05:16 UTC (rev 7084)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzXMLTranslator.lzs	2007-11-01 20:22:09 UTC (rev 7085)
@@ -1,5 +1,5 @@
 /**
-  * LzXMLTranslator.js
+  * LzXMLTranslator.lzs
   *
   * @copyright Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
@@ -12,11 +12,13 @@
   * @shortdesc: Utility for converting native XML DOM object into LzDataNode tree
   */
 
-var LzXMLTranslator = new Object;
+class LzXMLTranslator {
 
-LzXMLTranslator.copyXML = function (xmlobj, trimwhitespace, nsprefix) {
+static function copyXML (xmlobj, trimwhitespace, nsprefix) {
     var lfcnode = LzLoader.prototype.copyFlashXML(xmlobj, trimwhitespace, nsprefix);
     var fc = lfcnode.childNodes[0];
     if ( fc instanceof LzDataText ) return null;
     return fc;
 }
+
+} // End of LzXMLTranslator



More information about the Laszlo-checkins mailing list