Hi,

Compiling to swf10.

Here is a library that contains class Lib

<library>
<class name="Lib">
<passthrough when="$as3">import flash.system.Capabilities;</passthrough>
<attribute name="runtimeVersion" type="string"/>
<handler name="oninit"><![CDATA[
            if ($as3) {
setAttribute("runtimeVersion", "Flash: " + flash.system.Capabilities.version + " Laszlo: " + canvas.lpsversion);
            }
        ]]></handler>
<text name="version" text="${parent.runtimeVersion}"/>
</class>
</library>

Compile it to an lzo library.

Here is an application

<canvas>
<include href="<PATH_TO_THE_LZO_FILE>"/>
<Lib/>
</canvas>

Trying to compile it it gives me error
Syntax error: the token "import" was not expected at this position.

When compiling it without the intermediate lzo it works fine.
I am using 4.7 by the way.

- rami

On 15.7.2011 3:18, Henry Minsky wrote:
Can you send a zip file with a complete minimal test case, maybe I can take a look
at what's happening. Which runtime are you compiling to? swf10 or dhtml?


On Thu, Jul 14, 2011 at 5:18 PM, Rami Ojares / AMG Oy <[email protected] <mailto:[email protected]>> wrote:

    Hi,

    Seems to me that passthrough tag does not work inside lzo libraries.

    I have
    <passthrough when="$as3">import
    flash.system.Capabilities</passthrough>

    It does not complain when complaining it to lzo

    But when I try to compile against that lzo file I get an error
    Syntax error: the token "import" was not expected at this position.

    - rami




--
Henry Minsky




Reply via email to