/**
* SekatiMain
* @version 1.1.1
* @author jason m horwitz | sekati.com
* Copyright (C) 2008 jason m horwitz, Sekat LLC. All Rights Reserved.
* Released under the MIT License: http://www.opensource.org/licenses/mit-license.php
*/
package {
import caurina.transitions.Tweener;
import sekati.core.App;
import sekati.display.Document;
import sekati.log.Logger;
import sekati.ui.Image;
import sekati.utils.AlignUtil;
import flash.events.Event;
[SWF(width="1075", height="500", frameRate="31", backgroundColor="#FFFFFF")]
/**
* SekatiMain
provides an example implementation of the application Document
class for SEKATI API.
* @see sekati.display.Document
*/
public class SekatiMain extends Document {
/**
* SekatiMain Application Constructor
*/
public function SekatiMain() {
super( );
}
/**
* @inheritDoc
*/
override protected function initMovieProperties() : void {
super.initMovieProperties( );
}
/**
* @inheritDoc
*/
override protected function initTweenEngine() : void {
super.initTweenEngine( );
}
/**
* @inheritDoc
*/
override protected function initAPI(hasBootstrap : Boolean = true) : void {
super.initAPI( hasBootstrap );
}
/**
* @inheritDoc
*/
override protected function initEntryPoint() : void {
super.initEntryPoint( );
// some sample code to display the proper entry-point where the framework is ready for hand-off to the developer.
Logger.$.trace( this, 'Hello World! I am an example implementation of the SEKATI API.' );
// load an image from our data xml as defined in config.xml
var img : Image = new Image( App.db['data'].logo.@src );
// callback when the image is loaded.
var imgLoadHandler : Function = function(e : Event):void {
img.removeEventListener( Event.INIT, imgLoadHandler );
AlignUtil.stageAlignCenter( img );
img.alpha = 0;
addChild( img );
Tweener.addTween( img, { y:(img.y + 10), alpha:1, time:1, transition:"easeOutExpo" } );
};
// listen for its load event.
img.addEventListener( Event.INIT, imgLoadHandler );
}
}
}