package
{
    import flash.display.*;
    
    import org.tinytlf.ITextEngine;
    import org.tinytlf.components.TextField;
    import org.tinytlf.interaction.IGestureInteractor;
    import org.tinytlf.interaction.TanyaAnchorMirror;
    import org.tinytlf.interaction.WordButtonBehavior;
    import org.tinytlf.interaction.gestures.mouse.MouseClickGesture;
    import org.tinytlf.interaction.gestures.mouse.MouseOverGesture;
    import org.tinytlf.layout.factories.*;
    
    [SWF("775", height="635", frameRate="60")]
//    [SWF(width="1100", height="635", frameRate="60")]
    public class TiconderogaOver extends Sprite
    {
        [Embed("assets/fonts/Archer-Medium-Pro.otf", fontFamily="ArcherMedium")]
        private var archer:Class;
        
        [Embed("assets/eniac.css", mimeType="application/octet-stream")]
        private const cssSource:Class;
        
        [Embed("assets/ticonderoga.html", mimeType="application/octet-stream")]
        private const xmlSource:Class;
        
        private var tf:TextField;
        
        public function TiconderogaOver()
        {
            stage.scaleMode = StageScaleMode.NO_SCALE;
            tf = new TextField();
            tf.x = 75;
            tf.width = 600;
            tf.height = 635;
            
            var engine:ITextEngine = tf.engine;
            engine.interactor.unMapMirror("a");
            var g:IGestureInteractor = engine.interactor as IGestureInteractor;
            if(g)
            {
                g.removeAllGestures();
                var btn:WordButtonBehavior = new WordButtonBehavior();
                
                g.addGesture(new MouseClickGesture(), btn);
                g.addGesture(new MouseOverGesture(), btn);
            }
            
            tf.style = new cssSource().toString();
            tf.style = "*{leading: 12;}p{textAlign:left;}";
            tf.text = new xmlSource().toString();
            
            addChild(tf);
            addChild(new Stats());
        }
    }
}