<br><br><br>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. <br><br>
<br><br> package {<br> import flash.display.*;<br> public class LzApplication extends LFCApplication {<br><br> public function LzApplication () {<br> <br><br><br> canvas = new LzCanvas({__LZproxied: "true",
<br> bgcolor: 0xffffff,<br> embedfonts: true,<br> fontname: "Verdana,Vera,sans-serif",<br> fontsize: 11,
<br> fontstyle: "plain",<br> height: 600,<br> lpsbuild: "7726 C:\\users\\hqm\\openlaszlo\\devildog",<br> lpsbuilddate: "2008-01-04T13:11:50-0500",
<br> lpsrelease: "Latest",<br> lpsversion: "4.1.x",<br> runtime: "swf9",<br> width: 800});
<br><br><br> addChild(canvas.sprite);<br><br> LzInstantiateView(..., 6);<br> LzInstantiateView(..., 2);<br> LzInstantiateView(..., 2);<br> ... <br><br> canvas.initDone
() <br><br><br> }<br> }<br> }<br><br>I'd like to make the script compiler emit this when compiling an app. I guess all the top level statements from the<br>script code should be collected up and put into this LzApplication class' constructor, or a method like appStartup()
<br>which the LFCApplication constructor can call. <br><br><br>I'm looking at SWF9Generator.flexCompile, and it seems like it always compiles the LFC as a library with compc, which it seems like<br>we don't want to do each time we compile an app.
<br><br>Maybe we should just have separate flexCompileApp and flexCompileLibrary methods? <br><br><br><br><br><br clear="all"><br>-- <br>Henry Minsky<br>Software Architect<br><a href="mailto:hminsky@laszlosystems.com">hminsky@laszlosystems.com
</a><br><br>