1
|
1 |
|
|
2 |
D = Ti.API.get( 'D' );
|
0
|
3 |
|
|
4 |
// Animate the background image.
|
|
5 |
//
|
|
6 |
var set_frame = function( frame ) {
|
|
7 |
var frames = 8;
|
|
8 |
var speed = 100;
|
|
9 |
var next = frame + 1;
|
|
10 |
var body = $( 'body' );
|
|
11 |
|
|
12 |
if ( next > frames + 1 ) return;
|
|
13 |
body.css({ backgroundImage: "url(app://img/about/" + frame + ".jpg)" });
|
|
14 |
D.delay( function(){ set_frame( next ) }, speed );
|
|
15 |
};
|
|
16 |
|
|
17 |
|
|
18 |
$( window ).ready( function() {
|
|
19 |
$( '#name' ).html( D.name );
|
|
20 |
$( '#version' ).html( D.version );
|
|
21 |
$( '#tide-version' ).html( D.ti_version );
|
|
22 |
$( '#platform' ).html( D.platform );
|
|
23 |
$( '#arch' ).html( D.architecture );
|
|
24 |
|
|
25 |
$( 'body' ).bind( 'click', function() { Ti.UI.currentWindow.close(); });
|
|
26 |
|
|
27 |
// preload animation images to prevent flicker.
|
|
28 |
for ( var i = 1; i < 9; i++ ) {
|
|
29 |
var img = new Image( 600,432 );
|
|
30 |
img.src = "app://img/about/" + i + ".jpg";
|
|
31 |
}
|
|
32 |
|
1
|
33 |
D.delay( function(){ set_frame( 1 ) }, 5000, true );
|
0
|
34 |
});
|
|
35 |
|
|
36 |
|