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

Ukiuki sample

copied from http://www.libspark.org/svn/as3/Ukiuki/v0.0/samples/ZigzagSample.as
/**
 * Copyright mash ( http://wonderfl.net/user/mash )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/tGt1
 */

// copied from http://www.libspark.org/svn/as3/Ukiuki/v0.0/samples/ZigzagSample.as
package  
{
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.geom.Point;
    import org.libspark.ukiuki.Ukiuki;
    import org.libspark.ukiuki.ease.*;
    
    [SWF(width="465",height="465")]
    public class ZigzagSample extends Sprite
    {
        
        function ZigzagSample()
        {
            var count:uint = 0;
            
            var gr:Graph = new Graph( "default" )
            gr.y = 10;
            gr.x = 20;
            addChild( gr )
            
            Ukiuki.zigzag( gr.line, { y:25}, { time:30, repeat:-1, intervals:[0] } );

            for ( var i:uint = 0; i < 5; i+=1 ) {
                for ( var i2:uint = 0; i2 < 2; i2++){
                    var ease:Class = [ Back, Bounce, Circ, Cubic, Elastic, Expo, Quad, Quart, Quint, Sine ][ i*2 + i2 ]
                    var easeName:String = [ "Back", "Bounce", "Circ", "Cubic", "Elastic", "Expo", "Quad", "Quart", "Quint", "Sine" ][ i*2 + i2 ]
                    for ( var j:uint = 0; j < 3; j++ ) {
                        var io:String = [ "IN", "OUT", "IN_OUT" ][j]
                        gr = new Graph( easeName + "." + io )
                        gr.y = (i * 80) + 80;
                        gr.x = (j * 70) + (i2 * 232) + 20;
                        addChild( gr )
                        
                        Ukiuki.zigzag( gr.line, { y:25}, { time:30, tags:[easeName, io], ease:ease[io], repeat:-1, intervals:[0] } );
                        count++;
                    }
                }
            }
            
        }
    }

}
import flash.display.Graphics;
import flash.display.Shape;
import flash.text.TextField;

class Graph extends flash.display.Sprite {
    public var line:Shape = new Shape;
    function Graph(str:String) {
        var g:Graphics = graphics;
        g.lineStyle( 1, 0x666666, 1 );
        g.lineTo( 0, 50 );
        g.moveTo( 0, 25 );
        g.lineTo( 60, 25 );
        
        var text:TextField = new TextField(); 
        text.alpha = 0.8;
        text.scaleX = text.scaleY = 0.8;
        text.text = str;
        text.y = 50;
        addChild( text );
        
        line.y = -25;
        line.graphics.lineStyle( 2, 0x000066, 1 );
        line.graphics.moveTo( 0, 50 );
        line.graphics.lineTo( 60, 50 );
        addChild( line )
    }
}