套件 | spark.preloaders |
類別 | public class SplashScreenImageSource |
繼承 | SplashScreenImageSource Object |
語言版本: | ActionScript 3.0 |
產品版本: | Flex 4.6 |
執行階段版本: | AIR 3 |
You typically use one or more SplashScreenImageSource
objects to define a SplashScreenImage class in MXML
and set the application's splashScreenImage
property to that class.
Shown below is SplashScreenImage component with three different definitions for SplashScreenImageSource:
<?xml version="1.0" encoding="utf-8"?> <s:SplashScreenImage xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"> <!-- Default splashscreen image. --> <s:SplashScreenImageSource source="@Embed('assets/logoDefault.jpg')"/> <s:SplashScreenImageSource source="@Embed('assets/logo240Portrait.jpg')" dpi="240" aspectRatio="portrait"/> <s:SplashScreenImageSource source="@Embed('assets/logo240Landscape.jpg')" dpi="240" aspectRatio="landscape"/> </s:SplashScreenImage>MXML 語法隱藏 MXML 語法
The <s:SplashScreenImageSource>
tag inherits all of the tag
attributes of its superclass and adds the following tag attributes:
<s:SplashScreenImageSource Properties aspectRatio="null" dpi="NaN" minResolution="NaN" source="null" >
相關 API 元素
屬性 | 定義自 | ||
---|---|---|---|
aspectRatio : String = "null"
The required aspect ratio of the mobile device. | SplashScreenImageSource | ||
constructor : Object
類別物件的參照或是特定物件實體的建構函數。 | Object | ||
dpi : Number = NaN
The required DPI of the device to display the associated image. | SplashScreenImageSource | ||
minResolution : Number = NaN
The required minimum size of the mobile device's resolution needed
to display the image. | SplashScreenImageSource | ||
source : Class
The image class for the splash screen to use for the defined
device configuration. | SplashScreenImageSource |
方法 | 定義自 | ||
---|---|---|---|
Constructor. | SplashScreenImageSource | ||
指出物件是否有已定義的指定屬性。 | Object | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
會傳回指定之物件的字串形式。 | Object | ||
會傳回指定之物件的基本值。 | Object |
aspectRatio | 屬性 |
public var aspectRatio:String = "null"
語言版本: | ActionScript 3.0 |
產品版本: | Flex 4.6 |
執行階段版本: | AIR 3 |
The required aspect ratio of the mobile device.
This property can be either flash.display.StageAspectRatio.PORTRAIT
or flash.display.StageAspectRatio.LANDSCAPE
.
If not set, then SplashScreenImage
ignores this property.
相關 API 元素
dpi | 屬性 |
public var dpi:Number = NaN
語言版本: | ActionScript 3.0 |
產品版本: | Flex 4.6 |
執行階段版本: | AIR 3 |
The required DPI of the device to display the associated image.
A value of NaN means the property is ignored by SplashScreenImage.
預設值為 NaN。
minResolution | 屬性 |
public var minResolution:Number = NaN
語言版本: | ActionScript 3.0 |
產品版本: | Flex 4.6 |
執行階段版本: | AIR 3 |
The required minimum size of the mobile device's resolution needed
to display the image.
The device resolution is the maximum of the stage width and height, in pixels.
The value of the minResolution
property is compared against the larger
of the values of the Stage.stageWidth
and Stage.stageHeight
properties.
The larger of the two values must be equal to or greater than the minResolution
property.
You can use this property to display different images based on the pixel resolution of a device.
A value of NaN means the property is ignored by the SplashScreenImage.
預設值為 NaN。
source | 屬性 |
public var source:Class
語言版本: | ActionScript 3.0 |
產品版本: | Flex 4.6 |
執行階段版本: | AIR 3 |
The image class for the splash screen to use for the defined device configuration. Typically you set this property to an embedded resource.
For example:
<s:SplashScreenImageSource source="@Embed('assets/logo240Portrait.jpg')" dpi="240" aspectRatio="portrait"/>
預設值為 null。
相關 API 元素
SplashScreenImageSource | () | 建構函式 |
public function SplashScreenImageSource()
語言版本: | ActionScript 3.0 |
產品版本: | Flex 4.6 |
執行階段版本: | AIR 3 |
Constructor.
Tue Jun 12 2018, 03:47 PM Z