Section 1
//MainTimeline (mdance_fla.MainTimeline)
package mdance_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.ui.*;
import flash.filters.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.text.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var rightrect:Shape;
public var my_menu:ContextMenu;
public var doubletime;
public var bandcamp;
public var rightheight;
public var tecsound;
public var rightcap:Shape;
public var justicetempo;
public var leftrect:Shape;
public var basscircle:Shape;
public var leftcap:Shape;
public var soundcloud;
public var test:anchor;
public var rightold;
public var technotempo;
public var guisound;
public var leftold;
public var csizeold;
public var csize;
public var stagedrop:Symbol2;
public var credit;
public var rightcapy;
public var tempo;
public var rnbsound;
public var gatetempo;
public var rnbtempo;
public var gatesound;
public var leftcapy;
public var jussound;
public var guitarstempo;
public var glow:GlowFilter;
public var soundOut;
public var isplaying;
public var leftheight;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14);
}
public function nexttrack():void{
switch (isplaying){
case 0:
soundOut = tecsound.play(0, int.MAX_VALUE);
tempo = technotempo;
isplaying = 1;
break;
case 1:
soundOut = guisound.play(0, int.MAX_VALUE);
tempo = guitarstempo;
isplaying = 2;
break;
case 2:
soundOut = jussound.play(0, int.MAX_VALUE);
tempo = justicetempo;
isplaying = 3;
break;
case 3:
soundOut = gatesound.play(0, int.MAX_VALUE);
tempo = gatetempo;
isplaying = 4;
break;
case 4:
soundOut = rnbsound.play(0, int.MAX_VALUE);
tempo = rnbtempo;
isplaying = 0;
break;
};
}
function frame10(){
updaterects();
}
function frame14(){
gotoAndPlay(2);
updaterects();
}
function frame12(){
updaterects();
}
function frame3(){
updaterects();
}
function frame4(){
updaterects();
}
function frame5(){
updaterects();
}
function frame6(){
updaterects();
}
function frame7(){
updaterects();
}
function frame2(){
updaterects();
}
function frame1(){
my_menu = new ContextMenu();
my_menu.hideBuiltInItems();
credit = new ContextMenuItem("Rubber NAND 2015");
credit.enabled = false;
soundcloud = new ContextMenuItem("Soundcloud");
soundcloud.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, openSCLink);
soundcloud.separatorBefore = true;
bandcamp = new ContextMenuItem("Bandcamp");
bandcamp.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, openBCLink);
doubletime = new ContextMenuItem("Double time!");
doubletime.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, DTclick);
doubletime.separatorBefore = true;
my_menu.customItems.push(credit, soundcloud, bandcamp, doubletime);
contextMenu = my_menu;
basscircle = new Shape();
basscircle.graphics.beginFill(0);
basscircle.graphics.drawEllipse(0, 0, 464, 104);
basscircle.graphics.endFill();
test.addChild(basscircle);
glow = new GlowFilter();
glow.color = 39202;
glow.alpha = 1;
glow.blurX = 25;
glow.blurY = 25;
glow.quality = BitmapFilterQuality.MEDIUM;
basscircle.filters = [glow];
guisound = new guitars();
guitarstempo = 480;
tecsound = new techno();
technotempo = 500;
jussound = new justice();
justicetempo = 500;
gatesound = new gate();
gatetempo = 500;
rnbsound = new rnb();
rnbtempo = 444.444;
tempo = rnbtempo;
soundOut = new SoundChannel();
isplaying = 0;
soundOut = rnbsound.play(0, int.MAX_VALUE);
stage.addEventListener(KeyboardEvent.KEY_DOWN, reportKeyDown);
leftrect = new Shape();
leftrect.graphics.beginFill(7447444, 0.5);
leftrect.graphics.drawRect(0, 0, 93, 435);
leftrect.graphics.endFill();
addChild(leftrect);
rightrect = new Shape();
rightrect.graphics.beginFill(15033958, 0.5);
rightrect.graphics.drawRect(607, 0, 93, 435);
rightrect.graphics.endFill();
addChild(rightrect);
leftcap = new Shape();
leftcap.graphics.beginFill(7447444, 0.85);
leftcap.graphics.drawRect(0, 0, 93, 4);
leftcap.graphics.endFill();
addChild(leftcap);
rightcap = new Shape();
rightcap.graphics.beginFill(15033958, 0.85);
rightcap.graphics.drawRect(607, 0, 93, 4);
rightcap.graphics.endFill();
addChild(rightcap);
leftcapy = 0;
rightcapy = 0;
csize = 0.5;
leftheight = 0;
rightheight = 0;
}
function frame9(){
updaterects();
}
function frame8(){
updaterects();
}
function frame11(){
updaterects();
}
function frame13(){
updaterects();
}
public function openBCLink(_arg1:ContextMenuEvent):void{
navigateToURL(new URLRequest("https://jamesjerram.bandcamp.com/"));
}
public function DTclick(_arg1:ContextMenuEvent):void{
tempo = (tempo / 2);
}
public function newglow(){
glow = new GlowFilter();
glow.color = (0xFFFFFF * Math.random());
glow.alpha = 1;
glow.blurX = 25;
glow.blurY = 25;
glow.quality = BitmapFilterQuality.MEDIUM;
basscircle.filters = [glow];
}
public function openSCLink(_arg1:ContextMenuEvent):void{
navigateToURL(new URLRequest("https://soundcloud.com/9c5"));
}
public function reportKeyDown(_arg1:KeyboardEvent):void{
soundOut.stop();
nexttrack();
}
public function updaterects(){
var _local1:*;
var _local2:*;
leftold = leftheight;
leftheight = (435 * soundOut.leftPeak);
if (leftheight < leftold){
leftheight = (leftold * 0.9);
};
rightold = rightheight;
rightheight = (435 * soundOut.rightPeak);
if (rightheight < rightold){
rightheight = (rightold * 0.9);
};
if (leftcapy > leftold){
leftcapy = (leftcapy * 0.98);
} else {
leftcapy = leftold;
};
leftcap.y = leftcapy;
if (rightcapy > rightold){
rightcapy = (rightcapy * 0.98);
} else {
rightcapy = rightold;
};
rightcap.y = rightcapy;
leftrect.height = leftheight;
rightrect.height = rightheight;
csizeold = csize;
csize = ((soundOut.position % tempo) / tempo);
if (csize < csizeold){
newglow();
};
basscircle.alpha = (1 - Math.pow(csize, 3));
_local1 = (104 * csize);
_local2 = (464 * csize);
basscircle.height = _local1;
basscircle.width = _local2;
basscircle.x = (232 - (_local2 / 2));
basscircle.y = (52 - (_local1 / 2));
trace(basscircle, leftrect, rightrect, leftcap, rightcap);
}
}
}//package mdance_fla
Section 2
//anchor (anchor)
package {
import flash.display.*;
public dynamic class anchor extends MovieClip {
}
}//package
Section 3
//circleguidesymbol (circleguidesymbol)
package {
import flash.display.*;
public dynamic class circleguidesymbol extends MovieClip {
}
}//package
Section 4
//gate (gate)
package {
import flash.media.*;
public dynamic class gate extends Sound {
}
}//package
Section 5
//guitars (guitars)
package {
import flash.media.*;
public dynamic class guitars extends Sound {
}
}//package
Section 6
//justice (justice)
package {
import flash.media.*;
public dynamic class justice extends Sound {
}
}//package
Section 7
//rnb (rnb)
package {
import flash.media.*;
public dynamic class rnb extends Sound {
}
}//package
Section 8
//Symbol1 (Symbol1)
package {
import flash.display.*;
public dynamic class Symbol1 extends MovieClip {
}
}//package
Section 9
//Symbol2 (Symbol2)
package {
import flash.display.*;
public dynamic class Symbol2 extends MovieClip {
public var stagedrop:Symbol1;
}
}//package
Section 10
//techno (techno)
package {
import flash.media.*;
public dynamic class techno extends Sound {
}
}//package