Adobe Air htmlLoader flash content doesn’t appear

4:42 pm, by jeff

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

Adobe Air htmlLoader scales content by default

2:15 pm, by jeff

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))

IE7.js & CSS Expressions…

2:08 pm, by Neil

May seem like a long winded title but i have been online looking for solutions to this and none seem to exist… so here we go…

I’ve been pulling my hair out trying to fix this one…

I’m using Dean Edwards’ IE7.js (http://dean.edwards.name/IE7/  - best PNG fix out there i reckon….) alongside with Nick Stakenburg’s Lightview (www.nickstakenburg.com/projects/lightview/).

I was getting an js error in IE6 only… ‘px is undefined’. As a result of this the lightbox was expanding from the top and left, as aposed to dead center, as lightboxes tend to do.

I quickly realised that this was to do with CSS expressions, specifically used in lightview.css to position the lightbox centrally in the viewport in IE6.
From reading another post on googlecode, I discovered that IE7.js deletes any strings in css expressions…. I’m not clever enough to understand why…

As you can see from this attached file the only strings in the above code are a few instances of ‘px’.

After figuring that bit out the solution was actually pretty simple…. delete all the above instances of ” + ‘px’ “.

This way rather than returning, for example “250px” as the expression should do, it actually just returns “250″, and IE makes this a pixel value by default.

And what do you know… problem solved! Happy times people… happy, happy times….

Adobe AIR jsfl publish swf and create AIR package at once

11:52 am, by jeff

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);
}
}
}
}

Adobe Air badge install Error# 2023

12:14 pm, by jeff

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/

Adobe Air launch at startup in Flash AS3 Class

11:52 am, by jeff

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..

Check your Google Map API versions

3:42 pm, by Clare

Got a problem with a Google Map? Don’t forget to check what version of the API you’re using!

It’s easy to copy and paste the map javascript include over from another project without checking the version -
but if you’re not using the latest version and you’ve got a problem it could have been fixed in the latest release.

Seems obvious, but sometimes the obvious things are the last things to check! Save some head-scratching time for a problem you actually created yourself.. ;-)

(Here’s an example)

Old-skool AS prototype library

11:06 am, by tom

I’ve been updating a few old AS1 projects, which has been a trip down memory lane, to say the least.  In trying to walk softly and make the fewest changes possible, I ran into the problem of trying to make some hyperlinks in a textfield accessible by tabbing.  After an extended Google session I found this: layer51.com.  It’s a mahoosive library of prototypes, running from Flash 5 to MX 2004.

I don’t know if anyone’s still using AS1 (and if so, get with the times!), but this might be handy if you are.  To be honest, in the end I actually didn’t use any code from there and ended up re-formatting the section to avoid the problem…

Anyway, the whole experience has really made me appreciate how spoiled we are with AS3.  Things like strict data typing make such a difference to the way I code; it’s all too easy to slip into bad habits without it, and when that happens you have to deal with AS1’s sulky, silent intractability when it comes to error messages (or lack thereof)…

The Eco Zoo

2:51 pm, by gareth

The Eco Zoo by McCann Erickon is some of the most impressive Flash work I’ve seen for a while. Stunning.

The Eco Zoo

//Link ripped straight from Richard Leggett

Share and Share alike at Acrobat.com

2:20 pm, by gareth

Adobe have launched a new ‘beta’ site under the strangely title Acrobat.com.

The site includes:

  • The acquired Buzzword which is basically an online word processor that allows a collaborative approach to writing documents etc.
  • Connect Now, which seems to be a rebranded version of Breeze, which includes screen sharing.
  • Share, if you can imagine Drop Send done by Adobe in Flash then you’re getting close. Share also includes ‘My Files’ and ‘Create PDF’ which as they sound enable you to get to your files and create PDF’s on the fly.

I’ve seen both Buzzword and Share before in their respective betas and both seem very polished. Acrobat.com has it’s own blog and like every good web 2.0 web application there’s nice API under the hood called ‘Document Services

Adobe Acrobat.com

Next Page »

hi@numiko.com | 46 The Calls, Leeds, LS2 7EY | 0113 202 1400

© 2007 Numiko