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: フレームベースでトゥイーンさせる

image: http://www.thenounproject.com/
/**
 * Copyright tjoen ( http://wonderfl.net/user/tjoen )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/bCTG
 */

// forked from shohei909's フレームベースでトゥイーンさせる
//image: http://www.thenounproject.com/
package {
    import flash.events.Event;
    import flash.display.Sprite;
    import frocessing.shape.FShapeSVG;
    import com.bit101.components.*;
    import org.libspark.ukiuki.Ukiuki;
    import org.libspark.ukiuki.ease.*;
    
    public class FlashTest extends Sprite {
        public function FlashTest() {
            this.addEventListener( Event.ADDED_TO_STAGE, init );
        }
        
        private function init( e:Event ):void{
            new FPSMeter( this, 10, 5 )
            var slide:HUISlider = new HUISlider( this, 0, 20, "", onChange );
            slide.value = 30;
            slide.width = 140;
            slide.minimum = 5;
            slide.maximum = 60;
            
            var shape:Sprite = new FShapeSVG( SVG_DATA ).toSprite()
            shape.x = (465 - shape.width) / 2;
            addChild( shape );
            
            Ukiuki.synchro = stage;
            Ukiuki.yoyo( shape, { y:433-shape.height }, { time:60, ease:Quint.IN_OUT, repeat:-1, intervals:[10,30] } )
        }
        
        private function onChange( e:Event ):void{
            stage.frameRate = e.target.value;
        }
    }
}

const SVG_DATA:XML = 
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 80">
  <path fill="#000" d="M4,70v-1c0-1,4-4,6-4c1-1,2-1,2-3c1-1,1-3,1-4c1-1,1-3,2-4c0-1,1-4,1-7c1-9,2-11,4-15c1-3,2-4,1-5v-1l-1-2c0,0-1-2-1-6c0-3,2-6,5-8c2-1,3-1,6,1c2,1,2,1,5,0c3,0,3,0,3,1c0,1,0,2-1,3l-1,2c1,1,1,2,2,3c0,0,1,2,1,3l2,2c0,1-2,3-3,3l-1,1c0,0,2,1,4,2c3,1,4,2,5,3l2,2c3,1,6,3,9,5l2,1l2-1c10-7,13-7,18-1c1,1,5,5,9,9c8,8,11,9,17,10c5,1,6,1,6,2c0,1-2,2-6,2c-1,1-3,1-4,2c-1,1-2,1-3,1c0,0-2-1-3-3c-1-1-8-5-10-5c0,0-2-1-3-1c-3-2-6-5-9-8l-1-1l-5,7c-7,11-12,15-18,15c-6,0-10-3-14-11c-2-4-4-6-5-8c-3-4-3-4-6,1c-2,3-4,8-7,11c-2,3-2,4-1,5v2c-1,1-2,0-3-1c0-1-2-1-6,0c-1,1-2,1-3,1z"/>
</svg>