David,
Yes, it's not possible to import AS3 packages/classes with the syntax I
know.
<canvas> <script when="immediate"> #passthrough
(toplevel:true) { import flash.net.NetConnection; }#
</script> <class name="testclass1" extends="node"> <attribute
name="_nc" type="expression" value="null" /> <method
name="init"> super.init(); this.nc = new
NetConnection(); </method> </class> </canvas> <!-- compiles to
AS3 as: package { dynamic class $lzc$class_testclass1 extends LzNode {
static var tagname = "testclass1";
static var attributes = new LzInheritedHash(LzNode.attributes);
var _nc;override function init () { super.init(); this.nc = new
NetConnection() }
function $lzc$class_testclass1 ($lzc$parent:LzNode? = null,
$lzc$attrs:Object? = null, $lzc$children:Array? = null, $lzc$async:Boolean =
false) { super($lzc$parent, $lzc$attrs, $lzc$children, $lzc$async)
}LzNode.mergeAttributes({_nc: null}, $lzc$class_testclass1.attributes);} }
-->
$passthrough (toplevel:true) { }# only seems to work inside classes written
in JS2 syntax. Is there any other way to put import statements into LZX
code? I tried using <script> tags with if ($sw9) { $passthrough
(toplevel:true) { }# }, like
<script when="immediate">
#passthrough (toplevel:true) {
import flash.net.NetConnection;
}#
</script>
But that doesn¹t work, either. The only working code I found and your
experts pointed me to was drawview.lzx, which¹s syntax I¹m copying.
Best,
Raju