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

[BetweenAS3] test

手計算気持ち悪い
+中断

evangelionで出てきたなんかの接続が切れる場面
Get Adobe Flash player
by meemeer 21 Apr 2010
/**
 * Copyright meemeer ( http://wonderfl.net/user/meemeer )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/u8lK
 */

/*

手計算気持ち悪い
+中断

evangelionで出てきたなんかの接続が切れる場面
*/

package {
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.StageQuality;
	import flash.display.StageScaleMode;
	import flash.filters.BlurFilter;
	import flash.geom.Point;
	import org.libspark.betweenas3.BetweenAS3;
	import org.libspark.betweenas3.tweens.ITween;
	import org.libspark.betweenas3.easing.*;
	
	[SWF(width = "465", height = "465", frameRate = "60", backgroundColor = "0xff8b38")]
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
            
            
			stage.align = StageAlign.TOP;
			stage.quality = StageQuality.HIGH;
			stage.scaleMode = StageScaleMode.NO_SCALE;
			
			var tweens:Array = [];
			var points:Array = [];
			
			var sw:int = stage.stageWidth;
			var sh:int = 150;
			var nw:int = 80;
			for (var i:int = 0; i < 7; i++ ) {
				var osu:PartsOSU = new PartsOSU();
				addChild(osu);
				osu.tf.text = '002' + i;
				var osu2:PartsOSU = new PartsOSU();
				addChild(osu2);
				osu2.tf.text = '003' + i;
				osu2.rotation = 45;
				var mesu:PartsMESU = new PartsMESU();
				addChild(mesu);
				var mesu2:PartsMESU = new PartsMESU();
				addChild(mesu2);
				mesu2.rotation = 45;
				
				//手計算気持ち悪い
				graphics.lineStyle(0x000000);
				if ((i + 1) % 2) {
					osu.x = sw - 140 - 20 * i;//
					osu.y = sh + 40 * i;//
					osu2.x = nw - 30 * i;
					osu2.y = 30 * i;
					mesu.x = sw - 70 - 20 * i;//
					mesu.y = sh + 40 * i;//
					mesu2.x = nw + 47 - (30 * i);
					mesu2.y = 47 + (30 * i);
					
					graphics.moveTo(osu.x, osu.y + 15);
					graphics.lineTo(osu.x - 100 - (10 * i), osu.y + 15);
					//graphics.lineTo(mesu2.x + Math.cos(45 * Math.PI / 180), mesu2.y + Math.sin(45 * Math.PI / 180));
					//graphics.lineTo(mesu2.x, mesu2.y);
				} else {
					osu.x = sw - 140 - 20 * i + 60;//
					osu.y = sh + 40 * i;//
					osu2.x = nw - 30 * i + 30;
					osu2.y = 30 * i + 30;
					mesu.x = sw - 70 - 20 * i + 60;//
					mesu.y = sh + 40 * i;//
					mesu2.x = nw + 47 - (30 * i) + 30;
					mesu2.y = 47 + (30 * i) + 30;
					
					graphics.moveTo(osu.x, osu.y + 15);
					graphics.lineTo(osu.x - 160 - (10 * i), osu.y + 15);
					//graphics.lineTo(mesu2.x, mesu2.y);
					//graphics.lineTo(mesu2.x, mesu2.y);
				}
				
				//osu
				var osuTween:ITween = BetweenAS3.serial(
					BetweenAS3.repeat(BetweenAS3.tween(osu, {alpha:0}, {alpha:1}, .2), 2),
					BetweenAS3.tween(osu, { x:osu.x - 20, alpha:1 }, null, .2),
					BetweenAS3.repeat(BetweenAS3.tween(osu2, {alpha:0}, {alpha:1}, .2), 2),
					BetweenAS3.tween(osu2, { x:osu2.x - 10, y:osu2.y - 10, alpha:1 }, null, .2)
				);
				//mesu
				var mesuTween:ITween = BetweenAS3.serial(
					BetweenAS3.repeat(BetweenAS3.tween(mesu, {alpha:0}, {alpha:1}, .2), 2),
					BetweenAS3.tween(mesu, { x:mesu.x + 20, alpha:1 }, null, .2),
					BetweenAS3.repeat(BetweenAS3.tween(mesu2, {alpha:0}, {alpha:1}, .2), 2),
					BetweenAS3.tween(mesu2, {x:mesu2.x + 10, y:mesu2.y + 10, alpha:1}, null, .2)
				);
				//var wrapTween:ITween =  BetweenAS3.delay(BetweenAS3.parallel(osuTween, mesuTween), Math.floor(Math.random() * (2 - .5 + 1)) + .5);
				var wrapTween:ITween =  BetweenAS3.delay(BetweenAS3.parallel(osuTween, mesuTween), Math.random() * (2 - .5 + 1));
				tweens.push(wrapTween);
			}
			
			var tweenA:ITween = BetweenAS3.parallelTweens(tweens);
			var tweenB:ITween = BetweenAS3.reverse(tweenA);
			var tweenC:ITween = BetweenAS3.serial(tweenA, tweenB);
			tweenC.play();
			tweenC.stopOnComplete = false;
			
			this.filters = [new BlurFilter(2, 2)];
		}
            
    }
}

import flash.filters.BlurFilter;
import flash.display.Sprite;
import flash.text.TextField;
import flash.text.TextFormat;

class PartsOSU extends Sprite
{
	public var tf:TextField;
	
	public function PartsOSU()
	{
		graphics.beginFill(0x000000);
		graphics.drawRect(0, 0, 70, 30);
		graphics.drawRect(70, 10, 10, 10);
		graphics.endFill();
		
		var fmt:TextFormat = new TextFormat('_typewriter', 16, 0xadfad8);
		tf = new TextField();
		tf.defaultTextFormat = fmt;
		tf.filters = [new BlurFilter(2, 2)]
		addChild(tf);
	}
}

class PartsMESU extends Sprite
{
	public function PartsMESU()
	{
		graphics.beginFill(0x000000);
		graphics.drawRect(0, 0, 10, 10);
		graphics.drawRect(0, 20, 10, 10);
		graphics.drawRect(10, 0, 70, 30);
		graphics.endFill();
	}
}