[Laszlo-checkins] r8977 - in openlaszlo/trunk/WEB-INF/lps: lfc/kernel/dhtml lfc/kernel/swf lfc/kernel/swf9 lfc/services lfc/services/platform/dhtml lfc/services/platform/swf lfc/services/platform/swf9 server/src/org/openlaszlo/compiler

max@openlaszlo.org max at openlaszlo.org
Fri May 2 09:10:01 PDT 2008


Author: max
Date: 2008-05-02 09:09:55 -0700 (Fri, 02 May 2008)
New Revision: 8977

Removed:
   openlaszlo/trunk/WEB-INF/lps/lfc/services/platform/dhtml/LzModeManager.js
   openlaszlo/trunk/WEB-INF/lps/lfc/services/platform/swf/LzModeManager.as
   openlaszlo/trunk/WEB-INF/lps/lfc/services/platform/swf9/LzModeManager.js
Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzMouseKernel.as
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.as
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMouseKernel.as
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
   openlaszlo/trunk/WEB-INF/lps/lfc/services/Library.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/services/LzModeManager.lzs
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/SWFFile.java
Log:
Change 20080501-maxcarlson-Z by maxcarlson at Roboto on 2008-05-01 19:33:39 PDT
    in /Users/maxcarlson/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Remodularize platform-specific parts of LzModeManager

New Features:

Bugs Fixed: LPP-5912 - Handle LzModeManager Singleton Doc Issues

Technical Reviewer: promanik
QA Reviewer: hminsky
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details: swf/LzMouseKernel.as - Move click stream processing code from platform/swf/LzModeManager.as.  Change __mouseEvent() to handleMouseEvent() to comply with the old API in SWFFile.java.  

swf/LzInputTextSprite.as - Fix typo where getText() was being assigned to LzTextSprite.  Add findSelection() implementation from platform/swf/LzModeManager.as

dhtml/LzSprite.js - Call LzMouseKernel.__sendEvent() instead of calling LzModeManager.handleMouseButton() directly.

dhtml/LzMouseKernel.js - Add __sendEvent() API to be used by sprites to send events into the runtime.  

dhtml/LzInputTextSprite.js - Add findSelection() implementation from platform/dhtml/LzModeManager.js

swf9/LzMouseKernel.as -  Add __sendEvent() API to be used by sprites to send  
events into the runtime.  Send global mouse events through __sendEvent() instead of directly to LzGlobalMouse.

swf9/LzInputTextSprite.as - Add dummy findSelection() implementation.

delete unused platform/*/LzModeManager files

services/LzModeManager.lzs - __findInputtextSelection() delegates to LzInputTextSprite.findSelection().  Receive all mouse events from the kernel through a single API, rawMouseEvent().  Unify documentation for LzModeManager and callback registration.

services/Library.lzs - Remove unused platform/*/LzModeManager includes

SWFFile.java - Change movieclips to call LzMouseKernel APIs for swf7/8.

Tests: trunk/examples/modeexample.lzx passes in swf8, swf9 and dhtml.  test/lfc/legals/keyboardandmouse.lzx



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js	2008-05-02 14:57:56 UTC (rev 8976)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js	2008-05-02 16:09:55 UTC (rev 8977)
@@ -846,6 +846,16 @@
     return h;
 }
 
+/**
+ * If a mouse event occurs in an input text field, find the focused view
+ */
+LzInputTextSprite.findSelection = function ( ){
+    if (LzInputTextSprite.__focusedSprite 
+        && LzInputTextSprite.__focusedSprite.owner) {
+        return LzInputTextSprite.__focusedSprite.owner;
+    }
+}
+
 // prevent text selection in IE
 // can't use Lz.attachEventHandler because we need to cancel events
 document.onselectstart = LzTextSprite.prototype.__cancelhandler;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js	2008-05-02 14:57:56 UTC (rev 8976)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js	2008-05-02 16:09:55 UTC (rev 8977)
@@ -18,6 +18,7 @@
     ,owner: null
     ,__showncontextmenu: null
     ,__defaultcontextmenu: null
+    // handles global mousedown, move events
     ,__mouseEvent: function(e) {
         if (!e) e = window.event;
         var eventname = 'on' + e.type;
@@ -40,24 +41,30 @@
             }
         }    
 
-        if (LzMouseKernel.__callback) {
-            if (e.button == 2 && eventname != 'oncontextmenu') return;
-            if (eventname == 'oncontextmenu') {
-                if (targ && targ.owner && targ.owner.__contextmenu) {
-                    targ.owner.__contextmenu.kernel.__show();
-                    return targ.owner.__contextmenu.kernel.showbuiltins;
-                } else if (LzMouseKernel.__defaultcontextmenu) {
-                    LzMouseKernel.__defaultcontextmenu.kernel.__show();
-                    return LzMouseKernel.__defaultcontextmenu.kernel.showbuiltins;
-                }
-            } else {
-                return LzMouseKernel.__scope[LzMouseKernel.__callback](eventname);
+        if (e.button == 2 && eventname != 'oncontextmenu') return;
+        if (eventname == 'oncontextmenu') {
+            if (targ && targ.owner && targ.owner.__contextmenu) {
+                targ.owner.__contextmenu.kernel.__show();
+                return targ.owner.__contextmenu.kernel.showbuiltins;
+            } else if (LzMouseKernel.__defaultcontextmenu) {
+                LzMouseKernel.__defaultcontextmenu.kernel.__show();
+                return LzMouseKernel.__defaultcontextmenu.kernel.showbuiltins;
             }
+        } else {
+            LzMouseKernel.__sendEvent(eventname);
         }
         //Debug.write('LzMouseKernel event', eventname);
     }
+    // sends mouse events to the callback
+    ,__sendEvent: function(eventname, view) {
+        if (LzMouseKernel.__callback) {
+            LzMouseKernel.__scope[LzMouseKernel.__callback](eventname, view);
+        }
+        //Debug.write('LzMouseKernel event', eventname);
+    }
     ,__callback: null
     ,__scope: null
+    // handles global mouseup events
     ,__mouseupEvent: function (e) {
         if (LzMouseKernel.__lastMouseDown != null) {
             // call mouseup on the sprite that got the last mouse down  

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js	2008-05-02 14:57:56 UTC (rev 8976)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js	2008-05-02 16:09:55 UTC (rev 8977)
@@ -710,14 +710,14 @@
     }
 
     //Debug.write('__mouseEvent', eventname, this.owner);
-    if (skipevent == false && this.owner.mouseevent && LzModeManager && LzModeManager['handleMouseButton']) {
-        LzModeManager.handleMouseButton(this.owner, eventname);
+    if (skipevent == false && this.owner.mouseevent && LzMouseKernel && LzMouseKernel['__sendEvent']) {
+        LzMouseKernel.__sendEvent(eventname, this.owner);
 
         if (this.__mousedown) {
             if (eventname == 'onmouseover') {
-                LzModeManager.handleMouseButton(this.owner, 'onmousedragin');
+                LzMouseKernel.__sendEvent('onmousedragin', this.owner);
             } else if (eventname == 'onmouseout') {
-                LzModeManager.handleMouseButton(this.owner, 'onmousedragout');
+                LzMouseKernel.__sendEvent('onmousedragout', this.owner);
             }
         }
     }

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as	2008-05-02 14:57:56 UTC (rev 8976)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as	2008-05-02 16:09:55 UTC (rev 8977)
@@ -348,6 +348,18 @@
     return this.__LZtextclip._height
 }
 
-LzTextSprite.prototype.getText = function ( ){
+LzInputTextSprite.prototype.getText = function ( ){
     return this.__LZtextclip.text;
 }
+
+/**
+ * If a mouse event occurs in an input text field, find the focused view
+ */
+LzInputTextSprite.prototype.findSelection = function ( ){
+    var ss = Selection.getFocus();
+    if ( ss != null ){
+        var focusview = eval(ss + '.__lzview');
+        //Debug.warn("Selection.getFocus: %w, %w, %w", focusview, ss);
+        if ( focusview != undefined ) return focusview;
+    }
+}

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzMouseKernel.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzMouseKernel.as	2008-05-02 14:57:56 UTC (rev 8976)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzMouseKernel.as	2008-05-02 16:09:55 UTC (rev 8977)
@@ -11,8 +11,9 @@
 // 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);
+    // Receives events from sprites
+    handleMouseEvent: function(view, eventname) {
+        if (LzMouseKernel.__callback) LzMouseKernel.__scope[LzMouseKernel.__callback](eventname, view);
         //Debug.write('LzMouseKernel event', eventname);
     }
     ,__callback: null
@@ -22,6 +23,7 @@
         this.__scope = scope;
         this.__callback = funcname;
         if (this.__listeneradded == false) {
+            this.__clstDel = new LzDelegate( this , "__checkClickStream" )
             Mouse.addListener(LzMouseKernel.__mouselistener);
             this.__listeneradded = true;
         }
@@ -80,10 +82,135 @@
     }
     ,__mouselistener: {
         onMouseMove: function () { 
-            LzGlobalMouse.__mouseEvent('onmousemove');
+            LzMouseKernel.handleMouseEvent(null, 'onmousemove');
         }
         ,onMouseWheel: function(d) {
             LzKeys.__mousewheelEvent(d);
         }
     }
+
+    // Mouse event processing code, formerly from LzModeManager.as
+    ,__clickStream: []
+    ,__clstDict: { onmouseup : 1 , onmousedown: 2 }
+    ,__WAIT_FOR_CLICK: 4
+
+    /**
+    * Called for onmouseup/down by clickable sprites
+    * @access private
+    */
+    ,handleMouseButton: function( view, eventname){
+        //Debug.write('handleMouseButton', view, eventname);
+        this.__clickStream.push( this.__clstDict[ eventname ] + 2);
+        this.handleMouseEvent( view , eventname );
+        this.__callNext();
+    }
+
+    /**
+    * Called when any mousedown or mouseup event is received by canvas to try and 
+    * match up mouse events with non-clickable view.  Not reliable - could happen 
+    * after any number of frames.
+    * 
+    * A Timer is then activated to call
+    * the cleanup method in the next frame
+    * 
+    * @access private
+    */
+    ,rawMouseEvent: function( eventname ) {
+        // If applicable, update the current sprite's insertion position/size.
+        var focus = Selection.getFocus();
+        if (focus) {
+            var textclip = eval(focus);  // path -> object
+            if (textclip && textclip.__cacheSelection) {
+                textclip.__cacheSelection();
+            }
+        }
+
+        //Debug.warn("rawmouseevent %w", eventname);
+
+        //not guaranteed
+
+        this.__clickStream.push( this.__clstDict[ eventname ] );
+        //call the cleanup delegate
+
+
+        this.__callNext();
+    }
+
+    /**
+    * Cleanup method for raw mouseup
+    * @access private
+    */
+    ,__checkClickStream: function(ignore){
+        this.willCall = false;
+
+        //clickstream that looks like this
+        //1 , 3 , 2, 0 , ....
+        //raw mup , view mup , raw down , frame -- ok to check next for pair
+        //but then stop.
+        var i = 0;
+        var cl = this.__clickStream;
+        var cllen = this.__clickStream.length;
+
+        while( i < cllen -1 ){
+
+            if (  !( cl[i] == 1 || cl[i]==2 )){
+                //if we encounter a button mouse event here, it means we sent
+                //a global mouse event too soon
+                if ( cl[i] != 0 ) {
+                    Debug.warn( "Sent extra global mouse event" );
+                }
+
+                //advance pointer
+                i++;
+
+                continue;
+            }
+
+            var nextp = i + 1;
+            var maxnext = this.__WAIT_FOR_CLICK + i;
+
+            while ( cl[ nextp ] ==  0 && nextp  < maxnext ){
+                nextp++;
+            }
+
+            if ( nextp >= cllen ){
+                //it's not here, so wait till next frame
+                break;
+            }
+
+            if ( cl[ i ] == cl[ nextp ] - 2 ){
+                //this is a pair -- simple case. just advance pointer
+                i = nextp+1;
+            } else {
+                //this is unpaired
+                if ( cl[i] == 1 ){
+                    var me= "onmouseup";
+                }else{
+                    var me="onmousedown";
+                }
+                this.handleMouseEvent( null , me );
+                i++;
+            }
+        }
+
+        while( cl[ i ] == 0 ){ i++; }
+
+        cl.splice( 0 , i ); //remove up to i
+
+        if ( cl.length > 0 ){
+            this.__clickStream.push( 0 );
+            this.__callNext();
+        }
+
+    }
+
+    /**
+    * @access private
+    */
+    ,__callNext: function(){
+        if ( !this.willCall ){
+            this.willCall = true;
+            LzIdle.callOnIdle( this.__clstDel );
+        }
+    }
 }

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.as	2008-05-02 14:57:56 UTC (rev 8976)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.as	2008-05-02 16:09:55 UTC (rev 8977)
@@ -182,6 +182,14 @@
         return this.textfield.height;
     }
 
+    /**
+    * If a mouse event occurs in an input text field, find the focused view
+    * TODO: implement
+    */
+    static function findSelection(){
+        return null;
+    }
+
     }#  // #passthrough
 
 } // End of LzInputTextSprite

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMouseKernel.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMouseKernel.as	2008-05-02 14:57:56 UTC (rev 8976)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMouseKernel.as	2008-05-02 16:09:55 UTC (rev 8977)
@@ -18,8 +18,9 @@
     }#
 
 
-    static function __mouseEvent(eventname) {
-        if (LzMouseKernel.__callback) LzMouseKernel.__scope[LzMouseKernel.__callback](eventname);
+    // sends mouse events to the callback
+    static function __sendEvent(view, eventname) {
+        if (LzMouseKernel.__callback) LzMouseKernel.__scope[LzMouseKernel.__callback](eventname, view);
         //Debug.write('LzMouseKernel event', eventname);
     }
     static var __callback = null;
@@ -38,6 +39,7 @@
         }
     }    
 
+    // handles global mouse events
     static function __mouseHandler(event:MouseEvent):void {
         var eventname = 'on' + event.type.toLowerCase();
         //Debug.write('__mouseHandler', eventname);
@@ -45,8 +47,10 @@
         if (eventname == 'onmouseup' && __lastMouseDown != null) {
             // call mouseup on the sprite that got the last mouse down  
             LzMouseKernel.__lastMouseDown.__globalmouseup(event);
+            __lastMouseDown = null;
+        } else {
+            LzMouseKernel.__sendEvent(null, eventname);
         }
-        LzGlobalMouse.__mouseEvent(eventname, null);
     }
 
     /**

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as	2008-05-02 14:57:56 UTC (rev 8976)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as	2008-05-02 16:09:55 UTC (rev 8977)
@@ -255,17 +255,17 @@
       }
 
       public function handleMouse_DOUBLE_CLICK (event:MouseEvent) {
-          LzModeManager.handleMouseEvent( owner, 'ondblclick');
+          LzMouseKernel.__sendEvent( owner, 'ondblclick');
           event.stopPropagation();
       }
 
-        // called by LzMouseKernel when mouse goes up on another sprite
-        public function __globalmouseup( e:MouseEvent ){
-            if (this.__mousedown) {
-                this.__mouseEvent(e);
-                this.__mouseEvent(new MouseEvent('mouseupoutside'));
-            }
-        }
+      // called by LzMouseKernel when mouse goes up on another sprite
+      public function __globalmouseup( e:MouseEvent ){
+          if (this.__mousedown) {
+              this.__mouseEvent(e);
+              this.__mouseEvent(new MouseEvent('mouseupoutside'));
+          }
+      }
 
       public function __mouseEvent( e:MouseEvent ){
             var skipevent = false;
@@ -278,7 +278,6 @@
             } else if (eventname == 'onmouseup') {
                 if (LzMouseKernel.__lastMouseDown == this) {
                     this.__mousedown = false;
-                    LzMouseKernel.__lastMouseDown = null;
                 } else {
                     skipevent = true;
                 }
@@ -288,13 +287,13 @@
 
             //Debug.write('__mouseEvent', eventname, this.owner);
             if (skipevent == false && this.owner.mouseevent) {
-                LzModeManager.handleMouseEvent(this.owner, eventname);
+                LzMouseKernel.__sendEvent(this.owner, eventname);
 
                 if (this.__mousedown) {
                     if (eventname == 'onmouseover') {
-                        LzModeManager.handleMouseEvent(this.owner, 'onmousedragin');
+                        LzMouseKernel.__sendEvent(this.owner, 'onmousedragin');
                     } else if (eventname == 'onmouseout') {
-                        LzModeManager.handleMouseEvent(this.owner, 'onmousedragout');
+                        LzMouseKernel.__sendEvent(this.owner, 'onmousedragout');
                     }
                 }
             }

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/services/Library.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/services/Library.lzs	2008-05-02 14:57:56 UTC (rev 8976)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/services/Library.lzs	2008-05-02 16:09:55 UTC (rev 8977)
@@ -25,12 +25,9 @@
 
 #include "services/LzKeys.lzs"
 if ($js1) {
-    #include "services/platform/dhtml/LzModeManager.js"
     #include "services/platform/dhtml/LzHistory.js"
 } else if ($swf9) {
-    #include "services/platform/swf9/LzModeManager.js"
 } else if ($as2) {
-    #include "services/platform/swf/LzModeManager.as"
     #include "services/platform/swf/LzHistory.as"
 } else {
     Debug.error('services/Library.lzs unsupported runtime %s', $runtime);

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/services/LzModeManager.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/services/LzModeManager.lzs	2008-05-02 14:57:56 UTC (rev 8976)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/services/LzModeManager.lzs	2008-05-02 16:09:55 UTC (rev 8977)
@@ -47,7 +47,7 @@
   * @devnote Manages the modal states of views and also notifies views ( that have
   * registered with it ) when their focus has changed.
   */
-public class LzModeManagerBase extends LzNode {
+public class LzModeManagerService extends LzNode {
     /** Sent when the mode changes.
     * @lzxtype event
     * @access public
@@ -226,28 +226,31 @@
     }
 
     /**
+    * If a mouse event occurs in an input text field, find the focused view
     * @access private
     */
     function __findInputtextSelection( ){
-        return null;
+        return LzInputTextSprite.findSelection();
     }
 
     /**
     * @access private
-    * overridden by some implementations...
+    * receives mouse events from LzMouseKernel 
     */
-    function rawMouseEvent(me) {
-        if (me == 'onmousemove') {
+    function rawMouseEvent(eventname, view) {
+        if (eventname == 'onmousemove') {
             LzGlobalMouse.__mouseEvent('onmousemove', null); 
         } else {
-            this.handleMouseEvent( null , me );
+            this.handleMouseEvent( view , eventname );
         }
     }
+}
 
-    /**
-    * @access private
-    */
-    function handleMouseButton(view, eventName) {
-        this.handleMouseEvent( view , eventName );
-    }
+/**
+  * LzModeManager is a shortcut for <a href="LzModeManagerService.html">LzModeManagerService</a>.
+  */
+var LzModeManager = new LzModeManagerService();
+if ($swf9) {
+} else {
+    LzMouseKernel.setCallback(LzModeManager, 'rawMouseEvent');
 }

Deleted: openlaszlo/trunk/WEB-INF/lps/lfc/services/platform/dhtml/LzModeManager.js

Deleted: openlaszlo/trunk/WEB-INF/lps/lfc/services/platform/swf/LzModeManager.as

Deleted: openlaszlo/trunk/WEB-INF/lps/lfc/services/platform/swf9/LzModeManager.js

Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/SWFFile.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/SWFFile.java	2008-05-02 14:57:56 UTC (rev 8976)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/SWFFile.java	2008-05-02 16:09:55 UTC (rev 8977)
@@ -3,7 +3,7 @@
  * ****************************************************************************/
 
 /* J_LZ_COPYRIGHT_BEGIN *******************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.              *
+* Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.              *
 * Use is subject to license terms.                                            *
 * J_LZ_COPYRIGHT_END *********************************************************/
 
@@ -155,9 +155,9 @@
             ca.addAction(new ClipAction(ClipAction.KEY_DOWN, program(s)));
             s = "_root.LzKeyboardKernel.__keyboardEvent(Key.getCode(), 'onkeyup')";
             ca.addAction(new ClipAction(ClipAction.KEY_UP, program(s)));
-            s = "_root.LzMouseKernel.__mouseEvent('onmousedown')";
+            s = "_root.LzMouseKernel.rawMouseEvent('onmousedown')";
             ca.addAction(new ClipAction(ClipAction.MOUSE_DOWN, program(s)));
-            s = "_root.LzMouseKernel.__mouseEvent('onmouseup')";
+            s = "_root.LzMouseKernel.rawMouseEvent('onmouseup')";
             ca.addAction(new ClipAction(ClipAction.MOUSE_UP, program(s)));
             inst.actions = ca;
 
@@ -210,23 +210,23 @@
             but.addButtonRecord(new ButtonRecord(ButtonRecord.Up, rectShape, 1, at, new CXForm()));
             but.addButtonRecord(new ButtonRecord(states, rectShape, 1, at, new CXForm()));
             but.addActionCondition(ActionCondition.onPress(program(
-                "_root.LzModeManager.handleMouseButton( myView, 'onmousedown')")));
+                "_root.LzMouseKernel.handleMouseButton( myView, 'onmousedown')")));
             but.addActionCondition(ActionCondition.onRelease(program(
-                "_root.LzModeManager.handleMouseButton( myView, 'onmouseup');" + 
-                "_root.LzModeManager.handleMouseEvent( myView, 'onclick')")));
+                "_root.LzMouseKernel.handleMouseButton( myView, 'onmouseup');" + 
+                "_root.LzMouseKernel.handleMouseEvent( myView, 'onclick')")));
             but.addActionCondition(ActionCondition.onReleaseOutside(program(
-                "_root.LzModeManager.handleMouseButton( myView, 'onmouseup');" + 
-                "_root.LzModeManager.handleMouseEvent( myView, 'onmouseupoutside')")));
+                "_root.LzMouseKernel.handleMouseButton( myView, 'onmouseup');" + 
+                "_root.LzMouseKernel.handleMouseEvent( myView, 'onmouseupoutside')")));
             but.addActionCondition(ActionCondition.onRollOver(program(
-                "_root.LzModeManager.handleMouseEvent( myView, 'onmouseover')")));
+                "_root.LzMouseKernel.handleMouseEvent( myView, 'onmouseover')")));
             but.addActionCondition(ActionCondition.onRollOut(program(
-                "_root.LzModeManager.handleMouseEvent( myView, 'onmouseout')")));
+                "_root.LzMouseKernel.handleMouseEvent( myView, 'onmouseout')")));
             but.addActionCondition(ActionCondition.onDragOut(program(
-                "_root.LzModeManager.handleMouseEvent( myView, 'onmouseout');" + 
-                "_root.LzModeManager.handleMouseEvent( myView, 'onmousedragout')")));
+                "_root.LzMouseKernel.handleMouseEvent( myView, 'onmouseout');" + 
+                "_root.LzMouseKernel.handleMouseEvent( myView, 'onmousedragout')")));
             but.addActionCondition(ActionCondition.onDragOver(program(
-                "_root.LzModeManager.handleMouseEvent( myView, 'onmouseover');" + 
-                "_root.LzModeManager.handleMouseEvent( myView, 'onmousedragin')")));
+                "_root.LzMouseKernel.handleMouseEvent( myView, 'onmouseover');" + 
+                "_root.LzMouseKernel.handleMouseEvent( myView, 'onmousedragin')")));
             movieClip.getFrameAt(0).addInstance(but, 1, at, null, "but");
 
             // 7. A movieclip with the export identifier "swatch" which has a white 100x100 rectangle.



More information about the Laszlo-checkins mailing list