programming4us
programming4us
MOBILE

Developing BlackBerry Tablet Applications : OS Interactions - Splash Screen

12/27/2013 2:49:05 AM

Adobe has made it very easy to add a splash screen to your application. A splash screen is an image that loads first and displays while the application is loading. There are also several options for the splash-screen display. Let’s take a look at the following code, which shows the splashScreenImage property set to a .png image. Figure 1 shows a splash screen with the default settings.

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
splashScreenImage="@Embed('happytoad.png')">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
</s:Application>


Figure 1. Splash screen with splashScreenScaleMode set at none


You can also set some options for the splash screen. Setting the splashScreenMinimumDisplayTime and splashScreenScaleMode properties on the Application, ViewNavigatorApplication, or TabbedViewNavigatorApplication tag sets these options. The next example sets the display time to three seconds and the scale mode to “stretch.”

The available options for the splashScreenScaleMode property are letterbox, none, stretch, and zoom. Figure 2 and the following code show a splash screen with the splashScreenScaleMode set to stretch.

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
splashScreenImage="@Embed('happytoad.png')"
splashScreenMinimumDisplayTime="3000"
splashScreenScaleMode="stretch">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
</s:Application>


Figure 2. Splash screen with splashScreenScaleMode set at stretch

Other  
  •  Developing BlackBerry Tablet Applications : OS Interactions - Open in Browser
  •  iPhone Developer : Assembling Views and Animations - Transforming Views
  •  iPhone Developer : Assembling Views and Animations - Randomly Moving a Bounded View
  •  iPhone Developer : Assembling Views and Animations - Working with View Frames (part 2) - Other Utility Methods
  •  iPhone Developer : Assembling Views and Animations - Working with View Frames (part 1) - Adjusting Sizes , CGRects and Centers
  •  iPhone Developer : Assembling Views and Animations - View Geometry
  •  Windows Phone 7 : Drawing with Vertices and Matrices - Drawing Primitives
  •  Windows Phone 7 : Understanding Matrix Transformations (part 3) - Drawing Multiple Objects at Different Positions
  •  Windows Phone 7 : Understanding Matrix Transformations (part 2) - Applying Multiple Transformations
  •  Windows Phone 7 : Understanding Matrix Transformations (part 1) - Applying Rotation Transformations
  •  
    PS4 game trailer XBox One game trailer
    WiiU game trailer 3ds game trailer
    Top 10 Video Game
    -   Uncharted 4: A Thief's End | E3 2015 Extended Gameplay Trailer
    -   V.Next [PC] Kickstarter Trailer
    -   Renowned Explorers [PC] Launch Date Trailer
    -   The Void (Game Trailer)
    -   World of Warships [PC] Open Beta Trailer
    -   F1 2015 | Features Trailer
    -   Battle Fantasia Revised Edition | Debut Trailer for Steam
    -   Victor Vran [PC] Story Trailer
    -   Star Wars Battlefront PC Alpha footage
    -   Skyforge [PC] Open Beta Gameplay Trailer
    -   Armored Warfare [PC] PvE Trailer
    -   F1 2015 [PS4/XOne/PC] Features Trailer
    -   Act of Aggression [PC] Pre-Order Trailer
    -   Sword Coast Legends [PC] Campaign Creation E3 2015 Trailer
    -   Sword Coast Legends [PC] Campaign Creation E3 2015 Dungeon Run Trailer
    Game of War | Kate Upton Commercial
    programming4us
     
     
    programming4us