开发者

styling an air application - background image

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" crea开发者_高级运维tionComplete="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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜