<passthrough>
Provides a way to import SWF10 declarations.

Usage

<passthrough> tells the class compiler to import SWF10 declarations. For example, in lps/components/extensions/av/microphone.lzx:

 <class name="microphone" extends="mediadevice">
	<passthrough when="$as3">
		import flash.media.*;
	</passthrough>
	
	...

You can also use passthrough in script. For example, in lps/components/extensions/drawview.lzx:

<script when="immediate"><![CDATA[
	// Classes that implement an interface must obey the LZX
	// tag->class mapping convention and must be dynamic
	dynamic class $lzc$class_drawview extends LzView with DrawviewShared {
	    if ($as3) {
	        #passthrough (toplevel:true) {
	        import flash.geom.Matrix;
	        import flash.geom.Rectangle;
	        import flash.display.Bitmap;
	        import flash.display.BitmapData;
	        import flash.display.Graphics;
	        import flash.display.Sprite;
	        }#
	    }
	    
	    ...

toplevel:true makes the swf10 backend put the code outside of and before the class declaration (the only place that import statements can go).

The possible compile time constants are:

  • $runtime : string
  • $swf7 : boolean
  • $swf8 : boolean
  • $as2 : boolean
  • $swf9 : boolean
  • $swf10 : boolean
  • $as3 : boolean
  • $dhtml : boolean
  • $j2me : boolean
  • $svg : boolean
  • $js1 : boolean
  • $debug : boolean
  • $profile : boolean
  • $backtrace : boolean