It seems OpenLaszlo can run on AIR. What's less obvious is whether OpenLaszlo apps can use the AIR-specific APIs, like file system access. If so, how exactly is this done?
相关问题
- Should I wait for Flash Player 10.1 or go with Fla
- How to load flex swf from flash?
- IntPtr in 32 Bit OS, UInt64 in 64 bit OS
- DisposableAction and Marshal.ReleaseComObject
- Displaying two fullscreen windows on two monitors
相关文章
- How To Programmatically Enable/Disable 'Displa
- Import WinAPI Function in *.VBS File
- Is there a way to release unmanaged resources when
- as3 ByteArray to Hex (binary hex representation)
- getElementById not working in Google Chrome extens
- How to load images and fragments dynamically in Li
- Libraries for text animation in Flex / Actionscrip
- How to upload BitmapData to a server (ActionScript
OpenLaszlo does implement features which are available in certain runtimes only. That's true for MP3 audio playback, Flash Player webcam and microphone access, RTMP streaming. The OpenLaszlo compiler supports inserting ActionScript code directly into scripts and methods.
Here is an example application which catches the Event.DEACTIVATE and Event.ACTIVATE events, and lets you exit the application by clicking/touching the red view.
ActionScript 3 APIs can be imported using the <passthrough> tag - which can be used inside the canvas, class definitions or any tag instance in your code.
If you want code to be executed for the SWFx runtime only, you can check put that code into blocks checking the $as3 property:
Using the approach, it's easy to re-use LZX code for either DHTML, SWFx or AIR applications.
While I don't have any specifics, the article you linked mentions that his application window can be dragged and closed. Those are AIR-only APIs (see the NativeWindow class), so presumably what you're asking about must be possible to some extent.
However, my understanding is that OpenLaszlo tries not to implement things that can be done in Flash but not (say) DHTML, so it may be less obvious how to do things like local file access. Probably you'll want to download the source linked in the article and see how he implemented the window drag/close.