This is my first Adobe AIR application, I was experimenting the HTML component ..

Web browser using Adobe AIR

Source code:

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
title="My AIR Browser">
<mx:Script>
<![CDATA[
private function onClick(event:Event):void {
if(event.currentTarget == urlButton){
myHTML.location = urlTextInput.text;
} else if(event.currentTarget == backButton){
myHTML.historyBack();
} else if(event.currentTarget == forwardButton){
myHTML.historyForward();
} else {
//DO NOTHING!!!
}
}
]]>
</mx:Script>
<mx:ApplicationControlBar width="100%">
<mx:VBox width="100%">
<mx:HBox width="100%">
<mx:Button id="backButton" label="<" fontWeight="bold"
click="onClick(event)"/>
<mx:Button id="forwardButton" label=">" fontWeight="bold"
click="onClick(event)"/>
<mx:Label text="URL:" fontWeight="bold"/>
<mx:TextInput id="urlTextInput" text="{myHTML.location}" width="235"/>
<mx:Button id="urlButton" label="OK"
click="onClick(event)"/>
</mx:HBox>
</mx:VBox>
</mx:ApplicationControlBar>
<mx:HTML id="myHTML" width="100%" height="100%"
location="http://google.com"/>
</mx:WindowedApplication>


  1. Very cool.. I’d been looking for something like this.
    http://ArtistOneAnalytics.com

  2. Jeff

    Nice, thanks.

    Is it possible to get an Adobe Air browser to play Flash within the web pages? It seems backward that the entire thing is built on the Flash engine but can’t actually play Flash in the web pages of it’s browser control.

  3. arun

    Nice,

    Is it possible to load a secured sites without security alert in AIR browser

  4. Daniel Frank

    Hi!
    Good example, but…links with download not work yet. know you how make work?
    Thx

  5. Henrik

    Is it possible to get this to work, if I choose <mx:Application instead of <:mxWindowedApplication ???

    I haven’t got it to work, and i really need it.

  6. syed

    Henrik,
    As this web-browser uses AIR specific features/capabilities, so you will not be able to compile the code by enclosing it in <mx:Application…..
    -syed

  7. syed

    Jeff,
    You can play/view flash fine in web page of AIR browser, it will work similar as it works in browser.
    -syed

  1. 1 ShiftBrowse » Prototype on Adobe Air- development

    [...] A web browser using Adobe AIR [...]




Leave a Comment