[Laszlo-dev] [Platform-team] System calls

Henry Minsky hminsky at laszlosystems.com
Fri Sep 12 11:31:15 PDT 2008


What if we added a "passthrough" tag for LZX, to get a verbatim block of
text into the class body.
<class name="foo">
   <passthrough>
      import flash.utils.*;
      import flash.events.*;
    </passthrough>
 ...
</class>


On Fri, Sep 12, 2008 at 1:38 PM, J Crowley <jcrowley at laszlosystems.com>wrote:

> Ahh, okay.  They already appear to work in SWF8, from what I can tell.
>  (They're used in the YouTube demo, which seems to be running just fine
> without any warnings or errors.)
>
>
> Max Carlson wrote:
>
>> Josh,
>>
>> I'm knee deep in this already.  If you can get things working in 4.2 under
>> swf8 that's a great start.  I can take it from there...  Thanks!
>>
>> Henry Minsky wrote:
>>
>>>
>>> In swf9, you *must* have import statements for each library you use, so
>>> if you refer to an Event, your code must have
>>>    import flash.events.*;
>>>
>>> It is like java, except you can't get access to a class by just giving
>>> it's full name; the import
>>> statement has to be in the .as file.
>>>
>>> We have a mechanism to get these stuffed into the proper place in a class
>>> declaration. If you look at kernel/swf9/LFCApplication, for example, you'll
>>> see this code
>>> public class LFCApplication {
>>>
>>>    // This serves as the superclass of DefaultApplication, currently that
>>> is where
>>>    // the compiler puts top level code to run.
>>>
>>>    #passthrough (toplevel:true) {      import flash.display.*;
>>>    import flash.events.*;
>>>    import flash.utils.*;
>>>    import flash.text.*;
>>>    import flash.system.*;
>>>    import flash.net.*;
>>>    import flash.ui.*;
>>>    import flash.text.Font;
>>>    }#
>>>
>>> That passthrough pragma causes the block of code to get stuck into the
>>> generated as3 file in the right place, it ends up compiling to
>>>
>>> package {
>>>      import flash.display.*;
>>>    import flash.events.*;
>>>    import flash.utils.*;
>>>    import flash.text.*;
>>>    import flash.system.*;
>>>    import flash.net.*;
>>>    import flash.ui.*;
>>>    import flash.text.Font;
>>>    public class LFCApplication {
>>> ;
>>> ;
>>>
>>>
>>>
>>>
>>> On Thu, Sep 11, 2008 at 10:23 PM, J Crowley <jcrowley at laszlosystems.com<mailto:
>>> jcrowley at laszlosystems.com>> wrote:
>>>
>>>    So, I'm working on getting the video stuff to compile in SWF9, and
>>>    it's complaining about things like System and Microphone being
>>>    undefined.  (These refer to the Flash APIs for System and Microphone
>>>    and Camera -- for instance, System.showSettings() will display the
>>>    Flash dialog regarding permissions for microphones and cameras.)
>>>     How are these called in SWF9?  It seems like all of them are
>>>    considered undefined (which in SWF9 results in compiler errors).
>>>
>>>
>>>
>>>
>>> --
>>> Henry Minsky
>>> Software Architect
>>> hminsky at laszlosystems.com <mailto:hminsky at laszlosystems.com>
>>>
>>>
>>>
>>
>
>


-- 
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20080912/bc2d2d1d/attachment.html


More information about the Laszlo-dev mailing list