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

New tween library Tween24 on wonderfl

Tween24 is chain method tween engine.
Code: http://code.google.com/p/tween24/
ASDoc: http://package.a24.cat/libs/tween24/asdoc/1.0.1/
Tutorial: http://package.a24.cat/2011/11/24/tween24/
/**
 * Copyright a_24 ( http://wonderfl.net/user/a_24 )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/grIQ
 */

package
{
    import a24.tween.EventTween24;
    import a24.tween.Tween24;
    
    import flash.events.Event;
    import flash.display.Sprite;
    import flash.text.TextField;
    import flash.text.TextFormat;
    
    import net.wonderfl.utils.FontLoader;
    
    [SWF(width = "465", height = "465", frameRate = "60", backgroundColor="#000000")]
    
    public class HellowTween24 extends Sprite {
        
        public function HellowTween24()
        {
            // Background
            var bg:Sprite = new Sprite();
            bg.graphics.beginFill(0);
            bg.graphics.drawRect(0, 0, 465, 465);
            addChild(bg);
            
            
            // Load Font
            var loader:FontLoader = new FontLoader();
            loader.addEventListener(Event.COMPLETE, function():void {
                
                
                // MouseEvent Tween
                EventTween24.onRollOver(bg,
                    Tween24.tween(bg, 0.05).bright(1),
                    Tween24.tween(bg, 0.2).bright(0.4)
                );
    
                EventTween24.onRollOut(bg, 
                    Tween24.tween(bg, 0.4).bright(0)
                );
    
                EventTween24.onClick(bg, 
                    Tween24.getURL("http://code.google.com/p/tween24/", "_blank")
                );
                
                
                // TextField
                var text1:TextField = getTextField(40, "more   Easily");
                var text2:TextField = getTextField(40, "more   Speedy");
                var text3:TextField = getTextField(40, "and   more   Powerful");
                var text4:TextField = getTextField(32, "New   tween   library   Tween24");
                var text5:TextField = getTextField(16, "more   comfortable   your   flash   development.");
                

                // Tween Animation
                Tween24.serial(
                    Tween24.func(EventTween24.enabled, false, bg),
                    Tween24.wait(0.5),
                    
                    // Text1 tween
                    Tween24.prop(text1).$x(-460).fadeIn().glow(0xFFFFFF, 1, 32, 32, 6, 2).blurX(128),
                    Tween24.addChild(stage, text1),
                    Tween24.tween(text1, 0.1).fadeIn(),
                    Tween24.tween(text1, 0.1).$x(0),
                    Tween24.prop(text1).glow(0xFFFFFF, 0.5, 12, 12, 2).blurX(0),
                    Tween24.wait(1.5),
                    Tween24.prop(text1).glow(0xFFFFFF, 1, 32, 32, 6, 2).blurX(128),
                    Tween24.tween(text1, 0.1).$x(200).andRemove(),
                    Tween24.wait(0.5),
                    
                    // Text3 tween
                    Tween24.prop(text2).$x(-460).fadeIn().glow(0xFFFFFF, 1, 32, 32, 6, 2).blurX(128),
                    Tween24.addChild(stage, text2),
                    Tween24.tween(text2, 0.1).fadeIn(),
                    Tween24.tween(text2, 0.1).$x(0),
                    Tween24.prop(text2).glow(0xFFFFFF, 0.5, 12, 12, 2).blurX(0),
                    Tween24.wait(1.5),
                    Tween24.prop(text2).glow(0xFFFFFF, 1, 32, 32, 6, 2).blurX(128),
                    Tween24.tween(text2, 0.1).$x(200).andRemove(),
                    Tween24.wait(0.5),
                    
                    // Text3 tween
                    Tween24.prop(text3).$x(-460).fadeIn().glow(0xFFFFFF, 1, 32, 32, 6, 2).blurX(128),
                    Tween24.addChild(stage, text3),
                    Tween24.tween(text3, 0.1).fadeIn(),
                    Tween24.tween(text3, 0.1).$x(0),
                    Tween24.prop(text3).glow(0xFFFFFF, 0.5, 12, 12, 2).blurX(0),
                    Tween24.wait(1.5),
                    Tween24.prop(text3).glow(0xFFFFFF, 1, 32, 32, 6, 2).blurX(128),
                    Tween24.tween(text3, 0.1).$x(200).andRemove(),
                    Tween24.wait(0.5),
                    
                    // Text4 tween
                    Tween24.prop(text4).$y(-20).fadeOut().glow(0xFFFFFF, 0.6, 12, 12, 2, 2),
                    Tween24.addChild(stage, text4),
                    Tween24.tween(text4, 0.6).fadeIn(),
                    Tween24.wait(0.4),
                    Tween24.tween(text4, 0.4).glow(0xFFFFFF, 1, 24, 24, 8),
                    Tween24.tween(text4, 0.6).glow(0xFFFFFF, 0.6, 12, 12, 2),
                    
                    // Text5 tween
                    Tween24.prop(text5).$y(20).alpha(0),
                    Tween24.addChild(stage, text5),
                    Tween24.tween(text5, 1).alpha(0.6),
                    Tween24.func(EventTween24.enabled, true, bg)
                    
                ).play();
            });
            
            loader.load("Bebas");
        }
        
        private function getTextField(size:Number, text:String):TextField
        {
            var tf:TextField = new TextField();
            tf.width = 465;
            tf.autoSize = "center";
            tf.defaultTextFormat = new TextFormat("Bebas", size, 0xFFFFFF);
            tf.embedFonts = true;
            tf.text = text;
            tf.y = 465 - tf.textHeight >> 1;
            return tf;
        }
    }
}