Section 1
//Abs_32 (HyakumanDance_fla.Abs_32)
package HyakumanDance_fla {
import flash.display.*;
public dynamic class Abs_32 extends MovieClip {
public function Abs_32(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package HyakumanDance_fla
Section 2
//Arm_10 (HyakumanDance_fla.Arm_10)
package HyakumanDance_fla {
import flash.display.*;
import flash.media.*;
import flash.events.*;
import flash.geom.*;
import flash.ui.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Arm_10 extends MovieClip {
public var goro:MovieClip;
public var brace:MovieClip;
public var flower:MovieClip;
public var arm:MovieClip;
public var gun:MovieClip;
public var hand:MovieClip;
public var mola:MovieClip;
public var brush:MovieClip;
public var knife:MovieClip;
public var watch:MovieClip;
public function Arm_10(){
addFrameScript(0, frame1, 8, frame9, 17, frame18, 30, frame31, 46, frame47, 54, frame55, 58, frame59, 63, frame64, 89, frame90, 90, frame91, 93, frame94, 100, frame101);
}
function frame64(){
leftIn(brace);
}
public function left(){
return ((MovieClip(parent.parent).left == true));
}
function frame90(){
if (left()){
arm.gotoAndStop(2);
} else {
arm.gotoAndStop(1);
};
}
function frame91(){
if (left()){
hand.gotoAndStop(2);
} else {
hand.gotoAndStop(1);
};
}
function frame94(){
leftIn(watch);
}
function frame1(){
}
function frame9(){
leftIn(goro);
}
function frame18(){
leftOut(gun);
}
function frame47(){
leftOut(brush);
}
public function leftIn(_arg1){
_arg1.visible = left();
}
function frame55(){
if (left()){
arm.gotoAndStop(1);
} else {
arm.gotoAndStop(2);
};
}
public function leftOut(_arg1){
_arg1.visible = !(left());
}
function frame31(){
leftOut(mola);
}
function frame59(){
leftOut(flower);
}
function frame101(){
leftOut(knife);
}
}
}//package HyakumanDance_fla
Section 3
//Back_28 (HyakumanDance_fla.Back_28)
package HyakumanDance_fla {
import flash.display.*;
public dynamic class Back_28 extends MovieClip {
public function Back_28(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package HyakumanDance_fla
Section 4
//Chest_33 (HyakumanDance_fla.Chest_33)
package HyakumanDance_fla {
import flash.display.*;
public dynamic class Chest_33 extends MovieClip {
public function Chest_33(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package HyakumanDance_fla
Section 5
//Forearm_35 (HyakumanDance_fla.Forearm_35)
package HyakumanDance_fla {
import flash.display.*;
public dynamic class Forearm_35 extends MovieClip {
public function Forearm_35(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package HyakumanDance_fla
Section 6
//fps_37 (HyakumanDance_fla.fps_37)
package HyakumanDance_fla {
import flash.display.*;
import flash.media.*;
import flash.events.*;
import flash.geom.*;
import flash.ui.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class fps_37 extends MovieClip {
public const H = 4;
public const W = 32;
public var Bar;
public var invertFPS:Boolean;
public var barDisplay:Number;
public var fps2:Number;
public var stay:Number;
public var fps1:Number;
public var phase:Number;
public var num:TextField;
public var shift:int;
public var stability:Number;
public var precision:Number;
public var lastVal:Number;
public var period:uint;
public var FPS:Number;
public var time:Date;
public function fps_37(){
addFrameScript(0, frame1);
}
function frame1(){
barDisplay = (1 / 2);
invertFPS = !(true);
precision = 0.1;
stability = 1;
period = 4;
shift = Math.floor((Math.log(precision) / Math.LN10));
time = new Date();
FPS = stage.frameRate;
fps1 = FPS;
fps2 = FPS;
stay = (1 - (1 / (1 + 4)));
phase = 0;
if (invertFPS){
num.blendMode = "invert";
};
if (barDisplay > 0){
Bar = new MovieClip();
Bar.outline = new MovieClip();
Bar.outline.graphics.lineStyle(1, 0xFFFFFF, 1, true, "normal", null, JointStyle.MITER);
Bar.outline.graphics.drawRect(0, 0, W, H);
Bar.backShade = new MovieClip();
Bar.backShade.graphics.beginFill(0, 0.5);
Bar.backShade.graphics.drawRect(0, 0, W, H);
Bar.backShade.graphics.endFill();
Bar.fill = new MovieClip();
Bar.addChild(Bar.fill);
Bar.addChild(Bar.outline);
Bar.x = (-(W) / 2);
Bar.y = 8;
addChild(Bar);
Bar.alpha = barDisplay;
};
if (!this.hasEventListener(Event.ENTER_FRAME)){
this.addEventListener(Event.ENTER_FRAME, advance);
};
stop();
}
public function advance(_arg1){
var _local2:Number;
var _local3:*;
var _local4:Number;
var _local5:Number;
var _local6:*;
var _local7:*;
var _local8:*;
phase++;
time = new Date();
_local2 = time.getMilliseconds();
_local3 = (((_local2 - lastVal) + 1000) % 1000);
lastVal = _local2;
if (isNaN(_local3)){
return;
};
fps2 = fps1;
fps1 = (1 / (_local3 / 1000));
FPS = ((FPS * stay) + (((fps1 + fps2) / 2) * (1 - stay)));
MovieClip(root).runSpeed = (fps1 / stage.frameRate);
_local4 = Math.round((((FPS / precision) * precision) * Math.pow(10, -(shift))));
_local5 = Math.min(1, (FPS / stage.frameRate));
if (barDisplay > 0){
_local6 = int((0xFF * Math.min(1, (2 * _local5))));
_local7 = int((0xFF * Math.min(1, (2 * (1 - _local5)))));
Bar.fill.graphics.clear();
Bar.fill.graphics.beginFill((((_local7 * 0x0100) * 0x0100) + (_local6 * 0x0100)), 1);
Bar.fill.graphics.drawRect(0, 0, (W * _local5), H);
Bar.fill.graphics.endFill();
Bar.fill.graphics.beginFill(0, (1 / 2));
Bar.fill.graphics.drawRect((W * _local5), 0, (W * (1 - _local5)), H);
Bar.fill.graphics.endFill();
Bar.cacheAsBitmap = true;
};
if ((phase % period) == 0){
_local8 = String(_local4);
if (shift < 0){
num.text = ((_local8.substr(0, (_local8.length + shift)) + ".") + _local8.substr((_local8.length + shift)));
} else {
num.text = _local8;
};
};
}
}
}//package HyakumanDance_fla
Section 7
//Game_38 (HyakumanDance_fla.Game_38)
package HyakumanDance_fla {
import flash.display.*;
import flash.media.*;
import flash.events.*;
import flash.geom.*;
import flash.ui.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Game_38 extends MovieClip {
public const Rows = 3;
public const min = 3;
public const max = 102;
public const Columns = 8;
public var dancers;
public var C:int;
public var bg:MovieClip;
public var center:MovieClip;
public var i;
public var d;
public var R:int;
public var phase:int;
public var backDancers:MovieClip;
public var list:Array;
public var cHold;
public var mySong:SoundChannel;
public function Game_38(){
addFrameScript(0, frame1);
}
public function getPos(){
return (Math.ceil(((mySong.position / 1000) * 30)));
}
public function loadChar(_arg1, _arg2){
var who = _arg1;
var id = _arg2;
who.scale = function (_arg1, _arg2, _arg3){
_arg3.scaleX = (_arg3.scaleY = _arg1);
_arg3.parent.y = ((-32 * (_arg1 - 1)) - 2);
who.scaleX = (who.scaleY = _arg2);
};
if (((!((who.head.D == undefined))) && (!((who.id == id))))){
who.scale(1, 1, who.head.D.part);
};
who.id = id;
loadPart(who.head, "head", id);
loadPart(who.chest, "chest", id);
loadPart(who.abs, "abs", id);
loadPart(who.pelvis, "pelvis", id);
loadPart(who.back, "back", id);
loadPart(who.upper1, "upper", id);
loadPart(who.upper2, "upper", id);
loadPart(who.fore1, "fore", id);
loadPart(who.fore2, "fore", id);
loadPart(who.thigh1, "thigh", id);
loadPart(who.thigh2, "thigh", id);
loadPart(who.shin1, "shin", id);
loadPart(who.shin2, "shin", id);
}
public function playSong(_arg1=null){
if (((!((mySong == null))) && (mySong.hasEventListener(Event.SOUND_COMPLETE)))){
mySong.removeEventListener(Event.SOUND_COMPLETE, playSong);
};
mySong = Audio.playBGM(new Song(), 0);
mySong.addEventListener(Event.SOUND_COMPLETE, playSong);
}
public function spawn(_arg1){
var _local2:*;
_local2 = getNext(_arg1.Row);
loadChar(_arg1, _local2.frame);
}
function frame1(){
Books.wipe();
Audio.setBGMVolume(0.75);
playSong();
phase = 0;
list = new Array();
i = min;
while (i <= max) {
list.push({frame:i, pos:Math.random(), head:1, size:1});
i++;
};
list.sortOn("pos");
backDancers = new MovieClip();
backDancers.getPos = getPos;
backDancers.spawn = spawn;
this.addChild(backDancers);
dancers = new Array();
C = 0;
while (C < Columns) {
R = 0;
while (R < Rows) {
d = new Dancer();
d.drift = (((R % 2) * 2) - 1);
if (d.drift < 0){
d.x = ((C + ((R % 2) / 2)) * 128);
} else {
d.x = (((Columns - C) + ((R % 2) / 2)) * 128);
};
d.y = ((((1 * (R / Rows)) * 500) + 125) + (200 / Rows));
d.Row = R;
d.initialize();
spawn(d);
backDancers.addChild(d);
d.addEventListener(MouseEvent.MOUSE_DOWN, clickMe);
dancers.push({dancer:d, row:R});
R++;
};
C++;
};
dancers.sortOn("row");
i = 0;
while (i < dancers.length) {
backDancers.swapChildren(dancers[i].dancer, backDancers.getChildAt(i));
i++;
};
center = new Dancer();
center.filters = [new DropShadowFilter(8, 160, 0, 1, 8, 8, 0.25)];
center.Row = 0;
center.scaleX = (center.scaleY = 1);
loadChar(center, 2);
cHold = new MovieClip();
this.addChild(cHold);
cHold.x = 200;
cHold.y = 150;
cHold.scaleX = (cHold.scaleY = 0.75);
cHold.getPos = getPos;
cHold.addChild(center);
center.x = 0;
center.y = 50;
backDancers.scaleX = (backDancers.scaleY = 0.5);
stage.quality = "LOW";
}
public function getNext(_arg1:uint=0){
phase = ((phase + 1) % list.length);
return (list[phase]);
}
public function clickMe(_arg1){
var _local2:MovieClip;
_local2 = MovieClip(_arg1.target.parent.parent.parent);
if (_local2 == null){
return;
};
loadChar(center, _local2.id);
}
public function loadPart(_arg1:MovieClip, _arg2:String, _arg3){
_arg1.gotoAndStop(2);
if (_arg1.D == null){
_arg1.D = new dynamicParts();
_arg1.addChild(_arg1.D);
};
_arg1.D.loadPart(_arg2, _arg3);
}
}
}//package HyakumanDance_fla
Section 8
//Goro_11 (HyakumanDance_fla.Goro_11)
package HyakumanDance_fla {
import flash.display.*;
public dynamic class Goro_11 extends MovieClip {
public function Goro_11(){
addFrameScript(0, frame1, 4, frame5);
}
function frame1(){
play();
}
function frame5(){
gotoAndPlay(1);
}
}
}//package HyakumanDance_fla
Section 9
//Head_36 (HyakumanDance_fla.Head_36)
package HyakumanDance_fla {
import flash.display.*;
public dynamic class Head_36 extends MovieClip {
public function Head_36(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package HyakumanDance_fla
Section 10
//Head_5 (HyakumanDance_fla.Head_5)
package HyakumanDance_fla {
import flash.display.*;
import flash.media.*;
import flash.events.*;
import flash.geom.*;
import flash.ui.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Head_5 extends MovieClip {
public const std:Number;
public function Head_5(){
std = (5 + (9 / 12));
super();
addFrameScript(0, frame1, 5, frame6, 6, frame7, 7, frame8, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 24, frame25, 25, frame26, 27, frame28, 29, frame30, 33, frame34, 36, frame37, 39, frame40, 41, frame42, 44, frame45, 46, frame47, 51, frame52, 52, frame53, 56, frame57, 57, frame58, 58, frame59, 59, frame60, 61, frame62, 62, frame63, 64, frame65, 65, frame66, 67, frame68, 70, frame71, 71, frame72, 72, frame73, 77, frame78, 81, frame82, 82, frame83, 85, frame86, 90, frame91, 91, frame92, 97, frame98, 98, frame99, 100, frame101);
}
function frame65(){
scale(0.9, (7 / std));
}
function frame72(){
scale(1, (6.5 / std));
}
function frame73(){
scale(1.2, (5 / std));
}
function frame71(){
scale(1, (5 / std));
}
function frame86(){
scale(1.2, (4 / std));
}
function frame82(){
scale(1.1, (4 / std));
}
function frame78(){
scale(1.1, (4 / std));
}
function frame99(){
scale(0.9, 1.2);
}
function frame91(){
scale(1, (5 / std));
}
function frame10(){
scale(1.25, (1 / 2));
}
function frame18(){
scale(1.25, (3.8 / std));
}
function frame12(){
scale(1, (4 / std));
}
function frame6(){
scale(1.1, (4 / std));
}
function frame7(){
scale(1.25, (1 / 2));
}
function frame1(){
}
function frame19(){
scale(0.9, (6.5 / std));
}
function frame25(){
scale(1.25, (4 / std));
}
function frame13(){
scale(1, (3 / std));
}
function frame17(){
scale(0.95, (6.5 / std));
}
public function scale(_arg1:Number=1, _arg2:Number=1){
if (MovieClip(parent.parent.parent).scale != undefined){
MovieClip(parent.parent.parent).scale((0.25 + (0.75 * _arg1)), (0.25 + (0.75 * _arg2)), this);
};
}
function frame83(){
scale(1.25, (5 / std));
}
function frame8(){
scale(1, (5 / std));
}
function frame101(){
scale(1, (4.5 / std));
}
function frame15(){
scale(1, (5 / std));
}
function frame30(){
scale(1.5, (1 / 2));
}
function frame28(){
scale(0.9, (7 / std));
}
function frame16(){
scale(1, (4.5 / std));
}
function frame92(){
scale(1.2, (5 / std));
}
function frame34(){
scale(1.25, 0.75);
}
function frame11(){
scale(1.25, (4 / std));
}
function frame37(){
scale(1.1, 0.8);
}
function frame98(){
scale(1.25, (1 / 4));
}
function frame40(){
scale(1.2, 0.5);
}
function frame45(){
scale(1, (8 / std));
}
function frame26(){
scale(1, (1 / 2));
}
function frame42(){
scale(1.25, (2 / 3));
}
function frame52(){
scale(1.1, (2 / 3));
}
function frame57(){
scale(1.1, (4 / std));
}
function frame58(){
scale(1, 1.2);
}
function frame59(){
scale(1.2, (4 / std));
}
function frame47(){
scale(1, (2 / 3));
}
function frame53(){
scale(1.2, (1 / 4));
}
function frame62(){
scale(1.1, (4 / std));
}
function frame66(){
scale(1.2, (1 / 4));
}
function frame60(){
scale(1.2, (4 / std));
}
function frame68(){
scale(0.9, (7 / std));
}
function frame63(){
scale(1.1, (4 / std));
}
}
}//package HyakumanDance_fla
Section 11
//Laughter_8 (HyakumanDance_fla.Laughter_8)
package HyakumanDance_fla {
import flash.display.*;
public dynamic class Laughter_8 extends MovieClip {
public function Laughter_8(){
addFrameScript(0, frame1);
}
function frame1(){
play();
}
}
}//package HyakumanDance_fla
Section 12
//Leg_22 (HyakumanDance_fla.Leg_22)
package HyakumanDance_fla {
import flash.display.*;
import flash.media.*;
import flash.events.*;
import flash.geom.*;
import flash.ui.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Leg_22 extends MovieClip {
public var broom:MovieClip;
public function Leg_22(){
addFrameScript(0, frame1, 32, frame33);
}
function frame1(){
}
function frame33(){
leftOut(broom);
}
public function leftIn(_arg1){
_arg1.visible = (MovieClip(parent.parent).left == true);
}
public function leftOut(_arg1){
_arg1.visible = !((MovieClip(parent.parent).left == true));
}
}
}//package HyakumanDance_fla
Section 13
//Leg_24 (HyakumanDance_fla.Leg_24)
package HyakumanDance_fla {
import flash.display.*;
import flash.media.*;
import flash.events.*;
import flash.geom.*;
import flash.ui.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Leg_24 extends MovieClip {
public var leg:MovieClip;
public var peg:MovieClip;
public function Leg_24(){
addFrameScript(0, frame1, 35, frame36);
}
function frame1(){
}
function frame36(){
leftIn(peg);
leftOut(leg);
}
public function leftIn(_arg1){
_arg1.visible = (MovieClip(parent.parent).left == true);
}
public function leftOut(_arg1){
_arg1.visible = !((MovieClip(parent.parent).left == true));
}
}
}//package HyakumanDance_fla
Section 14
//LoadGoat_3 (HyakumanDance_fla.LoadGoat_3)
package HyakumanDance_fla {
import flash.display.*;
public dynamic class LoadGoat_3 extends MovieClip {
public function LoadGoat_3(){
addFrameScript(0, frame1);
}
function frame1(){
visible = false;
this.stop();
}
}
}//package HyakumanDance_fla
Section 15
//MainTimeline (HyakumanDance_fla.MainTimeline)
package HyakumanDance_fla {
import flash.display.*;
import flash.media.*;
import flash.events.*;
import flash.geom.*;
import flash.ui.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var mainStepper:Function;
public var loadedOnce:Boolean;
public var loadGoat:MovieClip;
public var mute:ContextMenuItem;
public var loadText:TextField;
public var menu:ContextMenu;
public var muted:Boolean;
public var reset:ContextMenuItem;
public var runSpeed:Number;
public var begin:SimpleButton;
public var main;
public var warning:MovieClip;
public var initialized:Boolean;
public var myLoader:LoaderInfo;
public var game:MovieClip;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function loadComplete(_arg1){
var e = _arg1;
loadedOnce = true;
myLoader.removeEventListener(ProgressEvent.PROGRESS, loadProgress);
myLoader.removeEventListener(Event.COMPLETE, loadComplete);
begin.visible = true;
begin.addEventListener(MouseEvent.MOUSE_DOWN, function (_arg1){
gotoAndStop(3);
});
}
function frame3(){
stop();
Keys.initialize(stage);
Audio.initialize(stage);
if (!initialized){
initialized = true;
main = new Schedule();
main.setSpeed(1);
mainStepper = function (_arg1=null){
main.setList(Books.fetch());
main.go();
};
stage.addEventListener(Event.ENTER_FRAME, mainStepper);
menu = new ContextMenu();
menu.hideBuiltInItems();
menu.builtInItems.zoom = true;
menu.builtInItems.quality = true;
reset = new ContextMenuItem("Reset");
reset.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, function (){
prevFrame();
nextFrame();
});
muted = false;
mute = new ContextMenuItem("Mute");
mute.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, function (){
muted = !(muted);
if (muted){
mute.caption = "Unmute";
} else {
mute.caption = "Mute";
};
Audio.mute(muted);
});
menu.customItems.push(reset);
menu.customItems.push(mute);
this.contextMenu = menu;
};
runSpeed = 1;
}
public function loadProgress(_arg1){
var _local2:Number;
var _local3:String;
stop();
_local2 = (_arg1.bytesLoaded / _arg1.bytesTotal);
_local3 = String(int((_local2 * 1000)));
loadText.text = (((_local3.substr(0, (_local3.length - 1)) + ".") + _local3.substr((_local3.length - 1))) + "%");
}
function frame1(){
warning.visible = false;
if (loadedOnce){
loadProgress({bytesLoaded:1, bytesTotal:1});
loadComplete(null);
return;
};
begin.visible = false;
myLoader = this.loaderInfo;
myLoader.addEventListener(ProgressEvent.PROGRESS, loadProgress);
myLoader.addEventListener(Event.COMPLETE, loadComplete);
}
function frame2(){
nextFrame();
}
}
}//package HyakumanDance_fla
Section 16
//Pelvis_31 (HyakumanDance_fla.Pelvis_31)
package HyakumanDance_fla {
import flash.display.*;
public dynamic class Pelvis_31 extends MovieClip {
public function Pelvis_31(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package HyakumanDance_fla
Section 17
//Shin_29 (HyakumanDance_fla.Shin_29)
package HyakumanDance_fla {
import flash.display.*;
public dynamic class Shin_29 extends MovieClip {
public function Shin_29(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package HyakumanDance_fla
Section 18
//Thigh_30 (HyakumanDance_fla.Thigh_30)
package HyakumanDance_fla {
import flash.display.*;
public dynamic class Thigh_30 extends MovieClip {
public function Thigh_30(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package HyakumanDance_fla
Section 19
//Upperarm_34 (HyakumanDance_fla.Upperarm_34)
package HyakumanDance_fla {
import flash.display.*;
public dynamic class Upperarm_34 extends MovieClip {
public function Upperarm_34(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package HyakumanDance_fla
Section 20
//Audio (Audio)
package {
import flash.display.*;
import flash.media.*;
import flash.events.*;
public class Audio {
private static var channelMax:Array = new Array();
private static var channelPlaying:Array = new Array();
private static var voiced:uint = 1;
private static var initialized:Boolean = false;
private static var masterVolume:Number = 1;
private static var channelVolume:Array = new Array();
public static function setBGMVolume(_arg1:Number):void{
setChannelVolume("bgm", _arg1);
}
public static function playBGM(_arg1:Sound, _arg2:Number=-1, _arg3:Number=1, _arg4:Number=0):SoundChannel{
var ch:SoundChannel;
var mus = _arg1;
var loops = _arg2;
var vol = _arg3;
var pan = _arg4;
ch = playSound("bgm", mus, vol, pan);
if (loops != 0){
ch.addEventListener(Event.SOUND_COMPLETE, function (_arg1){
if (loops != 0){
playBGM(mus, (loops - 1), vol, pan);
};
});
};
return (ch);
}
public static function mute(_arg1=null){
if (_arg1 == null){
_arg1 = (voiced == 1);
};
if (_arg1){
voiced = 0;
} else {
voiced = 1;
};
setMasterVolume(masterVolume);
}
public static function createChannel(_arg1:String, _arg2:uint=16){
channelVolume[_arg1] = 1;
channelPlaying[_arg1] = new Array();
channelMax[_arg1] = _arg2;
}
public static function playSound(_arg1:String, _arg2:Sound, _arg3:Number=1, _arg4:Number=0):SoundChannel{
var i:uint;
var ch:SoundChannel;
var channel = _arg1;
var sound = _arg2;
var vol = _arg3;
var pan = _arg4;
i = 0;
while (i < channelMax[channel]) {
if (channelPlaying[channel][i] == undefined){
break;
};
i = (i + 1);
};
if (i >= channelMax[channel]){
throw (new Error((((("Too many samples playing in " + channel) + " channel. (") + i) + ")")));
};
ch = sound.play();
ch.soundTransform = new SoundTransform((((vol * channelVolume[channel]) * masterVolume) * voiced), pan);
channelPlaying[channel][i] = [sound, ch, vol, pan];
ch.addEventListener(Event.SOUND_COMPLETE, function (_arg1){
delete channelPlaying[channel][i];
});
return (ch);
}
public static function setSFXVolume(_arg1:Number):void{
setChannelVolume("sfx", _arg1);
}
public static function stopChannel(_arg1:String){
var _local2:*;
while (channelPlaying[_arg1].length > 0) {
_local2 = channelPlaying[_arg1].pop();
_local2[1].stop();
};
}
public static function initialize(_arg1:Stage):void{
var _local2:*;
for (_local2 in channelPlaying) {
stopChannel(_local2);
};
masterVolume = 1;
createChannel("sfx", 64);
createChannel("bgm", 16);
}
public static function playSFX(_arg1:Sound, _arg2:Number=1, _arg3:Number=0):SoundChannel{
return (playSound("sfx", _arg1, _arg2, _arg3));
}
public static function getMasterVolume():Number{
return (masterVolume);
}
public static function setChannelVolume(_arg1:String, _arg2:Number):void{
var _local3:uint;
var _local4:*;
channelVolume[_arg1] = _arg2;
_local3 = 0;
while (_local3 < channelPlaying[_arg1].length) {
_local4 = channelPlaying[_arg1][_local3];
_local4[1].soundTransform = new SoundTransform((((_local4[2] * _arg2) * masterVolume) * voiced), _local4[3]);
_local3++;
};
}
public static function setMasterVolume(_arg1:Number=1):void{
var _local2:*;
masterVolume = _arg1;
for (_local2 in channelVolume) {
setChannelVolume(_local2, channelVolume[_local2]);
};
}
}
}//package
Section 21
//Books (Books)
package {
import flash.display.*;
import flash.events.*;
public class Books {
private static var subBook:Array = new Array();
private static var myBooks:Array = new Array();
public static function register(_arg1:MovieClip, _arg2:String="active"):int{
var i:uint;
var who = _arg1;
var category = _arg2;
if (who._clubCard == undefined){
who._clubCard = new Array();
};
if (!isNaN(who._clubCard[category])){
return (-1);
};
if (myBooks[category] == undefined){
myBooks[category] = new Array();
};
i = myBooks[category].length;
myBooks[category][i] = who;
who._clubCard[category] = i;
who.addEventListener(Event.REMOVED_FROM_STAGE, function (_arg1){
unregister(who, category);
});
return (i);
}
public static function wipe(_arg1:String=""):void{
if (_arg1 == ""){
myBooks = new Array();
} else {
myBooks[_arg1] = new Array();
};
}
public static function fetch(_arg1:String="active"):Array{
return (myBooks[_arg1]);
}
public static function unregister(_arg1:MovieClip, _arg2:String="active"):Boolean{
var _local3:int;
_local3 = _arg1._clubCard[_arg2];
if (isNaN(_local3)){
return (false);
};
myBooks[_arg2].splice(_local3, 1);
delete _arg1._clubCard[_arg2];
return (true);
}
public static function forget(_arg1:MovieClip):void{
var _local2:*;
for (_local2 in _arg1._clubCard) {
unregister(_arg1, _local2);
};
}
}
}//package
Section 22
//Dancer (Dancer)
package {
import flash.display.*;
import flash.media.*;
import flash.events.*;
import flash.geom.*;
import flash.ui.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Dancer extends MovieClip {
public var chest:MovieClip;
public var fore1:MovieClip;
public var init:Boolean;
public var thigh2:MovieClip;
public var Fr:uint;
public var shin2:MovieClip;
public var shin1:MovieClip;
public var onRemove:Function;
public var self:MovieClip;
public var pos:Point;
public var phase:Number;
public var abs:MovieClip;
public var advance:Function;
public var vel:Point;
public var bnd;
public var bmps:Array;
public var pelvis:MovieClip;
public var drift:Number;
public var locomate:Function;
public var _root:MovieClip;
public var _parent:MovieClip;
public var upper1:MovieClip;
public var upper2:MovieClip;
public var thigh1:MovieClip;
public var head:MovieClip;
public var back:MovieClip;
public var fore2:MovieClip;
public function Dancer(){
addFrameScript(0, frame1);
}
function frame1(){
_root = MovieClip(root);
_parent = MovieClip(parent);
if (advance == null){
advance = function (){
};
};
if (onRemove == null){
onRemove = function (){
};
};
HF.setupAO(this, true);
initialize();
advance = function (){
x = (x + (drift / MovieClip(root).runSpeed));
bnd = this.getBounds(parent);
if ((((drift < 0)) && (((bnd.x + bnd.width) < 0)))){
x = (x + (8 * 128));
cleanUp();
MovieClip(parent).spawn(this);
} else {
if ((((drift > 0)) && ((bnd.x > (7 * 128))))){
x = (x - (8 * 128));
cleanUp();
MovieClip(parent).spawn(this);
};
};
phase++;
if ((phase % 1) == 0){
Fr = MovieClip(parent).getPos();
if (currentFrame != (Fr % totalFrames)){
gotoAndPlay((Fr % totalFrames));
};
};
};
}
public function initialize(_arg1:Boolean=false){
stop();
if (((!(init)) || (_arg1))){
init = true;
bmps = new Array();
phase = int((Math.random() * 16));
if (isNaN(drift)){
drift = 0;
};
};
upper2.left = (fore2.left = (thigh2.left = (shin2.left = true)));
}
public function cleanUp(){
while (bmps.length > 0) {
bmps.pop().dispose();
};
}
public function bmpTrace(_arg1:MovieClip, _arg2:Number=1, _arg3:uint=4):MovieClip{
var _local4:Rectangle;
var _local5:BitmapData;
var _local6:Matrix;
var _local7:Bitmap;
var _local8:MovieClip;
_local4 = _arg1.getBounds(_arg1);
_local5 = new BitmapData(((_local4.width * _arg2) + (2 * _arg3)), ((_local4.height * _arg2) + (2 * _arg3)), true, 0);
_local6 = new Matrix();
_local6.translate(-(_local4.x), -(_local4.y));
_local6.scale(_arg2, _arg2);
_local6.translate(_arg3, _arg3);
_local5.draw(_arg1, _local6);
_local7 = new Bitmap(_local5);
_local8 = new MovieClip();
_local7.x = (_local4.x - _arg3);
_local7.y = (_local4.y - _arg3);
_local7.scaleX = (_local7.scaleY = (1 / _arg2));
_local8.addChild(_local7);
_local8.x = _arg1.x;
_local8.y = _arg1.y;
bmps.push(_local5);
return (_local8);
}
}
}//package
Section 23
//dynamicParts (dynamicParts)
package {
import flash.display.*;
import flash.geom.*;
public dynamic class dynamicParts extends MovieClip {
public var part:MovieClip;
public var cropped:Boolean;
public var toGo;
public function dynamicParts(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9);
}
function frame3(){
this.crop(-((32 + 10)), -10, (64 + (2 * 10)), 24);
done();
}
function frame6(){
done();
}
function frame7(){
done();
}
function frame1(){
done();
}
function frame4(){
this.crop(-((50 + 10)), -10, (100 + (2 * 10)), 100);
done();
}
function frame5(){
done();
}
function frame9(){
done();
}
function frame8(){
done();
}
function frame2(){
this.crop(-((40 + 10)), -50, (80 + (2 * 10)), 60);
done();
}
public function crop(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){
if (cropped){
return;
};
part.scrollRect = new Rectangle((_arg1 - part.x), (_arg2 - part.y), _arg3, _arg4);
part.x = _arg1;
part.y = _arg2;
cropped = true;
}
public function done(){
if (toGo == undefined){
return;
};
if (part != null){
part.gotoAndStop(toGo);
};
}
public function loadPart(_arg1:String, _arg2){
gotoAndStop(_arg1);
toGo = _arg2;
done();
}
}
}//package
Section 24
//HF (HF)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.filters.*;
public class HF {
public static function random(_arg1:Number, _arg2:Number=0, _arg3:Boolean=false):Number{
var _local4:Number;
_local4 = (Math.min(_arg1, _arg2) + (Math.random() * Math.abs((_arg1 - _arg2))));
if (((_arg3) && ((Math.random() < 0.5)))){
_local4 = (_local4 * -1);
};
return (_local4);
}
public static function chance(_arg1:Number=0.5):Boolean{
return ((Math.random() <= _arg1));
}
public static function addListener(_arg1:MovieClip, _arg2:Function, _arg3:String="enterFrame", _arg4:Array=null){
var i:*;
var begin:*;
var who = _arg1;
var f = _arg2;
var trig = _arg3;
var deact = _arg4;
if (deact == null){
deact = [Event.REMOVED_FROM_STAGE, Event.UNLOAD];
};
begin = function (_arg1=null){
var unlisten:*;
var e = _arg1;
who.removeEventListener(Event.ADDED_TO_STAGE, begin);
unlisten = function (_arg1=null){
who.removeEventListener(trig, f);
for (i in deact) {
who.removeEventListener(deact[i], unlisten);
};
};
who.addEventListener(trig, f);
for (i in deact) {
who.addEventListener(deact[i], unlisten);
};
};
who.addEventListener(Event.ADDED_TO_STAGE, begin);
if (who.parent != null){
begin();
};
}
public static function asymptote(_arg1:Number, _arg2:Number=100, _arg3:Number=0.5):Number{
var _local4:*;
var _local5:Number;
if (Math.abs(_arg1) <= (_arg2 * _arg3)){
return (_arg1);
};
_local4 = (((_arg2 * 2) / Math.PI) * (1 - _arg3));
_local5 = ((sign(_arg1) * _arg2) * _arg3);
return ((_local5 + (_local4 * Math.atan(((_arg1 - _local5) / _local4)))));
}
public static function setupAO(_arg1:MovieClip=null, _arg2:Boolean=false):MovieClip{
var clss:String;
var t = _arg1;
var keepName = _arg2;
if (t == null){
t = new MovieClip();
};
if ((((t.name.substr(0, 8) == "instance")) && (!(keepName)))){
clss = getQualifiedClassName(t);
if (clss.indexOf("::") > 0){
clss = clss.substr((clss.indexOf("::") + 2));
};
t.name = (clss + t.name.substr(8));
};
if (t.pos == null){
t.pos = new Point(t.x, t.y);
};
if (t.vel == null){
t.vel = new Point(0, 0);
};
if (isNaN(t.phase)){
t.phase = 0;
};
t.onRemove = function (){
};
t.self = t;
t.locomate = function (_arg1:Number=0):void{
t.pos.offset(t.vel.x, t.vel.y);
t.x = t.pos.x;
t.y = t.pos.y;
t.vel.normalize((t.vel.length * (1 - t.drag)));
};
t.addEventListener(Event.REMOVED_FROM_STAGE, function (_arg1){
t.onRemove();
});
Books.register(t);
return (t);
}
public static function midMod(_arg1:Number, _arg2:Number):Number{
return (((((_arg1 % _arg2) + (1.5 * _arg2)) % _arg2) - (_arg2 / 2)));
}
public static function mag(_arg1, _arg2):Number{
return (Math.sqrt(((_arg1 * _arg1) + (_arg2 * _arg2))));
}
public static function clone(_arg1:Object){
var _local2:ByteArray;
_local2 = new ByteArray();
_local2.writeObject(_arg1);
_local2.position = 0;
return (_local2.readObject());
}
public static function sign(_arg1):int{
if ((_arg1 is Boolean)){
if (_arg1){
return (1);
};
return (-1);
//unresolved jump
};
if (_arg1 >= 0){
return (1);
};
return (-1);
}
public static function bmpCleanup(_arg1:DisplayObject, _arg2:BitmapData=null):void{
var rem:*;
var bin = _arg1;
var bmp = _arg2;
if (bmp == null){
bmp = Bitmap(bin).bitmapData;
};
rem = function (_arg1){
trace("boom");
bmp.dispose();
bin.removeEventListener(Event.REMOVED_FROM_STAGE, rem);
bin.removeEventListener(Event.UNLOAD, rem);
rem = null;
};
bin.addEventListener(Event.REMOVED_FROM_STAGE, rem);
bin.addEventListener(Event.UNLOAD, rem);
}
}
}//package
Section 25
//Keys (Keys)
package {
import flash.events.*;
public class Keys {
private static const codes1:String = "0123456789";
private static const codes2:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
private static const codes3:String = ":+<_>?~";
private static const codes4:String = "{|}"";
private static const codes0:String = (((codes1 + codes2) + codes3) + codes4);
private static var timer:Array = new Array();
private static var pressed:Array = new Array();
private static var init:Boolean = false;
public static function getCode(_arg1:String):int{
var _local2:int;
_local2 = codes0.indexOf(_arg1);
if (_local2 >= 43){
return (((219 + _local2) - 43));
};
if (_local2 >= 36){
return (((186 + _local2) - 36));
};
if (_local2 >= 10){
return (((65 + _local2) - 10));
};
if (_local2 >= 0){
return (((48 + _local2) - 0));
};
return (-1);
}
public static function isDown(_arg1:uint):Boolean{
return (pressed[str(_arg1)]);
}
public static function initialize(_arg1){
var a:*;
var stage = _arg1;
if (init){
return;
};
init = true;
timer = new Array();
pressed = new Array();
a = 0;
while (a < 0xFF) {
timer[str(a)] = 0;
a = (a + 1);
};
stage.addEventListener(KeyboardEvent.KEY_DOWN, function (_arg1:KeyboardEvent){
var _local2:*;
_local2 = str(_arg1.keyCode);
if (timer[_local2] < 0){
timer[_local2] = 0;
};
pressed[_local2] = 1;
});
stage.addEventListener(KeyboardEvent.KEY_UP, function (_arg1:KeyboardEvent){
var _local2:*;
_local2 = str(_arg1.keyCode);
pressed[_local2] = -1;
});
stage.addEventListener(Event.ENTER_FRAME, function (_arg1){
var _local2:*;
for (_local2 in pressed) {
if (pressed[_local2] == 1){
var _local5 = timer;
var _local6 = _local2;
var _local7 = (_local5[_local6] + 1);
_local5[_local6] = _local7;
} else {
if (pressed[_local2] == -1){
timer[_local2] = (timer[_local2] * -1);
pressed[_local2] = 0;
} else {
timer[_local2] = 0;
delete pressed[_local2];
};
};
};
});
}
public static function holdTime(_arg1:uint):Number{
return (timer[str(_arg1)]);
}
private static function str(_arg1):String{
if (isNaN(_arg1)){
return (_arg1);
};
return (("k" + _arg1));
}
public static function getDown(){
return (pressed);
}
}
}//package
Section 26
//Schedule (Schedule)
package {
import flash.display.*;
public class Schedule extends MovieClip {
private var active:Boolean;// = true
private var steps:Number;// = 0
private var speed:Number;// = 0
public var sub:Array;
private var list:Array;
public function Schedule(_arg1:Number=1){
list = new Array();
sub = new Array();
active = true;
speed = 0;
steps = 0;
super();
list = new Array();
sub = new Array();
steps = 0;
pause(false);
setSpeed(_arg1);
}
public function setSpeed(_arg1:Number=1):void{
_arg1 = Math.max(0, _arg1);
speed = _arg1;
}
public function getList():Array{
return (list);
}
public function setList(_arg1:Array):void{
list = _arg1;
}
public function go(_arg1:Boolean=true):void{
var _local2:*;
var _local3:*;
if (((_arg1) && (active))){
steps = (steps + speed);
while (steps >= 1) {
steps--;
for (_local2 in list) {
list[_local2].advance();
};
for (_local3 in sub) {
sub[_local3].go();
};
};
};
}
public function pause(_arg1=null):Boolean{
if (_arg1 == null){
active = !(active);
} else {
active = !(_arg1);
};
return (active);
}
}
}//package
Section 27
//Song (Song)
package {
import flash.media.*;
public dynamic class Song extends Sound {
}
}//package