[Laszlo-dev] how to stuff "import" as3 statements into the "preProcess" step in SWF9Generator?

Donald Anderson dda at ddanderson.com
Fri Feb 8 14:48:08 PST 2008


Hmm, are you using '#passthrough (toplevel:true) { ' around
the imports?  I would think that would push them right where you need  
them.

On Feb 8, 2008, at 2:03 PM, Henry Minsky wrote:

> Hi Don,
>
> I'm trying to figure out how to get some "import" statements to get
> compiled into the little DebugEvaluate class which
> I'm emitting from the SWF9Generator for evaluating javascript  
> expressions.
>
> I'd like to get something like this to appear in the final AS3 output:
>
>
> package {
>
>
>    import flash.display.*;
>    import flash.events.*;
>    import flash.utils.*;
>    import flash.text.*;
>    import flash.system.*;
>    import flash.net.*;
>    import flash.ui.*;
>
>
> public class DebugEvaluate extends DebugExec {
>
>
>
> But I'm not sure if the code that goes in the "preProcess" method
> takes "LaszloScript" or AS3.

preProcess takes the string that the tag compiler emis (laszloScript)
and produces the same.  For most runtimes, this is the identity
transformation.  But I don't think you really need this if you're
using #passthrough.

> How would
> I squeeze these into the emitted source? In AS3, you can't just try to
> access  some class flash.net.blah at runtime if your
> haven't 'import'ed it at compile time. I'm trying to import all the
> stuff that would commonly be used, so people can
> probe the runtime with their expressions easily.
>
>
> -- 
> Henry Minsky
> Software Architect
> hminsky at laszlosystems.com


--

Don Anderson
Java/C/C++, Berkeley DB, systems consultant

voice: 617-547-7881
email: dda at ddanderson.com
www: http://www.ddanderson.com






More information about the Laszlo-dev mailing list