Paranoid Android
/**
* Copyright tjoen ( http://wonderfl.net/user/tjoen )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/fhvq
*/
package{
import flash.utils.Timer;
import flash.events.TimerEvent;
import flash.display.Sprite;
import flash.display.Shape;
import flash.geom.ColorTransform;
import com.flashdynamix.utils.*;
import com.flashdynamix.motion.guides.Bezier2D;
import com.flashdynamix.motion.*;
import fl.motion.easing.*;
import org.si.sion.*;
import org.si.sion.utils.*;
[SWF(width='465', height='465', backgroundColor='#0000000', frameRate='30')]
public class ParanoidAndroid extends Sprite
{
public var driver:SiONDriver = new SiONDriver();
public var voices:SiONPresetVoice = new SiONPresetVoice();
public var voice:SiONVoice = voices["valsound.se2"];
public var soundEff:SiONData;
public var android:Sprite = new Sprite();
public function ParanoidAndroid():void {
var timer:Timer = new Timer(5000, 0);
timer.addEventListener(TimerEvent.TIMER, paraRobo);
timer.start();
android.graphics.beginFill(0x97C024,1);
android.graphics.lineStyle(12,0x97c024,1,false,"normal","round","round",3);
android.graphics.moveTo(14,40);
android.graphics.lineTo(14,64);
android.graphics.moveTo(81,40);
android.graphics.lineTo(81,64);
android.graphics.moveTo(38,68);
android.graphics.lineTo(38,92);
android.graphics.moveTo(57,68);
android.graphics.lineTo(57,92);
android.graphics.moveTo(28,42);
android.graphics.lineTo(28,73);
android.graphics.lineTo(67,73);
android.graphics.lineTo(67,42);
android.graphics.lineStyle(2,0x97c024,1,false,"normal","round","round",3);
android.graphics.moveTo(32,5);
android.graphics.lineTo(37,15);
android.graphics.moveTo(64,5);
android.graphics.lineTo(58, 15);
android.graphics.lineStyle();
android.graphics.moveTo(22,35);
android.graphics.lineTo(73,35);
android.graphics.lineTo(73,45);
android.graphics.lineTo(22,45);
android.graphics.lineTo(22,35);
android.graphics.moveTo(22,33);
android.graphics.curveTo(22,21.38,29.97,15.56);
android.graphics.curveTo(37.94,9.75,47.5,9.75);
android.graphics.curveTo(57.06,9.75,65.03,15.56);
android.graphics.curveTo(73, 21.38, 73, 33);
//Eyes
android.graphics.beginFill(0xFFFFFF,1);
android.graphics.drawCircle(38,22,2);
android.graphics.drawCircle(57,22,2);
android.graphics.endFill();
addChild(android);
android.scaleX = 3;
android.scaleY = 3;
android.x = (stage.stageWidth-android.width)/2;
android.y = (stage.stageHeight-android.height)/2;
soundEff = driver.compile("t20 20 >>>c");
driver.play();
}
public function paraRobo(e:TimerEvent):void {
driver.sequenceOn(soundEff, voice, 0, 0, 3);
Tweensy.to(android, {alpha: 1, rotation: 0, scaleX: 2, scaleY: 2, y:0+Math.random() * (stage.stageHeight-android.height/2), x:0+Math.random() * (stage.stageWidth-android.width)}, 3, Back.easeOut, 0.6);
Tweensy.to(android, {alpha: 1, rotation: 0, scaleX: 4, scaleY: 4}, 1.5, Sine.easeIn);
Tweensy.to(android, {alpha: 1, rotation: 0, scaleX: 2, scaleY: 2}, 1.5, Sine.easeInOut, 1.5);
Tweensy.to(android.transform.colorTransform, { redOffset: Math.random() * 100, greenOffset: Math.random() * 100, blueOffset:Math.random() * 100 }, 3, null, 0.6, android);
}
}
}