<HTML>
<HEAD>
<TITLE>Re: [Laszlo-dev] SWF9 and video / adding import statements for AS3 in LZX classes</TITLE>
</HEAD>
<BODY>
<FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>Thanks, Henry. Based on the draview code ( <a href="http://svn.openlaszlo.org/openlaszlo/trunk/lps/components/extensions/drawview.lzx)">http://svn.openlaszlo.org/openlaszlo/trunk/lps/components/extensions/drawview.lzx)</a> I came up with this. Doesn’t work though... <BR>
<BR>
<library><BR>
<switch><BR>
<when runtime="swf9"><BR>
<script when="immediate"><BR>
#passthrough (toplevel:true) {<BR>
import flash.net.NetConnection;<BR>
}#<BR>
</script><BR>
</when><BR>
</switch><BR>
<BR>
<!--<BR>
Media stream. <BR>
<BR>
@START_CODE<BR>
<mediastream/><BR>
@END_CODE<BR>
--><BR>
<class name="mediastream" extends="node"><BR>
<BR>
Probably misunderstood something here..<BR>
<BR>
Best,<BR>
Raju<BR>
<BR>
<BR>
Am 01.06.2008 16:13 Uhr schrieb "Henry Minsky" unter <henry.minsky@gmail.com>:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>There is a <switch> statement, you can see it's use for example in <BR>
lps/components/debugger/library.lzx<BR>
<BR>
It switches on the "runtime" attribute<BR>
<BR>
<switch><BR>
<when runtime="dhtml"><BR>
<!-- no debug window in DHTML, it is in its own iframe --><BR>
</when><BR>
<otherwise><BR>
<include href="debugger.lzx"/><BR>
</otherwise><BR>
</switch><BR>
<BR>
On Sun, Jun 1, 2008 at 8:38 AM, Raju Bitter <openlaszlonaut@googlemail.com> wrote:<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>I tried to run the video test in the test folder (FLV progressive):<BR>
<BR>
/trunk/test/video/test-video.lzx<BR>
<BR>
<BR>
The compiler showed errors since the imports were missing in the AS3 files<BR>
ERRORS:<BR>
[/Users/laszlo/flexprojekte/swf9runtime/src/$lzc$class_mediastream.as <a href="http://class_mediastream.as"><http://class_mediastream.as></a> : 94]<BR>
line unknown: Error: Call to a possibly undefined method NetConnection.<BR>
[/Users/laszlo/flexprojekte/swf9runtime/src/$lzc$class_mediastream.as <a href="http://class_mediastream.as"><http://class_mediastream.as></a> : 124]<BR>
line unknown: Error: Call to a possibly undefined method NetStream.<BR>
[/Users/laszlo/flexprojekte/swf9runtime/src/$lzc$class_videoview.as <a href="http://class_videoview.as"><http://class_videoview.as></a> : 18]<BR>
line unknown: Error: Call to a possibly undefined method Sound.<BR>
<BR>
How do you manage addition of import statements in LZX files if the import<BR>
statements are SWF9 runtime specific?<BR>
<BR>
Thanks,<BR>
<FONT COLOR="#888888">Raju<BR>
<BR>
<BR>
</FONT></SPAN></FONT></BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'><BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'><BR>
</SPAN></FONT>
</BODY>
</HTML>