Tuesday, March 20, 2007

The Apollo public alpha

Adobe's Apollo came out yesterday, which is similar to many other tools already out there ( Zinc, mProjector, screenwaver, etc. ). I've spent some time making a few applications and felt it needed some attention. So what is the difference between these and why is this something to care about?

The main point is that Adobe made it and because of that there are simpler implementations of things that are rather complex in many of the other products and it does a few things they can't. Most of the other ones work by sending things out of FScommand, but have limited ways of receiving things back from the system. Their set up is usually based on add-ons or fitting things into what Adobe has already made but with apollo they seem to much more closely tried system level processes with actionscript then the other projector tools that I've used.

In short, because Adobe has control of their technology they have not only added ways to talk to things outside of flash but given control elements inside of your swf from the outside. They have a much more basic functionality in terms of system control then the others do but most projects only need basic system level control.

What does Apollo have that these others don't?
Apollo is way more then these other projector type applications, Apollo has 4 main parts: window controls, file system controls, calling scripts ( which is what the others do ), and combining the different web technologies together (html/javascript and flash).

This last part is the kicker.
var htmlView:HTMLControl = new HTMLControl();
You now have an element in side of your swf that can load an html page, then with javascript like you normally do or actionscript you can manipulate this element like any other movieclip on your stage.

// from an apollo application open a new window and add a html element to it.

package {
import flash.display.Sprite;
import flash.html.HTMLControl;
import flash.net.URLRequest;
import flash.display.NativeWindow;
import flash.display.NativeWindowInitOptions;
import flash.display.NativeWindowSystemChrome;

public class Main extends Sprite
{
public function Main()
{
// window options
var options:NativeWindowInitOptions = new NativeWindowInitOptions();
options.systemChrome = NativeWindowSystemChrome.STANDARD;
options.transparent = false;

var newWindow:NativeWindow = new NativeWindow(false, options);
newWindow.title = "Hey cool.";
newWindow.width = 800;
newWindow.height = 600;
newWindow.visible = true;

//newWindow is a NativeWindow instance
var htmlView:HTMLControl = new HTMLControl();
htmlView.width = newWindow.width;
htmlView.height = newWindow.height;

//set the stage so display objects are added to the top-left and not scaled
newWindow.stage.align = "TL";
newWindow.stage.scaleMode = "noScale";
newWindow.stage.addChild( htmlView );

//set exposeRuntime=true to allow JavaScript on the page to reference ActionScript classes
htmlView.exposeRuntime = true;

//urlString is the URL of the HTML page to load
var urlReq:URLRequest = new URLRequest("http://www.listenerinteractive.com/");
htmlView.load(urlReq);

}
}
}

This was my first application and I'll write more about this soon, but this very simple small thing is the start of something very big in my mind.

Labels: ,

start

I've opened many accounts around the internet but few of them I do anything with. This is one of them but I'm going to start posting. Mark my words today is the beginning.