In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

forked from: thoton global computing rotating text

Get Adobe Flash player
by thoton 24 Jul 2010
    Embed
/**
 * Copyright thoton ( http://wonderfl.net/user/thoton )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/fhOD
 */

// forked from thoton's thoton global computing rotating text
// forked from geekdrums's forked from: forked from: flash on 2010-3-21
// forked from geekdrums's forked from: flash on 2010-3-21
// forked from geekdrums's flash on 2010-3-21
package {
    import flash.display.Sprite;
    import flash.utils.getTimer;
    import flash.text.TextField;

    import flash.text.Font;
    import flash.text.TextFormat;
    import flash.text.AntiAliasType;
    
    import flash.events.TimerEvent;
    import flash.utils.Timer;


    import flash.text.TextFieldAutoSize;    
    
    
    public class FlashTest extends Sprite {
public var txt1:TextField = new TextField();
public var txt2:TextField = new TextField();
public var txt3:TextField = new TextField();
public var fm:TextFormat=new TextFormat();

        public function FlashTest() {
                var fm:TextFormat=new TextFormat();
                var _timer:Timer = new Timer(1 * 50, 0);

_timer.addEventListener(TimerEvent.TIMER, endFunc);
_timer.start(); 

                fm.size = 30;
                fm.font = "Times News Roman";
                fm.align = 'center';        
             
                txt1.htmlText = "Endlich! Heute um 10 Uhr starten die\r Löwen mit ihremneuen Trainer Reiner Maurer (50) in die Saison–Vorbereitung. Clever: Kurz vorm Start holte sich der neue Chef noch schnell ein paar Tipps vom Vorgänger...";
           txt1.autoSize = TextFieldAutoSize.LEFT;
           txt1.wordWrap = true;
                
                
                
                txt1.mouseEnabled = true;
                txt1.selectable = false;
                txt1.antiAliasType = AntiAliasType.ADVANCED;
                txt1.setTextFormat(fm);
                txt1.x = 150;
                txt1.y = 150;
                txt1.width= 700;
                txt1.height= 40;
                txt1.rotationZ = 0;
                
                txt2.text = "XML, e-book, e-dictionary, DTP, database";
                txt2.mouseEnabled = true;
                txt2.selectable = false;
                txt2.antiAliasType = AntiAliasType.ADVANCED;
                txt2.setTextFormat(fm);
                txt2.x = 150;
                txt2.y = txt1.y + txt1.height;
                txt2.width= 700;
                txt2.height= 40;
                txt2.rotationZ = 0;

                txt3.text = "www.thoton.co.jp";
                txt3.mouseEnabled = true;
                txt3.selectable = false;
                txt3.antiAliasType = AntiAliasType.ADVANCED;
                txt3.setTextFormat(fm);
                txt3.x = 150;
                txt3.y = txt2.y + txt2.height;
                txt3.width= 700;
                txt3.height= 40;
                txt3.rotationZ = 0;

                addChild(txt1);
                addChild(txt2);
                addChild(txt3);

                
        }

public function endFunc(evt:TimerEvent){

        txt1.rotationX = txt1.rotationX + 1;
        txt1.rotationZ = txt1.rotationZ + 1;
        txt1.x = 150 - (txt1.width / 2) * Math.cos((txt1.rotationZ * Math.PI)/180);
        txt1.alpha=txt1.alpha-0.00001;
        if (txt1.alpha == 0) {
            txt1.alpha = 1;
        }
        txt2.rotationY = txt2.rotationY + 1;
        txt2.rotationZ = txt2.rotationZ + 1;
        txt2.x = 150 - (txt2.width / 2) * Math.cos((txt2.rotationZ * Math.PI)/180);
        txt2.alpha=txt2.alpha-0.00001;
        if (txt2.alpha == 0) {
            txt2.alpha = 1;
        }
        
        txt3.rotationX = txt3.rotationX + 1;
        txt3.rotationZ = txt3.rotationZ - 1;
        txt3.x = 150 - (txt3.width / 2) * Math.cos((txt3.rotationZ * Math.PI)/180);
        txt3.alpha=txt3.alpha-0.00001;
        if (txt3.alpha == 0) {
            txt3.alpha = 1;
        }
        

        
}
    }
    
}