Top 10 external bugs of Flash Runtime in Jan 2012

Here is the Top 10 external bugs of Flash Runtime in Jan 2012, which is order by incoming votes in Adobe bug base:

1. Mac OSX Player Issue: kernel: IOSurface: buffer allocation size is zero

The log file (kernel.log) gets flooded with "kernel: IOSurface: buffer allocation size is zero." messages.

https://bugbase.adobe.com/index.cfm?event=bug&id=3077658

2. iOS and Android Native Scroll

https://bugbase.adobe.com/index.cfm?event=bug&id=2958123

3. Flash 11 showing black shapes in BBC iplayer

https://bugbase.adobe.com/index.cfm?event=bug&id=3008910

4. Video not working correctly for Air 3.1.0.556 on Android ICS

https://bugbase.adobe.com/index.cfm?event=bug&id=3100560

[……]

Read more

Flash Player 11.2/AIR 3.2 beta 5 available

January 31, 2012 — Adobe Flash Player 11.2 beta 5 is now available for download. Note that this is the last beta before final release.

This beta release provides access to the Flash Player 11.2 runtime for Windows, Mac OS and Linux desktop environments. The key features and benefits of Flash Player 11.2 beta are:

Drivers gating for hardware acceleration relaxed — Previously, the hardware accelerated content was gated to 1/1/2009, however, we have relaxed the driver gating to 1/1/2008.

点评:之前的Flash Player 11版本限制了显卡驱动日期不能早于1/1/2009,现在改为了1/1/2008,这样将极大扩充Flash Stage3D游戏的用户群,毕竟游戏公司不能强制用户去升级显卡驱动程序。

p.s. 我们应该感谢Adobe中国传教士团队和游戏谷公司向Flash产品经理团队的反馈。

Throttling event — This release introduces a new ThrottleEvent. A ThrottleEvent is now dispatched by the stage when the Flash Player throttles, pauses or resumes content.

点评:这个事件的添加将有效解决网页游戏最小化后自动降低帧频的问题。

p.s. 我们应该感谢Adobe China用户体验团队向Flash产品经理团队的反馈。

Mouse lock, relative mouse coordinates, right and middle click events — Create immersive, panoramic games with infinite scrolling to enable new classes of content, including first-person games.

点评:这个不用说了,鼠标锁定,右键和中键事件响应是很多游戏开发者迫切需要的功能。

[……]

Read more

Building Social Applications with AIR

这里是Adobe官方网站对于AIR的介绍:

Adobe® AIR® 运行时使开发人员能使用 HTML、JavaScript、Adobe Flash® Professional 软件和 ActionScript® 构建 Web 应用程序,这些应用程序可以作为独立的客户端应用程序运行并且不受浏览器的约束。Adobe AIR 作为 Flash Platform 的一个关键组件,为跨设备和平台交付应用程序提供了一个一致、灵活的开发环境,使设计人员和开发人员能完全释放自己的创意。现在提供 AndroidΤΜ BlackBerryΤΜ Tablet OS 和 iOS* 移动操作系统及电视支持。

MixMatchMusic首席执行官兼共同创始人,MobBase 移动应用程序服务开发人员,Charles Feinn,这样评价Adobe AIR:

借助 Adobe AIR,我们将相同的代码用于桌面、Tablet 和智能手机,这不仅为我们节省了时间和资金,还提供了部署效率。我们随后可以快速、有效地通过 Adobe 的应用程序分发服务 Adobe InMarket 分发这些应用程序。

Emantras Inc. 首席执行官,Sesh Kumar也给Adobe AIR不错的评价:

使用 Adobe AIR 和 Flash Platform 创建应用程序的投资回报和资源节省真正扭转了形势。AIR 是唯一可用的解决方案,它允许您通过重用代码瞄准智能手机、Tablet、台式机和电视。通过多种设备提供电子教学内容的能力令几乎所有人都能进行学习。

Adobe AIR诞生数年来,已经从1.0版本升级至如今的2.5版本,产品日趋成熟,其跨平台理念也从电脑桌面扩展到了移动平台,包括Android系统、iOS系统、黑莓系统等等。

[……]

Read more

AIR Auto update introduction

AIR 1.5 加入了自动升级的类air.update.ApplicationUpdater,这样你的AIR应用程序便可以通过网络自动更新到最新版本了。

注意:Flex SDK 3.2以上才支持AIR 1.5。

自动更新的原理:ApplicationUpdater 会去读取网络上的一个XML版本描述文件,其中包含了版本号和对应的安装文件路径以及更新描述信息,然后和当前运行的AIR程序版本进行比较,来决定是否下载和安装。
这里有一个例子:

<?xml version="1.0" encoding="utf-8"?>  
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="checkForUpdate()">  
    <mx:Script>  
        <![CDATA[  
            import mx.controls.Alert;  
            import air.update.events.UpdateEvent;  
            import air.update.ApplicationUpdaterUI;  
            private var appUpdater:ApplicationUpdaterUI = new ApplicationUpdaterUI();  
  
            private function checkForUpdate():void {  
                appUpdater.updateURL = "http://localhost:8400/team/xml/test-update.xml"; // Server-side XML file describing update  
                appUpdater.isCheckForUpdateVisible = false; // We won't ask permission to check for an update  
                appUpdater.addEventListener(UpdateEvent.INITIALIZED, onUpdate); // Once initialized, run onUpdate  
                appUpdater.addEventListener(ErrorEvent.ERROR, onError); // If something goes wrong, run onError  
                appUpdater.initialize(); // Initialize the update framework  
            }    
            private function onError(event:ErrorEvent):void {  
                Alert.show(event.toString());  
            }  
            private function onUpdate(event:UpdateEvent):void {  
                appUpdater.checkNow(); // Go check for an update now  
            }  
        ]]>  
    </mx:Script>  
</mx:WindowedApplication>  

[……]

Read more

Top key events of Java in 2011

The Release of Java 7

Five years after Java 6, Oracle brought Java 7 to us in July 2011, with new I/O APIs, support for dynamically typed languages and some other small language enhancements.

As software developers, we all understand that it’s tough to meet a deadline, so we really shouldn’t complain about the delay in Java 7. At least Mark Reinhold and company have got a pretty good roadmap in place for the follow on release of Java 8, late 2012.

Oracle vs Google

Oracle’s lawsuit against Google has been going on a while now and the trial date has been pushed to 2012. It seems Oracle is keen to get the trial going as soon as possible, with their claim that Java is ‘losing ground to Android’.

The Ongoing Rise of Android

A review of the year would be incomplete without some mention of Android. With the latest repost of three million Android device activations over Christmas weekend, the momentum of Google’s mobile OS shows no signs of stopping.

[……]

Read more

Flash FileReference loose cookies during upload issue (1)

This is a very famous issue since 2005:  Flash FileReference loose cookies during upload under Firefox/Chrome/Safari. Exists in Windows and Mac OS.

Refer: https://bugs.adobe.com/jira/browse/FP-78

Root Cause: These browsers not provide API for Flash to get session cookies while Microsoft IE support it.

First I will give solutions for PHP applications. Then I will give Java EE version in the following articles.

PHP: very easy to verify it, a very simple test page

<?php
  // initialize a session
  session_start();
                    
  // print value
  $_SESSION['animal'] = 'cat';

  echo '<object width="550" height="400">';
  echo '<param name="movie" value="uploadTest.swf">';
  echo '<embed src="uploadTest.swf" width="550" height="400">';
  echo '</embed>';
  echo '</object>';
?>
dispatcher.addEventListener(Event.SELECT, selectHandler);

function selectHandler(event:Event):void
{
    var file:FileReference = FileReference(event.target);
    file.upload(kUrlReq);
}
<?php
session_start();
if ($_SESSION['animal'] != 'cat')
{
    header("HTTP/1.1 403 Forbidden");
    exit();
}
else
{
    header("HTTP/1.1 200 OK");
    exit();
}
?> 

Then it will always go to "HTTP/1.1 403 Forbidden" which lead to Error #2038 in Flash, means that Flash loose session cookies during upload.

How to resolve it? We can’t wait for browsers add support for Flash. So we can get PHPSESSID first, then pass it to server side via GET/POST.

[……]

Read more