OpenLaszlo 4.4 released – video components improved, full screen support for SWFx

by Raju Bitter on July 1, 2009

The OpenLaszlo team has announced the 4.4 release of the OpenLaszlo platform. There are many goodies in this release, an impressive number of 180 bugs have been fixed, mainly for the DHTML runtime. That’s good, since there has been a lot of worked focused on the SWF9 runtime until early 2009, and the DHTML runtime need a bit of polishing. Here’s a quote from the announcement:

“This release also has a number of improvements, and significant advances such as:

  • Internet Explorer oddities have been resolved, such that it works similarly to FireFox and Safari.
  • Context menus have been updated to work with DHTML.
  • You can now use non-latin characters (such as Chinese and German) in CSS styles by using utf8 file encoding.
  • DHTML now includes the “standard” debugger console, just as swf8 and swf9 do.”

Ongoing improvement of video and audio components in OpenLaszlo

Sarah Allen has done a lot very valuable work to improve the video and audio support in the SWF runtimes. Many bugs have been fixed as part of her work. As part of this ongoing improvement Sarah started a project for better integration of OpenLaszlo with video into Rails (hosted on GitHub.com). She has posted wireframes of the video component in her blog.  I’ll devote some time to testing the components and adding one or the other feature. I believe that any RIA framework needs some feature where things are much easier to do than with other frameworks. Having the best working and simplest-to-use video components in the RIA space would definitely be such a feature.

Full screen support for OpenLaszlo in the SWF runtimes

The latest 4.4 release supports the Flash Player’s full screen mode. I finally found the time to integrate the LZX code I posted on my blog a while ago into the platform. That means, with just one method call you can switch from default viewing mode into fullscreen:


canvas.setAttribute("fullscreen", true)

That’s supported for both the SWF8 and SWF9 runtime, making development of full screeen Flash application a lot easier than doing the same with Flash CS4 or Flex. The <canvas> has a new attribute now:


<canvas allowfullscreen="true">

Here's a small example application showing how it works:

And the source code for this application:


<canvas width="100%" height="100%" allowfullscreen="true">

    <view align="center" valign="middle" bgcolor="#ffcc00">
        <simplelayout spacing="30" axis="y" inset="20"/>
        <button align="center" text="Click me to switch view mode!"
                onclick="canvas.setAttribute('fullscreen', canvas.fullscreen != true)"/>
        <text align="center" fontsize="${canvas.width/20}" text="${'canvas.fullscreen='+canvas.fullscreen}"></text>
    </view>

</canvas>

To use the full screen feature you have to set the allowfullscreen attribute to true. In case you forget to do so, the application will output a warning method in the debug window:

ERROR: Please set <canvas allowfullscreen=”true” /> for fullscreen support

The Flash Player checks the embed code for a parameter allowFullScreen, which must be set to true for an application to be allowed to show the full screen mode. If you set the the canvas attribute allowfullscreen"true", that parameter will be added for you. If you use your embed code for the SWF file, please remember to do so. The OpenLaszlo debugger will show the following warning if the embed code is not correct:

ERROR: Flash Player Security Error Error #2152: Full screen mode is not allowed.
Usage of fullscreen feature is supported starting with Flash Player 9.0.28 (Windows & OS X) and 9.0.115.0 (Linux).
You are currently using Flash Player 10.22
ERROR: Check your SWF embed code for missing param taginside the tag, or missing attribute allowFullScreen=”true” in tag.
canvas.setAttribute(”fullscreen”, true) can be called only in response to a mouse click or keypress.

The feature has not been documented yet in the OpenLaszlo Developer Guide, but I’ll add the documentation within the next days.

Share:
  • Print this article!
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • StumbleUpon
  • E-mail this story to a friend!
  • Ping.fm
  • Twitter

{ 2 trackbacks }

sYnie’s Weblog » OpenLaszlo and Full Screen / Kiosk Mode
July 5, 2009 at 23:28
devl.net » OpenLaszlo and Full Screen / Kiosk Mode
July 5, 2009 at 23:37

{ 1 comment… read it below or add one }

silver February 6, 2010 at 14:26

Thank you Raju Bitter. People like you make the internet a much better place to use. I am a very very beginner in OpenLaszlo and really looking forward to making my first fullscreen slideshow using your finding. Thanks again.

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post: Adobe afraid of communicating with us, or when will Flash Player bug FP-40 be fixed?

Next post: Toshiba notebooks with OpenSolaris pre-installed