Here's the handwritten code I am currently using for a compiling a an
application. It extends an  LFC class called LFCApplication, which is in
the LFC and responsible for initializing the runtime.



 package {
   import flash.display.*;
   public class LzApplication extends LFCApplication {

     public function LzApplication () {



         canvas = new LzCanvas({__LZproxied: "true",
                                bgcolor: 0xffffff,
                                embedfonts: true,
                                fontname: "Verdana,Vera,sans-serif",
                                fontsize: 11,
                                fontstyle: "plain",
                                height: 600,
                                lpsbuild: "7726
C:\\users\\hqm\\openlaszlo\\devildog",
                                lpsbuilddate: "2008-01-04T13:11:50-0500",
                                lpsrelease: "Latest",
                                lpsversion: "4.1.x",
                                runtime: "swf9",
                                width: 800});


         addChild(canvas.sprite);

         LzInstantiateView(..., 6);
         LzInstantiateView(..., 2);
         LzInstantiateView(..., 2);
         ...

        canvas.initDone()


            }
   }
 }

I'd like to make the script compiler emit this when compiling an app. I
guess all the top level statements from the
script code should be collected up and put into this LzApplication class'
constructor, or a method like appStartup()
which the  LFCApplication constructor can call.


I'm looking at SWF9Generator.flexCompile, and it seems like it always
compiles the LFC as a library with compc, which it seems like
we don't want to do each time we compile an app.

Maybe we should just have separate flexCompileApp and flexCompileLibrary
methods?






-- 
Henry Minsky
Software Architect
[EMAIL PROTECTED]

Reply via email to