Adobe Opens Flash Format Specifications for SWF, AMF and Flash Video FLV (Open Screen Project)

Adobe is taking the inside lane in the industry it seems with the Open Screen Project. What does this mean? It seems like SWF and FLV formats are now largely open and licenses removed. With the XFL format possibly on its way (probably based on mxml) to replace closed .FLA files it is pretty clear that Adobe and Flash will see a large uptick in the mindshare. As well as looking to create a broader mobile platform for the flash player.

The Open Screen Project will address potential technology fragmentation by enabling the runtime technology to be updated seamlessly over the air on mobile devices. The consistent runtime environment is intended to provide optimal performance across a variety of operating systems and devices, and ultimately provide the best experience to consumers.

To support this mission, and as part of Adobe’s ongoing commitment to enable Web innovation, Adobe will continue to open access to Adobe Flash technology, accelerating the deployment of content and rich Internet applications (RIAs). This work will include:

  • Removing restrictions on use of the SWF and FLV/F4V specifications
  • Publishing the device porting layer APIs for Adobe Flash Player
  • Publishing the Adobe Flash® Cast™ protocol and the AMF protocol for robust data services
  • Removing licensing fees – making next major releases of Adobe Flash Player and Adobe AIR for devices free

This is big. It has mutiple prongs. Adobe would like to make Flash a common mobile standard, hrm no Apple on this list (it is probably a slight move there against that).

Adobe would also like to continue their lead of web video. And they finally are recognizing the closed format of SWF is not as desirable as an open one, there is still considerable control for Adobe over the player. But they get insights and contributions from many large companies to help make it work on their platform, engraining the format further. The providers, especially mobile and internet tv, will want to provide good user experiences to compete with the iPhone and regular T.V. respectively. Flash being open helps both of those markets.

Adobe is also moving further to open source key formats and technologies like the recent Flex 3 SDK and now the AMF format which was a roadblock. This is probably good news for servers like Red5 and also many other media servers and remoting services in many more place. AMF is particularly nice because it is a binary, extremely compact and limited bloat format. Without it being open it loses much of its benefit as a standard. Being open and a further crunching from the XML bloat services, this can be very good for many reasons such as throughput and faster services, apps and games with remote data.

Another reason is the desktop market. They want Flash to work flawlessly on Linux but they don’t’ have the manpower for a 2% market share. So this is a very smart move for the desktop players (AIR, and Linux Flash).

The only thing that partially makes it scary is the line up, Sony, Verizon, etc. As long as these are contributors and not partners in DRM crime then we have something. Hopefully they are in it to make better entertainment and mobile platforms cheaper.

Being able to peer into the code and a move to allow better open integration makes it a better platform, where better stuff can be built on top of that. Let’s hope it is done right. Everyone is making Apple look really closed and locked down lately.

A Peek into the AS3 and AVM2 Virtual Machine and ‘Elastic Racetrack’

PyAMF 0.3 Released and Sample on Google App Engine

A great Action Message Format (AMF) remoting kit for server side for the pythonistas is pyAMF, they recently released PyAMF 0.3 and have a sample running up on Google App Engine. There is also a tutorial for getting PyAMF running on Google App Engine. Aral Balkan got this running as well.

Features of pyAMF currently:

More on the PyAMF library:

AS3, Convert Python Code to Flex AS3 with flex-pypy

I have officially been sucked into the Python vortex. I recently have really been digging IronPython, Jython and good old plain Python but have not ventured here yet. Google (They employ Guido), Microsoft (IronPython) and Sun (Jython) are all becoming infected pythonistas as well. But this is just too cool, Python to AS3 code with flex-pypy. This project is very young but could be fun, source at Google Code.

Haxe has a similar premise where it can compile to Flash6-9 versions of actionscript 2-3 which makes for a system with better reach. Python code for this is lots of fun and very flexible. Python is becoming a baseplane language and one great language for transcending platform lock-in.

Check out this snippet pulled from here (click to see sample game)

#/usr/bin/env python
"""
This simple example has very little to do with the pygame
chimp example, except that it will act the same (more or less)
and it uses the same resources, only they got converted to
mp3s, pngs.
"""

#Import Modules
from pypy.translator.flex.modules.flex import *

class MyRect:
    def __init__(self,x,y,w,h):
        self.x, self.y,self.w,self.h = x,y,w,h

SCREEN_W = 468
SCREEN_H = 60

class Game:
    def __init__(self):pass

    def init(self,screen):
        self.screen = screen
        screen.layout = 'absolute'
        screen.setActualSize(SCREEN_W, SCREEN_H)

        screen.addEventListener('mouseMove',mousemotion)
        screen.addEventListener('enterFrame',do_loop)
        screen.addEventListener('click',chimp_whip)

        self.bg = load_sprite("py_background_png");
        self.screen.addChild(self.bg)

        self.chimp = load_sprite("py_chimp_png");
        self.screen.addChild(self.chimp)

        self.orig_y = self.chimp.y

        img2 = self.fist = load_sprite("py_fist_png")
        self.screen.addChild(img2)
        img2.move(400,img2.height/2)
        self.move = 1
        self.spin = 0
        self.hit = 0
        self.hit_move = 1

        self.sfx = {}
        self.sfx['whip'] = load_sound_resource("py_punch_mp3")
        self.sfx['nohit'] = load_sound_resource("py_whiff_mp3")

    def loop(self):
        img = self.chimp
        if self.spin:
            self.spin -= 1
            img.rotation = self.spin*24
        else:
            img.x += self.move * 8
            if img.x > SCREEN_W-img.width:
                self.move = -1
            if img.x < 0:
                self.move = 1

        if self.hit:
            self.hit -= 1
            self.fist.y += 6 * self.hit_move

            if self.hit  SCREEN_W - img_halfw:
        newx = SCREEN_W - img.width
    if newx  img.x and e.stageX < img.x+img.width:
        game.sfx['whip'].play()
        game.spin = 20
    else:
        game.sfx['nohit'].play()

def flash_main( x=1 ):
    game.init(castToWindow(x))

Moock Mentions XFL for Open Flash IDE Source Formats

Colin Moock an actionscript brain since the great Flash 4 advances that brought all sorts of fun to flash, like games, has mentioned XFL an open format for flash from a discussion with Adobe product managers.

This would be a format that would be able to import, export and allow compile to SWF. MXML for Flex does this now but bringing the two together into one common format and allowing for all sorts of open source and third party contributions to making flash will let it literally explode in support.

I recently met with Flash authoring product-manager, Richard Galvan, to talk about Diesel, the next version of Flash (i.e., Flash CS4, or version 10 for those counting). Adobe has already demonstrated a bunch of high-impact features for Diesel, including inverse kinematics, a new tweening model, 3D “postcards in space”, and advanced text components (see MAX 07 keynote, FOTB 07 keynote, and FITC Amsterdam 08 keynote). But Richard was keen to talk about a lesser known feature quietly percolating behind the scenes: XFL.

Since its inception, the Flash authoring tool has stored documents in a binary source-file called .fla. Historically, interchanging source with the Flash authoring tool has been virtually impossible for third-party software because the specification for .fla has never been public. But things are changing in the next version of Flash. Flash CS4 will be able to export *and* import a new source format called XFL. An XFL file is a .zip file that contains the source material for a Flash document. Within the .zip file resides an XML file describing the structure of the document and a folder with the document’s assets (graphics, sounds, etc). The exact details of the XFL format are not yet available, but Richard assures me that Adobe intends to document them publicly, allowing third-party tools to import and export XFL.

If this is a market test or check of interest I think that everyone I know working with flash would be very excited about opening and unifying the flash format and allowing great IDEs and tools to help produce better flash content more quickly. Also, with the competition Silverlight using XAML (uncompressed) this also allows a competitive advantage maybe making Silverlight add better compression and loading tools beyond their downloader object.

I hope this is also in the plans for Director. If they used similar formats it could be very nice and something to watch as an emerging market to prepare for.

Read the full post at moock.org

A Take on Flash on the iPhone by Daring Fireball

Flash not being on the iPhone yet is quite telling of the type of company battles going on. I like what Apple produces many times but they love a locked down environment more than Microsoft, in fact Microsoft seems like an open company and open market that is for sure compared to Apple. I am starting to think it will not happen, Flash on the iPhone. I have to boycott the iPhone for the type of closed environment that only non-developers can love. There are certain technologies, open or not, that become base technologies that create a platform of commonality to even make a market possible, the mobile market seems to be doing everything to not let that happen.

Daring Fireball (John Gruber) has a good take on the situation.

There are currently two ways to develop software for the iPhone (and iPod Touch): using HTML/CSS/JavaScript web standards, and using Cocoa. Cocoa is proprietary, but from Apple’s perspective, it’s the good sort of proprietary: a competitive advantage completely owned and controlled by Apple. Apple doesn’t control the HTML/CSS/JavaScript web standards, but neither does anyone else. And Apple does control and own WebKit, which is by anyone’s measure the best mobile implementation of these standards today.

Flash, on the other hand, is (from Apple’s perspective) the wrong sort of proprietary — owned and controlled by another company. Apple and Adobe aren’t enemies, but they’re certainly competitors, and the history between the two companies is not entirely warm.1 In the grand scheme of things, I suspect Apple’s executives aren’t happy at all about Flash’s prominent and entrenched role in desktop computing, particularly the fact that Flash, rather than QuickTime, has become the de facto standard for video on the web.

It is all about control…

The mobile market is wide open in ways that the desktop market is not. E.g., in the mobile OS market, Microsoft isn’t even in first place, let alone a monopoly. And, in the mobile world, Flash is rare, not ubiquitous. Why would Apple help Adobe establish Flash as a de facto standard for the mobile web, too? If Flash does turn into a major force in the mobile world, Apple can always add it later. But why shouldn’t Apple push for a Flash-free mobile web future now?

As it stands today, Apple is dependent on no one other than itself for the software on the iPhone. Apple controls the source code to the whole thing, from top to bottom.2 Why cede any of that control to Adobe?

Unfortunately if Gruber is right the mobile market will continue to be a lag in areas such as gaming, vector based apps, video, competitive markets, and many other things that lead to innovation. I think some of the recent changes in mobile recently are extermely cool (iPhone, Android, new flashlite) but unfortunately they have added about 20 new directions that mobile developers have to develop for. It is anything but a consistent platform even within the company silos being created in the mobile market.

AS3 Parsing RSS Feed

Mike Chambers has a great post on parsing RSS in AS3 with as3syndicationlib. I had some info on this in development but Mike’s post is very simple and just posting the code here for reference.

import com.adobe.utils.XMLUtil;
import com.adobe.xml.syndication.rss.Item20;
import com.adobe.xml.syndication.rss.RSS20;

import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.events.SecurityErrorEvent;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.net.URLRequestMethod;

private var loader:URLLoader;

//url of rss 2.0 feed
private static const RSS_URL:String = "http://feeds.feedburner.com/MikeChambers/";

//called when user presses the button to load feed
private function onLoadPress():void
{
 loader = new URLLoader();

	//request pointing to feed
 var request:URLRequest = new URLRequest(RSS_URL);
 request.method = URLRequestMethod.GET;

	//listen for when the data loads
 loader.addEventListener(Event.COMPLETE, onDataLoad);

	//listen for error events
 loader.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
 loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError);

	//load the feed data
 loader.load(request);
}

//called once the data has loaded from the feed
private function onDataLoad(e:Event):void
{
 //get the raw string data from the feed
 var rawRSS:String = URLLoader(e.target).data;

	//parse it as RSS
 parseRSS(rawRSS);

}

//parses RSS 2.0 feed and prints out the feed titles into
//the text area
private function parseRSS(data:String):void
{

	//XMLSyndicationLibrary does not validate that the data contains valid
 //XML, so you need to validate that the data is valid XML.
 //We use the XMLUtil.isValidXML API from the corelib library.
 if(!XMLUtil.isValidXML(data))
 {
 	writeOutput("Feed does not contain valid XML.");
 	return;
 }	

	//create RSS20 instance
 var rss:RSS20 = new RSS20();

		//parse the raw rss data
 	rss.parse(data);

		//get all of the items within the feed
 	var items:Array = rss.items;

		//loop through each item in the feed
 	for each(var item:Item20 in items)
 	{
 		//print out the title of each item
 		writeOutput(item.title);
 	}
}

private function writeOutput(data:String):void
{
 outputField.text += data + "\n";
}

private function onIOError(e:IOErrorEvent):void
{
 writeOutput("IOError : " + e.text);
}

private function onSecurityError(e:SecurityErrorEvent):void
{
 writeOutput("SecurityError : " + e.text);
}

Check out the full post on this at Mike’s blog.

Follow

Get every new post delivered to your Inbox.