example:
main.lzx:
<canvas>
<import name="lib" href="view-library.lzx" stage="late" />
</canvas>
view-library.lzx:
<library>
<text>Loaded</text>
<view y="20" width="100" height="100" bgcolor="red"/>
</library>
The compiler will emit a file in build/main/view-library.lzx.swf
but note that it won't contain anything very interesting, just function
calls to
LzInstantiateView(...)
You can put a <script> block in the library file, with code you want
compiled. As of the latest nightly builds (if they have been building) of a
week or so ago, you can use <script when="immediate"> which will pretty much
compile your code into inline instructions, as opposed to a default <script>
block which wraps the code in a function in order to ensure it executes in
the correct lexical order with other views as the get constructed.
So you could make
view-library.lzx:
<library>
<script when="immediate">
<![CDATA[
var foo = 259;
function baz (a , b) { return a + b; }
]]>
</script>
</library>
On 2/14/07, Henry Minsky <[EMAIL PROTECTED]> wrote:
There are a couple of ways to get code compiled standalone.
One way would be to use the <import> tag, which will compile a library
which is designed to be loaded at runtime using loadMovie. It can be used
instead of <include>, I will send a code example in a minute.. it will
compile a standalone swf for the library.
The library file will just contain a big script action block, and a
callback at the end.
On 2/14/07, strk <[EMAIL PROTECTED] > wrote:
>
> On Mon, Feb 12, 2007 at 08:30:41PM -0500, P T Withington wrote:
> > Even the simplest app includes the entire LFC (Laszlo Foundation
> > Classes), which is probably what you are seeing.
>
> No way to omit them ?
> Are sources available / can they be acted on for debugging ?
>
> --strk;
>
--
Henry Minsky
Software Architect
[EMAIL PROTECTED]
--
Henry Minsky
Software Architect
[EMAIL PROTECTED]
_______________________________________________
Gnash-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-dev