views:

389

answers:

1

So I'm trying to give my air application a custom style, I've set the showFlexChrome to false and that's ok it works. now I would like to use an image window I designed in photoshop as the background (because now there is no background in the application).

I did the following but it doesn't work

<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" xmlns:views="be.KHM.ProjectManager.models.views.*" 
width="850" height="500" currentState="index" creationComplete="init()"
showFlexChrome="false"
horizontalScrollPolicy="off" 
verticalScrollPolicy="off"
backgroundColor="white"
>
< mx:Style>
    WindowedApplication
    {
     backgroundColor: white;
     backgroundImage: "be/KHM/ProjectManager/assets/mysimpleproject_interface.jpg";
    }
</ mx: Style>

The path is correct and I don't receive any errors but the background of my air app is still transparent. I tried to put a canvas around everything between my windowedapplication and give that a background image, but because I work with states it will give me the error that the states cannot be initiated within a canvas or something like that.

A: 

Try putting a ClassReference("be/....") for the backgroundImage style setter.

Edit: Oh, wait... that's not a class. The problem could be that you have the wrong combo of showFlexChrome and the FlexChrome property in your xml compiler file.

My suggestion would be to take a look at the source of the SalesForce app that someone built when 1.0 came out. It has some decent css and window styling examples.

jeremym
ok I'll give it a try thanks
krike
where can I find that application?
krike
There are some newer versions, but this should get you started: http://coenraets.org/blog/2008/02/salesbuilder-for-air-10/
jeremym