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

カラーリンクふわふわ

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

package {
    import flash.display.Sprite;
    [SWF(width="500", height="500", backgroundColor="0x000000", frameRate="60")]
    public class main extends Sprite {
        public function main() {
            // write as3 code here..
            for (var i:int = 0; i < 30; i++) 
            {
                var _sp:CircleLink = new CircleLink();
                addChild(_sp);
            }
        }
    }
}

import flash.display.Sprite;
import flash.events.Event;
import flash.filters.*;
import frocessing.color.ColorHSV;
/**
 * ...
 * @author RENOWAN
 */
class CircleLink extends Sprite
{
    private var color:ColorHSV;
    private var rot:int;
    private var radius:int = 100;
    private var rot_speed:int;
    
    public function CircleLink() 
    {
        //各パラメータを乱数で生成
        var _temx:int = Math.floor( Math.random() * 500 ) - 100;//x座標
        var _temy:int = Math.floor( Math.random() * 500 ) - 100;//y座標
        var _tems:int = Math.floor( Math.random() * 80 ) + 10;//半径
        var _temc:int = Math.floor( Math.random() * 180 ) + 30;//色合い
        
        rot = Math.floor( Math.random() * 179 ) + 1;//波状計算の起点となる
        rot_speed = Math.floor( Math.random() * 6 ) + 2;//波状計算
        
        color = new ColorHSV(_temc, 0.7);
        graphics.lineStyle(2, color.value);
        graphics.beginFill(color.value, 0.2);
        graphics.drawCircle(0, 0, _tems);
        
        this.x = _temx;
        this.y = _temy;
        
        filters = [new GlowFilter(color.value, 1, 20, 20, 3), new BlurFilter(2,2)];
        addEventListener( Event.ENTER_FRAME , __onEnter );
    }
    
    private function __onEnter(e:Event):void 
    {
        rot += rot_speed;
        
        var rad:Number = rot * Math.PI / 180;//波状計算
        var temx:Number = 120 + Math.cos(rad) * radius;//波状計算
        
        this.scaleX = this.scaleY = 1 - (temx / 220 * 0.6);
        
    }
    
}