[Laszlo-checkins] r11879 - in openlaszlo/trunk: WEB-INF/lps/lfc WEB-INF/lps/lfc/compiler WEB-INF/lps/lfc/controllers WEB-INF/lps/lfc/core WEB-INF/lps/lfc/debugger WEB-INF/lps/lfc/events WEB-INF/lps/lfc/helpers WEB-INF/lps/lfc/kernel WEB-INF/lps/lfc/kernel/swf9 WEB-INF/lps/lfc/services WEB-INF/lps/lfc/views WEB-INF/lps/server/src/org/openlaszlo/compiler WEB-INF/lps/server/src/org/openlaszlo/sc WEB-INF/lps/server/src/org/openlaszlo/servlets/responders lps/components/debugger lps/components/extensions lps/components/extensions/av lps/components/lztest lps/components/lzunit

hqm@openlaszlo.org hqm at openlaszlo.org
Tue Nov 25 08:38:56 PST 2008


Author: hqm
Date: 2008-11-25 08:38:37 -0800 (Tue, 25 Nov 2008)
New Revision: 11879

Removed:
   openlaszlo/trunk/WEB-INF/lps/lfc/views/LzViewLinkage.js
Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/LaszloLibrary.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/buildlfc
   openlaszlo/trunk/WEB-INF/lps/lfc/buildlfcbacktrace
   openlaszlo/trunk/WEB-INF/lps/lfc/buildlfcdebug
   openlaszlo/trunk/WEB-INF/lps/lfc/buildlfcprofile
   openlaszlo/trunk/WEB-INF/lps/lfc/compiler/Library.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzBootstrapDebugService.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzMessage.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzRuntime.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/controllers/LaszloLayout.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/core/Library.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/core/LzDefs.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/core/LzEventable.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/debugger/Library.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzDebug.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzMessage.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/debugger/swf9stubs.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/events/LaszloEvents.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/helpers/Library.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/Library.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LFCApplication.as
   openlaszlo/trunk/WEB-INF/lps/lfc/services/Library.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/services/LzAudio.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/services/LzBrowser.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/services/LzHistory.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/services/LzKeys.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/services/LzModeManager.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/views/Library.lzs
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/CompilationEnvironment.java
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/Compiler.java
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/ImportCompiler.java
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/Main.java
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/SWF9Writer.java
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/lzsc.java
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/servlets/responders/ResponderEVAL.java
   openlaszlo/trunk/lps/components/debugger/debugger.lzx
   openlaszlo/trunk/lps/components/extensions/av/mediadevice.lzx
   openlaszlo/trunk/lps/components/extensions/av/mediastream.lzx
   openlaszlo/trunk/lps/components/extensions/av/rtmpconnection.lzx
   openlaszlo/trunk/lps/components/extensions/av/videoview.lzx
   openlaszlo/trunk/lps/components/extensions/drawview.lzx
   openlaszlo/trunk/lps/components/lztest/lztestmanager.lzx
   openlaszlo/trunk/lps/components/lzunit/lzunit.lzx
Log:
Change 20081125-hqm-p by hqm at badtzmaru.home on 2008-11-25 11:36:43 EST
    in /Users/hqm/openlaszlo/trunk4
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary:  partial support for flash 10 runtime

New Features:

Bugs Fixed: LPP-7388

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

Documentation:

Release Notes:

Details:

+ set $as3 as a compiler constant, when runtime is swf9 or swf10

+ replace "if ($swf9) ..."  with "if ($as3) ..." in LFC and lps/components

Tests:
smoketest in swf8,swf9,dhtml

lzpix  in swf8,swf9,dhtml

make sure debugger evaluate still works in swf9



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/LaszloLibrary.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/LaszloLibrary.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/LaszloLibrary.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -15,7 +15,7 @@
 // If profiling, we need to define this early, because the class
 // runtime will attempt to use it
 if ($profile) {
-  if ($swf9) {
+  if ($as3) {
   } else {
 #include "profiler/LzProfile.lzs"
   }
@@ -33,7 +33,7 @@
 }
 
 if ($profile) {
-  if ($swf9) {
+  if ($as3) {
   } else {
   // Default is to start the Profiler ASAP, and stop it in
   // canvas.init, so you can profile startup time.  If that is not
@@ -55,7 +55,7 @@
 #include "data/Library.lzs"
 #include "services/Library.lzs"
 
-if ($swf9) {
+if ($as3) {
   //Debugger placeholder
   #include "debugger/swf9stubs.lzs"
     // Initialize the DojoExternalInterface class

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/buildlfc
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/buildlfc	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/buildlfc	2008-11-25 16:38:37 UTC (rev 11879)
@@ -16,7 +16,7 @@
 if [ "$runtime" == "dhtml" ]; then
     suffix="js"
 fi
-if [ "$runtime" == "swf9" ]; then
+if [ "$runtime" == "swf9" || "$runtime" == "swf10" ]; then
     options="${options} --option buildSharedLibrary=true --option SWF9MainClassName=LFCApplication \
      --option SWF9WrapperClassName=LzSpriteApplication "
     suffix="swc"

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/buildlfcbacktrace
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/buildlfcbacktrace	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/buildlfcbacktrace	2008-11-25 16:38:37 UTC (rev 11879)
@@ -6,7 +6,7 @@
 # will conditionally compile in the debug aspects of LaszloLibrary
 
 # * P_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.                                          *
 # * P_LZ_COPYRIGHT_END ********************************************************
 
@@ -22,8 +22,9 @@
 if [ "$runtime" == "dhtml" ]; then
     suffix="js"
 fi
-if [ "$runtime" == "swf9" ]; then
-    options="${options} --option buildSharedLibrary=true"
+if [ "$runtime" == "swf9" || "$runtime" == "swf10"]; then
+    options="${options} --option buildSharedLibrary=true"  --option SWF9MainClassName=LFCApplication \
+     --option SWF9WrapperClassName=LzSpriteApplication "
     suffix="swc"
 fi
 

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/buildlfcdebug
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/buildlfcdebug	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/buildlfcdebug	2008-11-25 16:38:37 UTC (rev 11879)
@@ -22,7 +22,7 @@
 if [ "$runtime" == "dhtml" ]; then
     suffix="js"
 fi
-if [ "$runtime" == "swf9" ]; then
+if [ "$runtime" == "swf9" || "$runtime" == "swf10" ]; then
     options="${options} -g --option buildSharedLibrary=true --option SWF9MainClassName=LFCApplication \
     --option SWF9WrapperClassName=LzSpriteApplication "
     suffix="swc"

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/buildlfcprofile
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/buildlfcprofile	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/buildlfcprofile	2008-11-25 16:38:37 UTC (rev 11879)
@@ -16,8 +16,9 @@
 if [ "$runtime" == "dhtml" ]; then
     suffix="js"
 fi
-if [ "$runtime" == "swf9" ]; then
-    options="${options} --option buildSharedLibrary=true"
+if [ "$runtime" == "swf9" || "$runtime" == "swf10"]; then
+    options="${options} --option buildSharedLibrary=true"  --option SWF9MainClassName=LFCApplication \
+     --option SWF9WrapperClassName=LzSpriteApplication "
     suffix="swc"
 fi
 ant -Dlfc.output=${output:-LFC${runtime#swf}-profile.${suffix:-"lzl"}} -Dlfc.runtime=${runtime} -Dlfc.source=LaszloLibrary.lzs \

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/compiler/Library.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/compiler/Library.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/compiler/Library.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -16,7 +16,7 @@
 
 // Basic runtime and stubs
 #include "compiler/LzRuntime.lzs"
-if ($swf9) {
+if ($as3) {
 } else {
 // Class runtime for js1 runtimes, must load before BootstrapDebugService
 // TODO [2007-12-17 ptw] Move to platform/js1

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzBootstrapDebugService.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzBootstrapDebugService.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzBootstrapDebugService.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -209,7 +209,7 @@
     var url:String;
   }
 
-if ($swf9) {
+if ($as3) {
   function log (msg) { trace (msg); }
 } else {
   /**
@@ -294,7 +294,7 @@
     if (console == null) {
       console = new LzBootstrapDebugConsole();
     }
-    if (!$swf9) {
+    if (!$as3) {
       // Copy these from the initial Debug object
       var copy = {backtraceStack: true, uncaughtBacktraceStack: true};
       for (var k in copy) {
@@ -526,13 +526,13 @@
  * @devnote As soon as we have the LzBootstrapDebugService, we install it.
  * This will get overridden by the full debugger when it loads
  */
-if ($swf9) {
-  // We don't do the bootstrapping rebinding in swf9
+if ($as3) {
+  // We don't do the bootstrapping rebinding in as3
 } else {
   var Debug = new LzBootstrapDebugService();
 }
 
-if ($swf9) {
+if ($as3) {
 } else {
   /**
  * @access private

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzMessage.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzMessage.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzMessage.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -136,9 +136,9 @@
   };
 };
 
-if ($swf9) {
+if ($as3) {
     if ($debug) {
-        // we don't need to do this bootstrapping rebinding of LzMessage in swf9, LzMessage is declared in
+        // we don't need to do this bootstrapping rebinding of LzMessage in as3, LzMessage is declared in
         // debugger/LzMessage.lzs
     } else {
         class LzMessage extends LzBootstrapMessage {

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzRuntime.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzRuntime.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzRuntime.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -18,13 +18,13 @@
 /**
  * Define runtime module
  */
-if ($swf9) {
+if ($as3) {
 $modules.runtime = global;
 } else {
 $modules.runtime = this;
 }
 
-if ($swf9) {
+if ($as3) {
 
 } else {
 
@@ -46,7 +46,7 @@
  * Define global
  * TODO [2006-03-12 ptw] if the LFC is shared this needs to be multiplexed
  */
-if ($swf9) {
+if ($as3) {
   // Shadow table `global`, used to support `globalValue`.  Cf.,
   // compiler.NodeModel.buildIdBinderBody
   // TODO: [2008-10-21 ptw] Use flex.utils.Dictionary if you can
@@ -85,7 +85,7 @@
  *
  * N.B. we need to declare the function globalValue() as a 'var', 
  * because that's the only way right now to get the script compiler to
- * put it at the top level in the swf9 intermediate .as files, outside
+ * put it at the top level in the as3 intermediate .as files, outside
  * of the LFCApplication.
  */
 var globalValue = function (name:String) {

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/controllers/LaszloLayout.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/controllers/LaszloLayout.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/controllers/LaszloLayout.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -146,15 +146,7 @@
     super.construct.apply(this, arguments);
     this.subviews = new Array;
 
-    // TODO [hqm 2008-03] this is a hack to cast to type LzView for
-    // the SWF9 compiler, until the compiler is taught to understand
-    // type casting DHTML/SWF8
-    if ($swf9) {
-        this.vip = LzView(this.immediateparent);
-    } else {
-        this.vip = this.immediateparent;
-    }
-    
+    this.vip = (this.immediateparent cast LzView);
 
     // view.layouts: If it doesn't already exist, layouts create an array
     //in the view that it attaches to that hold the list of layouts attached

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/core/Library.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/core/Library.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/core/Library.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -16,7 +16,7 @@
 #include "core/PresentationTypes.lzs"
 #include "core/LzNode.lzs"
 
-if ($swf9) {
+if ($as3) {
 } else {
     #include "core/UserClass.lzs"
 }

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/core/LzDefs.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/core/LzDefs.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/core/LzDefs.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -181,7 +181,7 @@
   * overhead of a slower implementation, use LzDictionary).
   * @access private
   */
-if ($swf9) {
+if ($as3) {
 dynamic class LzInheritedHash extends Dictionary {
     #passthrough (toplevel:true) {
 import flash.utils.Dictionary;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/core/LzEventable.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/core/LzEventable.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/core/LzEventable.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -147,7 +147,7 @@
   // TODO: [2008-05-08 ptw] (LPP-5934) When toString is declared
   // public, remove this.  For now, this acts to trampoline `String(...)`
   // and `'' + ...` to our private toString methods
-  if ($swf9) {
+  if ($as3) {
     /** @access private */
     prototype.toString = function () { return this.toString(); }
   }

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -52,7 +52,7 @@
   /** @access private */
   var animators:Array = null;
 
-  if ($swf9) {
+  if ($as3) {
     ///////////////////////////////////////////////////////////////////
     // TODO [hqm 2008-01]  This won't work for adding methods that
     // call super(). Need to make those real compile time methods (and setters).
@@ -1196,7 +1196,7 @@
     // TODO: [2005-03-24 ptw] Remove this if we ever enable
     // warnings in the LFC as this will be redundant
     if ($debug) {
-      if ($swf9) {
+      if ($as3) {
         var ok = (x is Class);
       } else {
         var ok = (x is Function);
@@ -1589,7 +1589,7 @@
    * @param String name: A string to use for the name of this node.
    */
   function $lzc$set_name ( name:String ){
-    if ($swf9) {
+    if ($as3) {
       // Don't need runtime type-check
     } else if (! ((name === null) || (typeof name == 'string'))) {
       if ($debug) {
@@ -1823,7 +1823,7 @@
     // inherited from your class, nor the default empty one inherited
     // from LzNode!
 
-    // TODO [hqm 2008-03] Will this work in swf9????
+    // TODO [hqm 2008-03] Will this work in as3????
     if (this.options === this['constructor'].prototype.options) {
       this.options = new LzInheritedHash(this.options);
     }
@@ -1932,7 +1932,6 @@
       sview = sview.immediateparent;
 
       if ($debug) {
-        // TODO [hqm 2008-02] put this check in a $debug, when that is working for swf9
         if (sview == null) {
           Debug.error('searchParents got null immediateparent', this);
           return;
@@ -1992,7 +1991,7 @@
     super.destroy();
 
     //don't allow a call on this method if I'm deleted
-    if ($swf9) {
+    if ($as3) {
       // TODO [hqm 2008-03]
       // flex compiler gives error if you assign a function to null, what do we do here?
     } else {
@@ -2152,20 +2151,6 @@
     }
   }
 
-  //+++++ Wacky class stuff
-
-  if ($swf9) {
-    // TODO [hqm 2008-03] This is just a debugging print utility function for swf9
-    /** @access private */
-    public static function objAsString(obj) {
-      var s = "";
-      for (var k in obj) {
-        s+= k +": "+obj[k];
-        s+=", ";
-      }
-      return s;
-    }
-  }
   /**
    * @access private
    * setter for $datapath

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/debugger/Library.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/debugger/Library.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/debugger/Library.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -33,13 +33,13 @@
     #include "debugger/platform/dhtml/LzDebug.js"
   } else if ($as2) {
     #include "debugger/platform/swf/LzDebug.as"
-  } else if ($swf9) {
+  } else if ($as3) {
     #include "debugger/platform/swf9/LzDebug.as"
     #include "debugger/platform/swf9/LzFlashRemote.as"
     #include "debugger/platform/swf9/LzDebuggerWindowConsoleBridge.as"
   }
 
-  if ($swf9) {
+  if ($as3) {
     // we're not doing backtrace, trace, or monitor in swf9 yet
     // Make backtraces placeholder
     #include "debugger/platform/swf9/LzBacktrace.as"
@@ -59,7 +59,7 @@
     // Order beyond here has not been thought about (yet)
     #include "debugger/platform/swf/LzRemote.as"
     #include "debugger/platform/swf/LzFlashRemote.as"
-  } else if ($swf9) {
+  } else if ($as3) {
 
     // #include "debugger/platform/swf9/LzFlashRemote.as"
   }

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzDebug.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzDebug.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzDebug.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -40,7 +40,7 @@
     super(base ? base.logger : null, base ? base.console : null);
     this.base = base;
     // Preserve any state created in the base service
-    if (!$swf9) {
+    if (!$as3) {
       var copy = {backtraceStack: true, uncaughtBacktraceStack: true};
       for (var k in copy) {
         this[k] = base[k];
@@ -1237,7 +1237,7 @@
   function caseInsensitiveOrdering (a:String, b:String):Number {
     var al = a.toLowerCase();
     var bl = b.toLowerCase();
-    if ($swf9) {
+    if ($as3) {
       return al.localeCompare(bl);
     } else {
       return (al > bl) - (al < bl);
@@ -1523,7 +1523,7 @@
 }
 
 
-if ($swf9) {
+if ($as3) {
 
 } else {
 /**

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzMessage.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzMessage.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzMessage.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -23,7 +23,7 @@
  * @devnote A Message would like to be a subclass of string, but
  * mutable.  Since few runtimes would permit that, we have to play
  * games.  We can't declare the `message` parameter as String, because
- * some runtimes (swf9) will coerce a message to String when passing
+ * some runtimes (as3) will coerce a message to String when passing
  * it as an argument, making concatenation of messages fail.
  */
 class LzDebugMessage extends LzBootstrapMessage {
@@ -142,7 +142,7 @@
     for (var i = 0; i < len; i++) {
       var arg = args[i];
       // annotate objects and things you have ID'd
-      // Don't treat String's as Objects (in swf9, all strings are Strings!)
+      // Don't treat String's as Objects (in as3, all strings are Strings!)
       if ((! ((arg is String) && (arg['constructor'] === String))) &&
           ((arg is Object) || Debug.isObjectLike(arg) || (Debug.IDForObject(arg) != null))) {
         // pretty, no limit, but unique; for write-compatibility
@@ -208,7 +208,7 @@
   // ASSetPropFlags(LzMessage.prototype, null, 1);
 };
 
-if ($swf9) {
+if ($as3) {
   class LzMessage extends LzDebugMessage {
     function LzMessage (message=null) {
       super(message);
@@ -246,7 +246,7 @@
   static var color = '#000000';
 
 
-  if ($swf9) {
+  if ($as3) {
     function LzSourceMessage (file:String=null, line:Number=0, message='') {
       this.file = file;
       this.line = line;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/debugger/swf9stubs.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/debugger/swf9stubs.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/debugger/swf9stubs.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -25,9 +25,6 @@
     public function write(...args):void {
         var str = this.formatToString.apply(this, args);
         trace(str);
-        if ($debug)  {
-          LFCApplication.write(str);
-        }
     }
     public function inspect(...args):void {
       this.write('INSPECT: ' + this.formatToString.apply(this, args));

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/events/LaszloEvents.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/events/LaszloEvents.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/events/LaszloEvents.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -98,7 +98,7 @@
    */
   public function LzDelegate (context:LzEventable, methodName:String, eventSender:LzEventable = null, eventName:String = null) {
     super();
-    if ($swf9) {
+    if ($as3) {
       // This type-check is superfluous in JS2, but we want it as an
       // aid to portability in JS1
     } else if (context is LzEventable) {
@@ -189,7 +189,7 @@
   *
   */
   public function register ( eventSender:LzEventable , eventName:String) {
-    if ($swf9) {
+    if ($as3) {
       // This type-check is superfluous in JS2, but we want it as an
       // aid to portability in JS1
     } else if (eventSender is LzEventable) {
@@ -213,7 +213,7 @@
         Debug.warn("Invalid delegate: %#w (must accept one argument to handle %w.%s)",
                    m, eventSender, eventName);
       }
-      if ($swf9) {
+      if ($as3) {
         var a = new Array(m.length);
         this.m = function (ignore:*) { return m.apply(this, a); }
       }

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/helpers/Library.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/helpers/Library.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/helpers/Library.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -13,7 +13,7 @@
 #include "helpers/LzCommand.lzs"
 
 if ($as2) {
-} else if ($swf9) {
+} else if ($as3) {
 } else if ($js1) {
 } else {
     Debug.error('helpers/Library.lzs unsupported runtime %s', $runtime);

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/Library.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/Library.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/Library.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -7,7 +7,7 @@
   * @access private
   */
 
-if ($swf9) {
+if ($as3) {
 } else {
     #include "kernel/LzIdleKernel.lzs"
 }
@@ -17,7 +17,7 @@
 
 
 //#include "kernel/LzRequires.lzs"
-if ($swf9) {
+if ($as3) {
     #include "kernel/swf9/Library.lzs"
 } else if ($dhtml) {
     #include "kernel/dhtml/Library.lzs"

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LFCApplication.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LFCApplication.as	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LFCApplication.as	2008-11-25 16:38:37 UTC (rev 11879)
@@ -153,7 +153,7 @@
             // Send EVAL request to LPS server
             // It doesn't matter what path/filename we use, as long as it has ".lzx" suffix, so it is
             // handled by the LPS. The lzt=eval causes the request to be served by the EVAL Responder.
-            var url = "hello.lzx?lzr=swf9&lz_load=false&lzt=eval&lz_script=" + encodeURIComponent(expr)+"&lzbc=" +(new Date()).getTime();
+            var url = "hello.lzx?lzr=" + $runtime + "&lz_load=false&lzt=eval&lz_script=" + encodeURIComponent(expr)+"&lzbc=" +(new Date()).getTime();
             debugloader.load(new URLRequest(url),
                              new LoaderContext(false,
                                                new ApplicationDomain(ApplicationDomain.currentDomain)));

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/services/Library.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/services/Library.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/services/Library.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -21,7 +21,7 @@
 
 #include "services/LzKeys.lzs"
 if ($js1) {
-} else if ($swf9) {
+} else if ($as3) {
 } else if ($as2) {
 } else {
     Debug.error('services/Library.lzs unsupported runtime %s', $runtime);

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/services/LzAudio.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/services/LzAudio.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/services/LzAudio.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -26,7 +26,7 @@
   */
 public final class LzAudioService {
     // TODO [hqm 2008-03] Will asking for LzSprite.prototype.xxx  work in SWF9?
-    if ($swf9) {
+    if ($as3) {
         /** @access private */
         var capabilities :* = LzSprite.capabilities;
     } else {

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/services/LzBrowser.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/services/LzBrowser.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/services/LzBrowser.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -32,7 +32,7 @@
  */
 public final class LzBrowserService {
     // TODO [hqm 2008-03] Will asking for LzSprite.prototype.xxx  work in SWF9?
-    if ($swf9) {
+    if ($as3) {
         /** @access private */
         var capabilities :* = LzSprite.capabilities;
     } else {

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/services/LzHistory.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/services/LzHistory.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/services/LzHistory.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -69,7 +69,7 @@
 /** @access private */
 var __lzcurrstate = {};
 // TODO [hqm 2008-03] Will asking for LzSprite.prototype.xxx  work in SWF9?
-if ($swf9) {
+if ($as3) {
 /** @access private */
     var capabilities = LzSprite.capabilities;
 } else {

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/services/LzKeys.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/services/LzKeys.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/services/LzKeys.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -55,7 +55,7 @@
         //    if (LzKeysService.LzKeys) {
         //      throw new Error("There can be only one LzKeys");
         //    }
-        if ($swf9) {
+        if ($as3) {
         } else {
             LzKeyboardKernel.setCallback(this, '__keyEvent');
         }
@@ -376,7 +376,7 @@
         //Debug.write("enableEnter: "+onroff);
         // SWF-specific
         if ($debug) Debug.write('lz.Keys.enableEnter not yet defined');
-        // TODO [hqm 2008-01] What is the way to do this in SWF9 ??
+        // TODO [hqm 2008-01] What is the way to do this in AS3 ??
         /*   _root.entercontrol.gotoAndStop( onroff ? 1 : 2 );
          */
     }

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/services/LzModeManager.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/services/LzModeManager.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/services/LzModeManager.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -89,7 +89,7 @@
         //    if (LzModeManagerService.LzModeManager) {
         //      throw new Error("There can be only one LzModeManager");
         //    }
-        if ($swf9) {
+        if ($as3) {
         } else {
             LzMouseKernel.setCallback(this, 'rawMouseEvent');
         }
@@ -169,7 +169,7 @@
             var mView = this.modeArray[ i ];
             // exclude the debugger from the mode
             if ($debug) {
-                if ($as2 || $swf9) {
+                if ($as2 || $as3) {
                     if (this.remotedebug == null) {
                         this.remotedebug = (lz.Browser.getInitArg("lzconsoledebug") == "true");
                     }
@@ -177,7 +177,7 @@
                 if ($as2) {
                     if (!this.remotedebug && view.childOf(Debug.console))
                         break;
-                } else if ($swf9) {
+                } else if ($as3) {
                     if (!this.remotedebug && view.childOf(Debug.console.window))
                         break;
                 } else if ($dhtml) {
@@ -219,7 +219,7 @@
     /** @access private */
     function __LZallowInput (modalview:LzView, input:LzInputText) :Boolean {
         if ($debug) {
-            if ($as2 || $swf9) {
+            if ($as2 || $as3) {
                 if (this.remotedebug == null) {
                     this.remotedebug = (lz.Browser.getInitArg("lzconsoledebug") == "true");
                 }
@@ -227,7 +227,7 @@
             if ($as2) {
                 if (!this.remotedebug && input.childOf(Debug.console))
                     return true;
-            } else if ($swf9) {
+            } else if ($as3) {
                 if (!this.remotedebug && input.childOf(Debug.console.window))
                     return true;
             } else if ($dhtml) {

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -188,7 +188,7 @@
         this.__makeSprite(null);
 
         // TODO [hqm 2008-04] how can we make this consistent across runtimes ? 
-        if ($swf9) {
+        if ($as3) {
             var capabilities = LzSprite.capabilities;
         } else {
             var capabilities = LzSprite.prototype.capabilities;
@@ -338,7 +338,7 @@
             }
         }
 
-        if ($swf9) {
+        if ($as3) {
             // Set the canvas width/height to good initial values.
             // TODO: ensure these can be read correctly from the embed tag
             this.sprite.setWidth(this.width);
@@ -537,7 +537,7 @@
   */
 override function $lzc$set_resource( v ) {
 
-    if ($swf9) {
+    if ($as3) {
         //
     } else {
         Object.error("You can't set a resource for the canvas.");
@@ -594,7 +594,7 @@
     // Canvas-only: This is so the canvas sprite knows when to show its children and 
     this.sprite.init(true);
 
-    if ($swf9) {
+    if ($as3) {
         //trace("LzCanvas.init called");
         // cheapo debugger printing
         sprite.addChild(lzconsole.consoletext);
@@ -761,7 +761,7 @@
   * Install default menu items for the right-mouse-button 
   * @param LzContextMenu cmenu: LzContextMenu to install on this view
   */
-function setDefaultContextMenu ( cmenu ){
+    function setDefaultContextMenu ( cmenu ){
     this.setContextMenu(cmenu);
     this.sprite.setDefaultContextMenu( cmenu );
 }

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -406,7 +406,7 @@
 var DOUBLE_CLICK_TIME = 500;
 
 // TODO [hqm 2008-03] Will asking for LzSprite.prototype.xxx  work in SWF9?
-if ($swf9) {
+if ($as3) {
     /** @access private */
     var capabilities = LzSprite.capabilities;
 } else {
@@ -434,11 +434,7 @@
 
     var vip:LzView = (this.immediateparent cast LzView);
 
-    // TODO [hqm 2008-03] this was not needed in dhtml/swf8, in what
-    // case is immediateparent coming up null in swf9?
-    if (ip) {
-        this.mask = ip.mask;
-    }    
+    this.mask = ip.mask;
 
     this.__makeSprite(args);
 
@@ -502,10 +498,6 @@
 override function init( ) {
     if (this.sprite) {
         this.sprite.init(this.visible);
-    } else {
-        // TODO [hqm 2008-03] I put this in for a bug I was seeing
-        // swf9, need to see if it is still happening
-        Debug.warn("LzView init method called and this.sprite is null", this);
     }
 }
 
@@ -520,13 +512,8 @@
 
     if (this.sprite) {
         this.sprite.addChildSprite(s.sprite);
-    } else {
-        // TODO [hqm 2008-03] I put this in for a bug I was seeing
-        // swf9, need to see if it is still happening
-        Debug.warn("LzView.addSubview called when this.sprite is null", this);
     }
 
-
     // Don't use the prototype's default subviews array, it is a
     // sentinel which lives on the prototype and is shared by all
     // instances, make a new one if you want to push a view.
@@ -555,10 +542,7 @@
     var vip:LzView = (this.immediateparent cast LzView);
     if (vip) {
         (vip).addSubview( this );
-    } else {
-        // TODO [hqm 2008-03] This is to trace a bug of null immediateparent seen in swf9 initialize
-        Debug.warn("LaszloView.__LZinstantiationDone immediateparent = null", this);
-    }
+    } 
 
     //this.callInherited( '__LZinstantiationDone' , arguments.callee );
     super.__LZinstantiationDone.apply(this, arguments);

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/views/Library.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/views/Library.lzs	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/views/Library.lzs	2008-11-25 16:38:37 UTC (rev 11879)
@@ -10,14 +10,7 @@
 #include "views/LaszloView.lzs"
 #include "views/LzText.lzs"
 #include "views/LzInputText.lzs"
-
-if($swf9) {
-    #include "views/LzViewLinkage.js"
-} else {
-    #include "views/LzViewLinkage.lzs"
-}
-
+#include "views/LzViewLinkage.lzs"
 #include "views/LaszloCanvas.lzs"
-
 #include "views/LzScript.lzs"
 

Deleted: openlaszlo/trunk/WEB-INF/lps/lfc/views/LzViewLinkage.js

Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java	2008-11-25 16:38:37 UTC (rev 11879)
@@ -175,7 +175,7 @@
 
     // TODO: [2008-06-02 ptw] This should be moved to the JS2 back-end
     // Build the constructor trampoline
-    if ("swf9".equals(env.getRuntime())) {
+    if (env.isAS3()) {
       String body = "";
       body += "super($lzc$parent, $lzc$attrs, $lzc$children, $lzc$async);\n";
       nodeModel.setAttribute(

Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/CompilationEnvironment.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/CompilationEnvironment.java	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/CompilationEnvironment.java	2008-11-25 16:38:37 UTC (rev 11879)
@@ -434,15 +434,15 @@
 
     /** By pointing at the main SWFWriter, this makes the resources
         compile into the main app. We have to do this because we
-        haven't figured out a way to get Flash to attach individual
+        haven't figured out a way to get Flash 8 to attach individual
         exported assets from a runtime loaded library into views in
         the main app.
      * @return the object writer
      */
 
     ObjectWriter getResourceGenerator() {
-        if (this.getRuntime().equals("swf9")) {
-            // For swf9, we can embed the resource into the library
+        if (isAS3()) {
+            // For as3, we can embed resources into loadable libraries.
             return mObjectWriter;
         } else {
             return mMainObjectWriter;
@@ -509,6 +509,10 @@
         return getProperty(RUNTIME_PROPERTY, mDefaultRuntime);
     }
 
+    public boolean isAS3() {
+        return Compiler.AS3_RUNTIMES.contains(getProperty(RUNTIME_PROPERTY));
+    }
+
     public String getRuntime(String defaultVersion) {
         return getProperty(RUNTIME_PROPERTY, defaultVersion);
     }
@@ -667,11 +671,9 @@
     // [TODO hqm 01/06] this should be keyed off of the 'lzr' runtime
     // arg, it should return true for lzr=dhtml
     public boolean isDHTML() {
-
-        if (this.getRuntime().equals("swf9")) {
+        if (isAS3()) {
             return false;
         }
-        
         return Compiler.SCRIPT_RUNTIMES.contains(this.getRuntime());
     }
 

Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/Compiler.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/Compiler.java	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/Compiler.java	2008-11-25 16:38:37 UTC (rev 11879)
@@ -36,11 +36,15 @@
     public static Logger SchemaLogger = Logger.getLogger("schema");
     
     public static List KNOWN_RUNTIMES =
-        Arrays.asList(new String[] {"swf7", "swf8", "swf9", "dhtml", "j2me", "svg", "null"});
+        Arrays.asList(new String[] {"swf7", "swf8", "swf9", "swf10", "dhtml", "j2me", "svg", "null"});
     public static List SCRIPT_RUNTIMES =
-        Arrays.asList(new String[] {"swf9", "dhtml", "j2me", "svg", "null"});
+        Arrays.asList(new String[] {"swf10", "swf9", "dhtml", "j2me", "svg", "null"});
     public static List SWF_RUNTIMES =
         Arrays.asList(new String[] {"swf7", "swf8"});
+    public static List AS3_RUNTIMES =
+        Arrays.asList(new String[] {"swf9", "swf10"});
+
+
     
     /** Called to resolve file references (<code>src</code>
      * attributes).
@@ -137,7 +141,7 @@
 
     public static String getObjectFileExtensionForRuntime (String runtime) {
         String ext;
-        if ("swf9".equals(runtime)) {
+        if (AS3_RUNTIMES.contains(runtime)) {
             ext = ".lzr=" + runtime + ".swf";
         } else {
             ext = SCRIPT_RUNTIMES.contains(runtime) ? ".js" : ".lzr=" + runtime + ".swf";
@@ -226,7 +230,7 @@
         // Must be kept in sync with server/sc/lzsc.py compile
         if ("null".equals(runtime)) {
             return new NullWriter(props, ostr, mMediaCache, true, env);
-        } else if ("swf9".equals(runtime)) {
+        } else if (env.isAS3()) {
             return new SWF9Writer(props, ostr, mMediaCache, true, env);            
         } else if (SCRIPT_RUNTIMES.contains(runtime)) {
             return new DHTMLWriter(props, ostr, mMediaCache, true, env);
@@ -436,7 +440,8 @@
             compileTimeConstants.put("$swf8", Boolean.valueOf("swf8".equals(runtime)));
             compileTimeConstants.put("$as2", Boolean.valueOf(Arrays.asList(new String[] {"swf7", "swf8"}).contains(runtime)));
             compileTimeConstants.put("$swf9", Boolean.valueOf("swf9".equals(runtime)));
-            compileTimeConstants.put("$as3", Boolean.valueOf(Arrays.asList(new String[] {"swf9"}).contains(runtime)));
+            compileTimeConstants.put("$swf10", Boolean.valueOf("swf10".equals(runtime)));
+            compileTimeConstants.put("$as3", Boolean.valueOf(env.isAS3()));
             compileTimeConstants.put("$dhtml", Boolean.valueOf("dhtml".equals(runtime)));
             compileTimeConstants.put("$j2me", Boolean.valueOf("j2me".equals(runtime)));
             compileTimeConstants.put("$svg", Boolean.valueOf("svg".equals(runtime)));            
@@ -574,21 +579,22 @@
     }
 
 
-    public void compileAndWriteToSWF9 (String script, String seqnum, OutputStream out) {
+    public void compileAndWriteToAS3 (String script, String runtime, String seqnum, OutputStream out) {
         try {
             Properties props = new Properties();
-            props.setProperty(CompilationEnvironment.RUNTIME_PROPERTY, "swf9");
+            props.setProperty(CompilationEnvironment.RUNTIME_PROPERTY, runtime);
             props.setProperty("canvasWidth", "1000");
             props.setProperty("canvasHeight", "600");
             Map compileTimeConstants = new HashMap();
             compileTimeConstants.put("$debug", new Boolean(true));
             compileTimeConstants.put("$profile", new Boolean(false));
             compileTimeConstants.put("$backtrace", new Boolean(false));
-            compileTimeConstants.put("$runtime", "swf9");
+            compileTimeConstants.put("$runtime", runtime);
             compileTimeConstants.put("$swf7", Boolean.valueOf(false));
             compileTimeConstants.put("$swf8", Boolean.valueOf(false));
             compileTimeConstants.put("$as2", Boolean.valueOf(false));
-            compileTimeConstants.put("$swf9", Boolean.valueOf(true));
+            compileTimeConstants.put("$swf9", Boolean.valueOf("swf9".equals(runtime)));
+            compileTimeConstants.put("$swf10", Boolean.valueOf("swf10".equals(runtime)));
             compileTimeConstants.put("$as3", Boolean.valueOf(true));
             compileTimeConstants.put("$dhtml", Boolean.valueOf(false));
             compileTimeConstants.put("$j2me", Boolean.valueOf(false));

Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/ImportCompiler.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/ImportCompiler.java	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/ImportCompiler.java	2008-11-25 16:38:37 UTC (rev 11879)
@@ -92,7 +92,7 @@
             String libprefix = mEnv.getLibPrefix();
             String runtime = mEnv.getProperty(mEnv.RUNTIME_PROPERTY);
             String extension = ".swf";
-            if ("swf9".equals(runtime)) {
+            if (mEnv.isAS3()) {
                 extension = ".swf";
             } else if (Compiler.SCRIPT_RUNTIMES.contains(runtime)) {
                 extension = ".js";
@@ -152,7 +152,7 @@
                 ObjectWriter writer;
 
                 String runtime = env.getProperty(env.RUNTIME_PROPERTY);
-                if ("swf9".equals(runtime)) {
+                if (env.isAS3()) {
                     props.setProperty(org.openlaszlo.sc.Compiler.SWF9_LOADABLE_LIB, "true");
                     writer = new SWF9Writer(props, ostream, env.getMediaCache(), false, env);
                 } else if (Compiler.SCRIPT_RUNTIMES.contains(runtime)) {

Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/Main.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/Main.java	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/Main.java	2008-11-25 16:38:37 UTC (rev 11879)
@@ -41,8 +41,8 @@
         "  Location of media cache directory (default <lps>/work/cache/cmcache)",
         "",
         "Output options:",
-        "--runtime=[swf7|swf8|swf9|dhtml|j2me|svg|null]",
-        "  Compile to swf7, swf8, swf9, dhtml, j2me, svg, null",
+        "--runtime=[swf7|swf8|swf9|swf10|dhtml|j2me|svg|null]",
+        "  Compile to swf7, swf8, swf9, swf10, dhtml, j2me, svg, null",
         "--dir outputdir",
         "  Output directory.",
         "-c | --compile",

Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java	2008-11-25 16:38:37 UTC (rev 11879)
@@ -280,7 +280,7 @@
       if (canHaveMethods) {
           // TODO: [2008-07-21 ptw] (LPP-5813) This should really be
           // in the script-compiler back-end
-          if (! ("swf9".equals(env.getRuntime()))) {
+        if (! (env.isAS3())) {
             pragmas += "\n#pragma 'withThis'\n";
           }
           binder = new Method(bindername, args, "", pragmas, body, srcloc, null);
@@ -301,7 +301,7 @@
       if (canHaveMethods) {
           // TODO: [2008-07-21 ptw] (LPP-5813) This should really be
           // in the script-compiler back-end
-          if (! ("swf9".equals(env.getRuntime()))) {
+        if (! (env.isAS3())) {
             pragmas += "\n#pragma 'withThis'\n";
           }
           dependencies = new Method(dependenciesname, "", "", pragmas, body, srcloc, null);
@@ -697,10 +697,10 @@
              "") +
             (setId ? ("  $lzc$node.id = " + ScriptCompiler.quote(symbol) + ";\n") : "") +
             "  " + symbol + " = $lzc$node;\n" +
-            "  if ($swf9) { global[" + ScriptCompiler.quote(symbol) + "] = $lzc$node; }\n" +
+            "  if ($as3) { global[" + ScriptCompiler.quote(symbol) + "] = $lzc$node; }\n" +
             "} else if (" + symbol + " === $lzc$node) {\n" +
             "  " + symbol + " = null;\n" +
-            "  if ($swf9) { global[" + ScriptCompiler.quote(symbol) + "] = null; }\n" +
+            "  if ($as3) { global[" + ScriptCompiler.quote(symbol) + "] = null; }\n" +
             (setId ? ("  $lzc$node.id = null;\n") : "") +
             "}\n";
     }
@@ -727,7 +727,7 @@
         }
 
         // Add file/line information if debugging
-        if (debug && !("swf9".equals(env.getRuntime()))) {
+        if (debug && !(env.isAS3())) {
           // File/line stored separately for string sharing
           String name = "_dbg_filename";
           String filename = Parser.getSourceMessagePathname(element);
@@ -1152,10 +1152,10 @@
                     NodeModel dpnode = elementAsModel(child, schema, env);
                     this.datapath = dpnode;
                 } else if (child.getName().equals("passthrough")) {
-                  if (env.getRuntime().equals("swf9")) {
+                  if (env.isAS3()) {
                     passthroughBlock = child.getText();
                   } else {
-                    env.warn("The passthrough tag can only be used in swf9 runtime, perhaps you could put this in a switch tag?",child);
+                    env.warn("The passthrough tag can only be used in an as3 runtime, perhaps you could put this in a switch tag?",child);
                   }
                 } else {
                     checkChildNameConflict(element.getName(), child, env);
@@ -1371,7 +1371,7 @@
             if (canHaveMethods) {
                 // TODO: [2008-07-21 ptw] (LPP-5813) This should really
                 // be in the script-compiler back-end
-                if (! ("swf9".equals(env.getRuntime()))) {
+              if (! (env.isAS3())) {
                   pragmas += "\n#pragma 'withThis'\n";
                 }
                 referencefn = new Method(referencename, "", "", pragmas, refbody, srcloc, null);
@@ -1397,7 +1397,7 @@
             if (canHaveMethods) {
                 // TODO: [2008-07-21 ptw] (LPP-5813) This should really
                 // be in the script-compiler back-end
-                if (! ("swf9".equals(env.getRuntime()))) {
+              if (! (env.isAS3())) {
                   pragmas += "\n#pragma 'withThis'\n";
                 }
                 fndef = new Method(method, args, "", pragmas, body, srcloc, null);
@@ -1517,7 +1517,7 @@
             if (isfinal) { adjectives += " final"; }
             // TODO: [2008-07-21 ptw] (LPP-5813) This should really be
             // in the script-compiler back-end
-            if (! ("swf9".equals(env.getRuntime()))) {
+            if (! (env.isAS3())) {
               pragmas += "\n#pragma 'withThis'\n";
             }
             fndef = new Method(name, args, returnType, pragmas, body, name_loc, adjectives);

Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/SWF9Writer.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/SWF9Writer.java	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/SWF9Writer.java	2008-11-25 16:38:37 UTC (rev 11879)
@@ -433,7 +433,7 @@
             "import flash.ui.*;\n" +
             "}#\n";
 
-    /** Create swf9 application boilerplate preamble as3 code 
+    /** Create application boilerplate preamble as3 code 
      */
     public String makeApplicationPreamble() {
         String source = "public class " + MAIN_APP_CLASSNAME +
@@ -453,7 +453,7 @@
         return source;
     }
 
-    /** Create swf9 import library  boilerplate preamble as3 code 
+    /** Create import library  boilerplate preamble as3 code 
      */
     public String makeLibraryPreamble() {
         String source = "public class " + LIBRARY_CLASSNAME +
@@ -466,7 +466,7 @@
     public void closeSnippet() throws IOException {
 
         // Define the base app class for an import library. Must be
-        // structured this way to conform to what the swf9 script
+        // structured this way to conform to what the as3 script
         // compiler expects for constructing the main app class.
         addScript("class LzBaseLib extends Sprite { \n" +
                   imports +  "\n" + 

Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java	2008-11-25 16:38:37 UTC (rev 11879)
@@ -264,7 +264,7 @@
   public void defaultOptions() {
 
     // Disable debug compilation for swf9
-    if ("swf9".equals((String)options.get(RUNTIME))) {
+    if ("swf9".equals((String)options.get(RUNTIME)) || "swf10".equals((String)options.get(RUNTIME))) {
       options.putBoolean(DEBUG_SWF9, options.getBoolean(DEBUG));
       options.putBoolean(DEBUG, false);
       options.putBoolean(DEBUG_BACKTRACE, false);
@@ -329,7 +329,7 @@
       boolean obfuscate = options.getBoolean(OBFUSCATE);
       boolean isScript = org.openlaszlo.compiler.Compiler.SCRIPT_RUNTIMES.contains(runtime);
       Translator cg;
-      if (runtime.equals("swf9")) {
+      if (runtime.equals("swf9") || runtime.equals("swf10")) {
         cg = new SWF9Generator();
       }
       else if (isScript) {

Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/lzsc.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/lzsc.java	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/lzsc.java	2008-11-25 16:38:37 UTC (rev 11879)
@@ -34,8 +34,8 @@
     "Options:",
     "--help",
     "  Prints this message.",
-    "--runtime=(swf7|swf8|swf9|dhtml|j2me|svg)",
-    "   specify which runtime to compile code to. Only swf7, swf8, and dhtml are supported",
+    "--runtime=(swf7|swf8|swf9|swf10|dhtml|j2me|svg)",
+    "   specify which runtime to compile code to. Only swf7, swf8, swf9, swf10, and dhtml are supported",
     "--debug",
     "   include debugging information in output file",
     "--profile",
@@ -117,7 +117,8 @@
 
       String runtime = (String)options.get(Compiler.RUNTIME);
       // Must be kept in sync with server/src/org/openlaszlo/compiler/Compiler.java creatObjectWriter
-      if ("dhtml".equals(runtime) || "j2me".equals(runtime) || "svg".equals(runtime) || "swf9".equals(runtime) ) {
+      if ("dhtml".equals(runtime) || "j2me".equals(runtime) || "svg".equals(runtime) || "swf9".equals(runtime)
+          || "swf10".equals(runtime)) {
         OutputStream ostr = new FileOutputStream(outf);
         try {
           ostr.write(bytes);
@@ -166,9 +167,10 @@
 
   // Must be kept in sync with server/src/org/openlaszlo/compiler/Compiler.java compile
   boolean setRuntime(String runtime) {
-    if (! ("dhtml".equals(runtime) || "j2me".equals(runtime) || "svg".equals(runtime) || "swf9".equals(runtime) ||
+    if (! ("dhtml".equals(runtime) || "j2me".equals(runtime) || "svg".equals(runtime) ||
+           "swf9".equals(runtime) || "swf10".equals(runtime) ||
            "swf7".equals(runtime) || "swf8".equals(runtime))) {
-      usage("runtime must be one of swf7, swf8, swf9, dhtml, j2me, svg");
+      usage("runtime must be one of swf7, swf8, swf9, swf10, dhtml, j2me, svg");
       return false;
     }
     compileTimeConstants.put("$runtime", runtime);
@@ -180,7 +182,8 @@
       "$as2",
       Boolean.valueOf("swf7".equals(runtime) || "swf8".equals(runtime) ));
     compileTimeConstants.put("$swf9", Boolean.valueOf("swf9".equals(runtime)));
-    compileTimeConstants.put("$as3", Boolean.valueOf("swf9".equals(runtime)));
+    compileTimeConstants.put("$swf10", Boolean.valueOf("swf10".equals(runtime)));
+    compileTimeConstants.put("$as3", Boolean.valueOf("swf9".equals(runtime) || "swf10".equals(runtime)));
     compileTimeConstants.put("$dhtml", Boolean.valueOf("dhtml".equals(runtime)));
     compileTimeConstants.put("$j2me", Boolean.valueOf("j2me".equals(runtime)));
     compileTimeConstants.put("$svg", Boolean.valueOf("svg".equals(runtime)));

Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/servlets/responders/ResponderEVAL.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/servlets/responders/ResponderEVAL.java	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/servlets/responders/ResponderEVAL.java	2008-11-25 16:38:37 UTC (rev 11879)
@@ -58,7 +58,7 @@
             mLogger.debug(message);
           }
           byte[] action = new byte[0];
-          int swfversion = 6;
+          int swfversion = 8;
           ScriptCompiler.writeScriptToStream(action, out, swfversion);
           out.flush();
           FileUtils.close(out);
@@ -78,8 +78,8 @@
                 if (swfversion == null) {
                     swfversion = "swf8";
                 }
-                if ("swf9".equals(swfversion)) {
-                    compiler.compileAndWriteToSWF9(script, seqnum, out);
+                if (Compiler.AS3_RUNTIMES.contains(swfversion)) {
+                    compiler.compileAndWriteToAS3(script, swfversion, seqnum, out);
                 } else {
                     compiler.compileAndWriteToSWF(script, seqnum, out, swfversion);
                 }

Modified: openlaszlo/trunk/lps/components/debugger/debugger.lzx
===================================================================
--- openlaszlo/trunk/lps/components/debugger/debugger.lzx	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/lps/components/debugger/debugger.lzx	2008-11-25 16:38:37 UTC (rev 11879)
@@ -172,7 +172,7 @@
 
        // To support clickable links in swf9, we need to add an as3 event listener
        // on the output LzText's flash textfield object.
-       if ($swf9) {
+       if ($as3) {
            this.evalloader.addTextLinkCallback(this.middle.content.textpane);
        }
 
@@ -888,7 +888,7 @@
       if (attrs && attrs.color) { color = attrs.color };
       if (id != null) {
           // TODO hqm 2008-09-15 Make this use new lz.text.makeTextLink API when it is working
-          if ($swf9) {
+          if ($as3) {
               return '<a href="event:objid=' + id + '"><font color="' + color + '">' + rep +"</font></a>";
           } else {
               return '<a href="asfunction:_root.$modules.lz.Debug.displayObj,' + id + '"><font color="' + color + '">' + rep +"</font></a>";
@@ -911,7 +911,7 @@
         this.isLoaded = true;
         this.remoteDebug = false;
 
-        if ($swf9) {
+        if ($as3) {
             var bridge:LzDebugConsole = new LzDebuggerWindowConsoleBridge(this);
             Debug.attachDebugConsole(bridge);
          } else {

Modified: openlaszlo/trunk/lps/components/extensions/av/mediadevice.lzx
===================================================================
--- openlaszlo/trunk/lps/components/extensions/av/mediadevice.lzx	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/lps/components/extensions/av/mediadevice.lzx	2008-11-25 16:38:37 UTC (rev 11879)
@@ -275,7 +275,7 @@
               user can change the device permission and 
               other properties. -->
         <method name="showSettings"><![CDATA[
-            if ($swf9) {
+            if ($as3) {
                 // TODO    
             } else {
                 System.showSettings(0);

Modified: openlaszlo/trunk/lps/components/extensions/av/mediastream.lzx
===================================================================
--- openlaszlo/trunk/lps/components/extensions/av/mediastream.lzx	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/lps/components/extensions/av/mediastream.lzx	2008-11-25 16:38:37 UTC (rev 11879)
@@ -281,7 +281,7 @@
         // tag->class mapping convention
         dynamic class $lzc$class_mediastream extends LzNode {
             // Import statements
-            if ($swf9) {
+            if ($as3) {
                 #passthrough (toplevel:true) {  
                 import flash.media.*;
                 import flash.events.*;
@@ -426,7 +426,7 @@
     
                 // unload 
                 if (this._flashstream) {
-                    if ($swf9) {
+                    if ($as3) {
                         //this._flashstream.play(false);
                     } else {
                         this._flashstream.play(false);
@@ -544,7 +544,7 @@
                 /* seems to work better without this
                 // don't update if new lz.mediastream about to start
                 if (this._pendingstreamname != "") {
-                    if ($swf9) {
+                    if ($as3) {
                         // TODO: why doesn't _pendingstreamname get reset?
                     } else {
                         return;
@@ -554,7 +554,7 @@
     
                 var time = 0;
                 var progress = 1.0;
-                if ($swf9) {
+                if ($as3) {
                     var fps = this._flashstream.currentFPS;
                 } else {
                     var fps = this._flashstream.currentFps;
@@ -777,7 +777,7 @@
                     if ($debug) Debug.warn("No netconnection defined for %w.", this);
                     return;
                 }
-                if ($swf9) {
+                if ($as3) {
                     // TODO: why aren't we already connected?
                     //Debug.warn('Must connect before creating stream', this._nc, this._srcurl, this._nc.connected);
                     this._nc.addEventListener(NetStatusEvent.NET_STATUS, this._onNetStatus);
@@ -810,7 +810,7 @@
                 this.setAttribute("_flashstream", netstream);
                 //Debug.write("MADE _FLASHSTREAM", this._flashstream);
 
-                if ($swf9) {
+                if ($as3) {
                     this._flashstream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, this._onAsyncError);
                     this._flashstream.addEventListener(NetStatusEvent.NET_STATUS, this._onNetStatus);
                     var attachPoint = {};
@@ -835,7 +835,7 @@
                     _this._onMetaData(info);
                 };
 
-                if ($swf9) {
+                if ($as3) {
                     this._flashstream.client = attachPoint;
                 }
             }
@@ -1047,7 +1047,7 @@
                     }
                     return;
                 }
-                if ($swf9) {
+                if ($as3) {
                     if (paused) {
                         this._flashstream.pause();
                     } else {

Modified: openlaszlo/trunk/lps/components/extensions/av/rtmpconnection.lzx
===================================================================
--- openlaszlo/trunk/lps/components/extensions/av/rtmpconnection.lzx	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/lps/components/extensions/av/rtmpconnection.lzx	2008-11-25 16:38:37 UTC (rev 11879)
@@ -90,7 +90,7 @@
         // tag->class mapping convention
         dynamic class $lzc$class_rtmpconnection extends LzNode {
             // Import statements
-            if ($swf9) {
+            if ($as3) {
                 #passthrough (toplevel:true) {                    
                     import flash.net.NetConnection;
                     import flash.events.ErrorEvent;
@@ -149,7 +149,7 @@
     
                 // Local reference to rtmpconnection.
                 this._nc = new NetConnection();
-                if ($swf9) {
+                if ($as3) {
                     this._nc.addEventListener(NetStatusEvent.NET_STATUS, this._onStatus);
                     this._nc.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this._onSecurityError);
 
@@ -191,7 +191,7 @@
                 }
             } // end function _oninit
 
-            /** Catch swf9 security errors. **/
+            /** Catch as3 security errors. **/
             function _onSecurityError (error) {
                 var errstr = error + '';
                 if ($debug) Debug.warn("rtmpconnection _onSecurityError() " + errstr);
@@ -216,7 +216,7 @@
                     }
                 }
 
-                if ($swf9) {
+                if ($as3) {
                     //Debug.write('connecting', this._nc, this.src == "null" ? null : this.src)
                     this._nc.connect(this.src == "null" ? null : this.src);
                 } else {
@@ -236,7 +236,7 @@
             } // end function connect
 
             function _onStatus (evt) {
-                if ($swf9) evt = evt.info;
+                if ($as3) evt = evt.info;
                 var code = evt.code;
                 var description = evt.description;
 

Modified: openlaszlo/trunk/lps/components/extensions/av/videoview.lzx
===================================================================
--- openlaszlo/trunk/lps/components/extensions/av/videoview.lzx	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/lps/components/extensions/av/videoview.lzx	2008-11-25 16:38:37 UTC (rev 11879)
@@ -91,7 +91,7 @@
         // tag->class mapping convention
         dynamic class $lzc$class_videoview extends LzView with NewvideoviewShared {
             // Import statements
-            if ($swf9) {
+            if ($as3) {
                 #passthrough (toplevel:true) {  
                 import flash.media.*;
                 import flash.net.NetConnection;
@@ -136,7 +136,7 @@
                     //Debug.write("videoview init made stream", this.stream);
                 }
                 
-                if ($swf9) {
+                if ($as3) {
                     var width = 320
                     var height = 240
                     if (this.height > 0 && this.height < 1024) height = this.height;
@@ -151,7 +151,7 @@
                 }
     
                 var vid = this._getflashvideo();
-                if ($swf9) {
+                if ($as3) {
                     vid.x = 0;
                     vid.y = 0;
                     vid.width = this.width;
@@ -196,7 +196,7 @@
             function _attachStream(fs) {
                 //Debug.write('_attachStream', fs);
                 var vid = this._getflashvideo();
-                if ($swf9) {
+                if ($as3) {
                     vid.attachNetStream(fs);
                     this._sound = this.stream._flashstream.soundTransform;
                 } else {
@@ -209,7 +209,7 @@
     
             function _getflashvideo () {
                 //Debug.write("_getflashvideo()");
-                if ($swf9) {
+                if ($as3) {
                     return this.sprite.__LZvideo;
                 } else {
                     return this.__LZmovieClipRef.__lzvideo;
@@ -224,7 +224,7 @@
                 }
     
                 var vid = this._getflashvideo();
-                if ($swf9) {    
+                if ($as3) {    
                     vid.width = w;
                 } else {
                     vid._width = w;
@@ -239,7 +239,7 @@
                 }
     
                 var vid = this._getflashvideo();
-                if ($swf9) {    
+                if ($as3) {    
                     vid.height = h;
                 } else {
                     vid._height = h;
@@ -251,7 +251,7 @@
                 this.playvolume = newplayvolume;
                 if (this.isinited && 
                     (this['_sound'] != null)) {
-                    if ($swf9) {
+                    if ($as3) {
                         //Debug.write('setting volume to ', newplayvolume);
                         this._sound.volume = newplayvolume;
                         this.stream._flashstream.soundTransform = this._sound;

Modified: openlaszlo/trunk/lps/components/extensions/drawview.lzx
===================================================================
--- openlaszlo/trunk/lps/components/extensions/drawview.lzx	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/lps/components/extensions/drawview.lzx	2008-11-25 16:38:37 UTC (rev 11879)
@@ -855,7 +855,7 @@
         // Classes that implement an interface must obey the LZX
         // tag->class mapping convention
         class $lzc$class_drawview extends LzView with DrawviewShared {
-            if ($swf9) {
+            if ($as3) {
                 #passthrough (toplevel:true) {  
                 import flash.geom.Matrix;
                 import flash.geom.Rectangle;
@@ -904,7 +904,7 @@
 
             // Add bitmap data drawing layer
             function rebuildBitmap (ignore) {
-                if ($swf9) {
+                if ($as3) {
                     return;
                 }
                 if (this['__bitmapmc']) {
@@ -913,7 +913,7 @@
 
                 var context = this.sprite.getContext();
                 this.__bitmapmc = context.createEmptyMovieClip("__bitmapmc",1000);
-                if ($swf9) {
+                if ($as3) {
                     this.__bitmapdata = new BitmapData(this.width, this.height, true, 0x000000ff);
                 } else {
                     this.__bitmapdata = new flash.display.BitmapData(this.width, this.height, true, 0x000000ff);
@@ -1015,7 +1015,7 @@
             }
 
             function drawImage(image, x, y, w, h, r) {
-                if ($swf9) {
+                if ($as3) {
                     if ($debug) Debug.warn('Drawview.drawImage() is not yet supported in swf9.');
                 } else {
                     if (typeof image == 'string') {
@@ -1198,7 +1198,7 @@
                 if ($as2) this.context._visible = this.visible;
             }
     
-            if ($swf9) {    
+            if ($as3) {    
                 function clipPath() {
                     if ($debug) {
                         Debug.warn('Drawview.clipPath() is not currently supported in swf9.');
@@ -1279,7 +1279,7 @@
     
             function clear() {
                 this.context.clear();
-                if ($swf9) {
+                if ($as3) {
                 } else {
                     var rect = new flash.geom.Rectangle(0, 0, this.width, this.height);
                     if (this['__bitmapdata']) this.__bitmapdata.fillRect(rect, 0x000000ff);
@@ -1348,7 +1348,7 @@
             }
 
             function copyBitmap(from, w, h, to, m) {
-                if ($swf9) {
+                if ($as3) {
                     var tmp = new BitmapData(w, h, true, 0x000000ff);
                 } else {
                     var tmp = new flash.display.BitmapData(w, h, true, 0x000000ff);
@@ -1388,7 +1388,7 @@
                 var colorval = color.c | alpha;
                 //Debug.info(colorval, alpha, color, this.fillStyle)
 
-                if ($swf9) {
+                if ($as3) {
                     var rect = new Rectangle(x, y, w, h);
                 } else {
                     var rect = new flash.geom.Rectangle(x, y, w, h);
@@ -1397,7 +1397,7 @@
             }
 
             function getIdentityMatrix() {
-                if ($swf9) {
+                if ($as3) {
                     return new Matrix();
                 } else {
                     return new flash.geom.Matrix();
@@ -1418,7 +1418,7 @@
           * drawview.createRadialGradient.
           */
         class LzCanvasGradient {
-            if ($swf9) {
+            if ($as3) {
                 #passthrough (toplevel:true) {
                 import flash.geom.Matrix;
                 }#
@@ -1432,7 +1432,7 @@
             
             function LzCanvasGradient(c, m, isradial) {
                 this._context = c;
-                if ($swf9) {
+                if ($as3) {
                     var matrix = new Matrix();
                     m = matrix.createGradientBox(m.w,m.h,m.r,m.x,m.y);
                 }

Modified: openlaszlo/trunk/lps/components/lztest/lztestmanager.lzx
===================================================================
--- openlaszlo/trunk/lps/components/lztest/lztestmanager.lzx	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/lps/components/lztest/lztestmanager.lzx	2008-11-25 16:38:37 UTC (rev 11879)
@@ -77,7 +77,7 @@
 
 function setupServerLogging() {
     // TODO: enable this once lz.Browser is working in swf9
-    if ($swf9) {
+    if ($as3) {
         return;
     }
     var lzurl = lz.Browser.getLoadURLAsLzURL();

Modified: openlaszlo/trunk/lps/components/lzunit/lzunit.lzx
===================================================================
--- openlaszlo/trunk/lps/components/lzunit/lzunit.lzx	2008-11-25 15:04:24 UTC (rev 11878)
+++ openlaszlo/trunk/lps/components/lzunit/lzunit.lzx	2008-11-25 16:38:37 UTC (rev 11879)
@@ -347,7 +347,7 @@
         }
         if ($debug) {
           var file = null, line = null;
-          if ($swf9) {
+          if ($as3) {
           } else {
             // Find the failing test, which is four frames up
             var bt = Debug.backtrace(4);



More information about the Laszlo-checkins mailing list