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