Checkpoint.
* Got fonts working cross platform by only using SVG. This will change
with the new webkit engine when Tide 1.4 is released.
* Use the Tide API accessors for cross-window data.
* Make the ThingFish server object an observable, so models and their
URI bases can be changed easily.
* Add options for saving window state and position.
* Contextual menu updates/tests for later.
D = Ti.API.get( 'D' );
// Animate the background image.
//
var set_frame = function( frame ) {
var frames = 8;
var speed = 100;
var next = frame + 1;
var body = $( 'body' );
if ( next > frames + 1 ) return;
body.css({ backgroundImage: "url(app://img/about/" + frame + ".jpg)" });
D.delay( function(){ set_frame( next ) }, speed );
};
$( window ).ready( function() {
$( '#name' ).html( D.name );
$( '#version' ).html( D.version );
$( '#tide-version' ).html( D.ti_version );
$( '#platform' ).html( D.platform );
$( '#arch' ).html( D.architecture );
$( 'body' ).bind( 'click', function() { Ti.UI.currentWindow.close(); });
// preload animation images to prevent flicker.
for ( var i = 1; i < 9; i++ ) {
var img = new Image( 600,432 );
img.src = "app://img/about/" + i + ".jpg";
}
D.delay( function(){ set_frame( 1 ) }, 5000, true );
});