package
{
    import flash.display.Sprite;
    import flash.display.StageScaleMode;
    
    import org.tinytlf.ITextEngine;
    import org.tinytlf.components.SplineTextField;
    import org.tinytlf.components.TextField;
    import org.tinytlf.examples.spline.SplineConstraintFactory;
    
    [SWF("775", height="635", frameRate="60")]
    public class SplineScrollerDemo extends Sprite
    {
        [Embed("assets/fonts/Archer-Medium-Pro.otf", fontFamily="ArcherMedium")]
        private var archer:Class;
        [Embed("assets/fonts/Archer-Semibold-Pro.otf", fontWeight="bold", fontFamily="ArcherSemibold")]
        private var archerSemiBold:Class;
        
        [Embed("assets/henrywadsworth.xml", mimeType="application/octet-stream")]
        private const xmlSource:Class;
        
        public function SplineScrollerDemo()
        {
            stage.scaleMode = StageScaleMode.NO_SCALE;
            
            var tf:TextField = new SplineTextField();
            tf.width = 600;
            tf.height = 600;
            
            tf.style = 
                "*{" +
                "    fontName:ArcherMedium;" +
                "    fontSize: 25;" +
                "    textAlign: justify;" +
                "    color:0x000000;" +
                "}" +
                "p{" +
                "    padding-top: 10;" +
                "}" +
                "ul{" +
                "    list-style-position: outside;" +
                "}";
            
            tf.text = new xmlSource().toString();
            
            addChild(tf);
        }
    }
}