flex4.5移动设备开发-添加应用背景图片

【转】 http://spy6.blogspot.com/2011/07/adding-background-to-mobile-flex-45.html
package skins
{
import models.Icons;
import mx.core.BitmapAsset;
import spark.components.Image;
import spark.skins.mobile.ViewNavigatorApplicationSkin;

public class AppSkin extends ViewNavigatorApplicationSkin
{
private var image:Image;

public function AppSkin()
{
 super();
}

override protected function createChildren():void {
 image = new Image();
 image.source = (new Icons.background() as BitmapAsset);
 image.height = 600; //Set image size here. You can also use percentWidth
 image.width = 1024;
 this.addChild(image);

 super.createChildren();
}
}
}

@namespace s "library://ns.adobe.com/flex/spark";

s|View {
 backgroundAlpha: 0;
}

你可能感兴趣的:(flex4)