Category: AIR

Adobe Air htmlLoader flash content doesn’t appear

4:42 pm on August 14th, 2008, by Jeff Khan

More Air conditioning…Under certain circumstances Flash and PDF content will not display in a htmlLoader when

  • You scale the HTMLLoader object to a factor other that 1.0.
  • You set the alpha property of the HTMLLoader object to a value other than 1.0.
  • You rotate the HTMLLoader content

    AND IT WILL NOT DISPLAY IF THE WINDOW IS TRANSPARENT CHROMELESS
    When i think about it it makes sense not to render but this has been annoying me to no end, since the stage i was working with had a background (but the windows were set to tranparent)

    found this on live docs..

    http://livedocs.adobe.com/air/1/devappsflash/help.html?content=ScriptingHTMLContainer_2.html

2 comments » | Adobe, AIR, flash

Adobe Air htmlLoader scales content by default

2:15 pm on August 14th, 2008, by Jeff Khan

More AIR conditioning for you..

When adding a HTMLLoader to the stage the contents by default scale to the size of the window. And this is not so helpful if you want to open one up in a new window.

you should be setting these properties too:

stage.scaleMode = StageScaleMode.NO_SCALE
stage.align = StageAlign.TOP_LEFT

If you are loading HTMLLoader using a new window i.e:-

var options:NativeWindowInitOptions = new NativeWindowInitOptions();
options.systemChrome = NativeWindowSystemChrome.NONE;

var window:NativeWindow = new NativeWindow(options);
var htmlLoader:HTMLLoader = new HTMLLoader();

// SET THIS–
window.stage.scaleMode = StageScaleMode.NO_SCALE
window. stage.align = StageAlign.TOP_LEFT

before you do your loading..

htmlLoader.load(new URLRequest(blah))

1 comment » | Adobe, AIR, flash

Adobe AIR jsfl publish swf and create AIR package at once

11:52 am on August 1st, 2008, by Jeff Khan

In order to publish an air package you have to create it from the latest swf file. However the Flash AIR extension gives you commands to create and publish air files but not publish the swf in one go.

On windows in ..
C:\Program Files\Adobe\Adobe Flash CS3\en\First Run\Commands

You can add dom.publish() to the AIR – Create AIR File.jsfl just before this line:-

FLAir.PackageAIRFile(flaFilePath);

Alternatively copy and paste the following into your own custom publish and create AIR jsfl file! Useful and i’ll be working on a network debugging window to test air apps running desktop commands soon..useful as you cant test in the authoring environment.

//fl.trace(“Artemis”);
var dom = fl.getDocumentDOM();

if (dom == null)
{
alert(“Failed to get current document.”);
}
else
{

var flaFilePath = dom.path;
//fl.trace(flaFilePath);
//fl.trace(dom.playerVersion);
//fl.trace(dom.asVersion);
//fl.trace(dom.getSWFPathFromProfile());

if(!flaFilePath)
{
alert(“The Flash AIR file must be saved before opening AIR Application and Installer Settings and before creating the AIR file.”);
}
else
{
if(dom.getPlayerVersion() == ‘AdobeAIR1_0′)
{
dom.publish()
FLAir.PackageAIRFile(flaFilePath);
}
else
{
//alert(“The Publish target is not Adobe AIR 1.0.”);
var gotOK = FLAir.PackageAlert(flaFilePath);
if (gotOK == 1)
{
dom.setPlayerVersion(‘AdobeAIR1_0′);
dom.save();
FLAir.OpenSettingDialog(flaFilePath);
}
}
}
}

Comment » | Adobe, AIR, flash

Adobe Air badge install Error# 2023

12:14 pm on July 31st, 2008, by Jeff Khan

Another AIR gotcha..
As well as allowing your server access to the .air filetype make sure the location to the air file is the absolute path unlike the relative path in Adobe’s own example!

credit to this blog entry:
http://blog.joshbuhler.com/2008/06/30/air-installer-badge-error-2032/

Comment » | Adobe, AIR, flash

Adobe Air launch at startup in Flash AS3 Class

11:52 am on July 31st, 2008, by Jeff Khan

As Adobe AIR is still relatively new, i’ll be documenting my train of thought my finds and roadblocks on Labs, it could get messy – you have been warned! Here’s another:-

To force an application to launch at startup,when a user logs in, you must use this

NativeApplication.nativeApplication.startAtLogin = true;

When it’s used in an AS3 class and not on the root of the flash document you must import

import flash.desktop.*;

Was previously importing all the AIR classes to no avail..

5 comments » | Adobe, AIR, flash

Back to top