Section 1
//avLogo_3 (JigCircle_fla.avLogo_3)
package JigCircle_fla {
import flash.display.*;
public dynamic class avLogo_3 extends MovieClip {
public var explosion:MovieClip;
}
}//package JigCircle_fla
Section 2
//avLogo_5 (JigCircle_fla.avLogo_5)
package JigCircle_fla {
import flash.display.*;
public dynamic class avLogo_5 extends MovieClip {
public function avLogo_5(){
addFrameScript(1, frame2, 9, frame10);
}
function frame10(){
stop();
}
function frame2(){
}
}
}//package JigCircle_fla
Section 3
//Background_1 (JigCircle_fla.Background_1)
package JigCircle_fla {
import flash.display.*;
public dynamic class Background_1 extends MovieClip {
public var arcadeVoidButton:SimpleButton;
}
}//package JigCircle_fla
Section 4
//Abbey (Abbey)
package {
import flash.display.*;
public dynamic class Abbey extends BitmapData {
public function Abbey(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 5
//Arches (Arches)
package {
import flash.display.*;
public dynamic class Arches extends BitmapData {
public function Arches(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 6
//BeginSound (BeginSound)
package {
import flash.media.*;
public dynamic class BeginSound extends Sound {
}
}//package
Section 7
//BoB (BoB)
package {
import flash.display.*;
public dynamic class BoB extends BitmapData {
public function BoB(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 8
//Bricks (Bricks)
package {
import flash.display.*;
public dynamic class Bricks extends BitmapData {
public function Bricks(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 9
//Cat (Cat)
package {
import flash.display.*;
public dynamic class Cat extends BitmapData {
public function Cat(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 10
//CDs (CDs)
package {
import flash.display.*;
public dynamic class CDs extends BitmapData {
public function CDs(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 11
//Cereal (Cereal)
package {
import flash.display.*;
public dynamic class Cereal extends BitmapData {
public function Cereal(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 12
//ClickSound (ClickSound)
package {
import flash.media.*;
public dynamic class ClickSound extends Sound {
}
}//package
Section 13
//Clocking (Clocking)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class Clocking extends MovieClip {
public var time:int;// = 30
private static const TIME:int = 30;
public function Clocking(){
time = TIME;
super();
addFrameScript(32, frame33);
addEventListener(MouseEvent.CLICK, remove, false, 0, true);
addEventListener(Event.ENTER_FRAME, tick, false, 0, true);
}
function explosionTick(_arg1:Event){
var _local2:Sprite;
var _local3:int;
var _local4:Particle;
_local2 = (_arg1.currentTarget as Sprite);
if (!_local2){
return;
};
_local2.alpha = Math.max((_local2.alpha - 0.01), 0);
if (!_local2.alpha){
_local2.removeEventListener(Event.ENTER_FRAME, explosionTick, false);
if (_local2.parent){
_local2.parent.removeChild(_local2);
};
return;
};
_local3 = 0;
while (_local3 < _local2.numChildren) {
_local4 = (_local2.getChildAt(_local3) as Particle);
(_local2.getChildAt(_local3) as Particle).x = (_local4.x + _local4.dx);
_local4.y = (_local4.y + _local4.dy);
_local4.dx = (_local4.dx * 0.95);
_local4.dy = (_local4.dy * 0.95);
_local4.dy = (_local4.dy + 0.1);
_local3++;
};
}
function remove(_arg1:MouseEvent){
removeEventListener(MouseEvent.CLICK, remove, false);
removeEventListener(Event.ENTER_FRAME, tick, false);
if (parent){
parent.removeChild(this);
};
}
function tick(_arg1:Event){
time--;
if (!time){
time = (((Math.random() * 0.5) + 0.5) * TIME);
explode();
};
}
function frame33(){
stop();
}
function explode(){
var _local1:int;
var _local2:Number;
var _local3:Sprite;
var _local4:int;
var _local5:Number;
var _local6:Particle;
_local1 = ((Math.random() * 30) + 30);
_local2 = (_local1 / 10);
_local3 = new Sprite();
_local3.transform.colorTransform = new ColorTransform(((Math.random() * 0.5) + 0.5), ((Math.random() * 0.5) + 0.5), ((Math.random() * 0.5) + 0.5), 1);
_local3.x = (100 + (Math.random() * 200));
_local3.y = (80 + (Math.random() * 120));
addChildAt(_local3, 1);
_local4 = 0;
while (_local4 < _local1) {
_local6 = new Particle();
_local5 = ((Math.PI * 2) * (_local4 / _local1));
_local6.dx = ((Math.cos(_local5) * _local2) * ((Math.random() * 0.3) + 0.85));
_local6.dy = ((Math.sin(_local5) * _local2) * ((Math.random() * 0.3) + 0.85));
_local3.addChild(_local6);
_local4++;
};
if (_local1 > 55){
_local2 = (_local2 * 0.5);
_local4 = 0;
while (_local4 < _local1) {
_local6 = new Particle();
_local5 = ((Math.PI * 2) * (_local4 / _local1));
_local6.dx = ((Math.cos(_local5) * _local2) * ((Math.random() * 0.3) + 0.85));
_local6.dy = ((Math.sin(_local5) * _local2) * ((Math.random() * 0.3) + 0.85));
_local3.addChild(_local6);
_local4++;
};
Sounds.fireworks1();
} else {
if (_local1 > 45){
Sounds.fireworks2();
} else {
Sounds.fireworks3();
};
};
_local3.addEventListener(Event.ENTER_FRAME, explosionTick, false, 0, true);
}
}
}//package
Section 14
//Cow (Cow)
package {
import flash.display.*;
public dynamic class Cow extends BitmapData {
public function Cow(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 15
//Cross (Cross)
package {
import flash.display.*;
public dynamic class Cross extends BitmapData {
public function Cross(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 16
//Document (Document)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.external.*;
import flash.net.*;
import flash.ui.*;
public class Document extends MovieClip {
public var px:Number;
public var py:Number;
public var bg:MovieClip;
public var preloader:MovieClip;
public var loadBar:MovieClip;
public var exploded:Boolean;// = false
public var animFinished:Boolean;// = false
public var fireballs:Array;
public var parts:Array;
public var shakeTimer:Timer;
public static var random:Number;
public function Document(){
var _local1:*;
var _local2:ContextMenuItem;
exploded = false;
animFinished = false;
super();
stop();
_local1 = new ContextMenu();
_local1.hideBuiltInItems();
_local2 = new ContextMenuItem("Arcade Void");
_local2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, arcadeVoidLink, false, 0, true);
_local1.customItems.push(_local2);
contextMenu = _local1;
bg.alpha = 0;
bg.arcadeVoidButton.addEventListener(MouseEvent.CLICK, arcadeVoidLink, false, 0, true);
loadBar = new MovieClip();
bg.addChild(loadBar);
px = preloader.x;
py = preloader.y;
preloader.buttonMode = true;
preloader.mouseChildren = false;
preloader.addEventListener(MouseEvent.CLICK, arcadeVoidLink, false, 0, true);
shakeTimer = new Timer(6, 12);
shakeTimer.addEventListener(TimerEvent.TIMER, shake, false, 0, true);
shakeTimer.addEventListener(TimerEvent.TIMER_COMPLETE, shakeComplete, false, 0, true);
addEventListener(Event.ENTER_FRAME, preload, false, 0, true);
}
function shake(_arg1:TimerEvent){
var _local2:int;
_local2 = 3;
if (int((Math.random() * 2))){
preloader.x = (px - (1 * _local2));
} else {
preloader.x = (px + (1 * _local2));
};
if (int((Math.random() * 2))){
preloader.y = (py - (1 * _local2));
} else {
preloader.y = (py + (1 * _local2));
};
}
function preload(_arg1:Event){
var _local2:Number;
if (preloader){
if (preloader.currentFrame == 36){
shakeTimer.start();
} else {
if (preloader.currentFrame == preloader.totalFrames){
preloader.stop();
animFinished = true;
};
};
if (((preloader.explosion) && (!(exploded)))){
explode();
exploded = true;
};
};
_local2 = (loaderInfo.bytesLoaded / loaderInfo.bytesTotal);
if (animFinished){
bg.alpha = Math.min((bg.alpha + 0.05), 1);
loadBar.graphics.clear();
loadBar.graphics.beginFill(0);
loadBar.graphics.drawRect(98, 188, 204, 24);
loadBar.graphics.endFill();
loadBar.graphics.beginFill(0xAAAAAA);
loadBar.graphics.drawRect(100, 190, (200 * _local2), 20);
loadBar.graphics.endFill();
};
if (_local2 >= 1){
loadBar.graphics.clear();
bg.alpha = 1;
removeEventListener(Event.ENTER_FRAME, preload, false);
gotoAndStop(3);
};
}
function shakeComplete(_arg1:TimerEvent){
preloader.x = px;
preloader.y = py;
}
function stopExplosion(){
preloader.explosion.stop();
}
function fireballsStep(_arg1:Event){
var _local2:int;
var _local3:ExplosionFireball;
_local2 = (fireballs.length - 1);
while (_local2 >= 0) {
_local3 = fireballs[_local2];
_local3.mc.x = (_local3.mc.x + _local3.xSpeed);
_local3.mc.scaleX = (_local3.mc.scaleX + 0.1);
_local3.mc.alpha = (_local3.mc.alpha - 0.05);
if (_local3.mc.alpha <= 0){
if (_local3.parent){
_local3.parent.removeChild(_local3);
};
fireballs.splice(_local2, 1);
};
_local2--;
};
if (!fireballs.length){
removeEventListener(Event.ENTER_FRAME, fireballsStep);
};
}
function partsStep(_arg1:Event){
var _local2:int;
var _local3:MovieClip;
_local2 = (parts.length - 1);
while (_local2 >= 0) {
_local3 = parts[_local2];
_local3.x = (_local3.x + _local3.xSpeed);
_local3.scaleX = (_local3.scaleMultiper / 100);
_local3.scaleY = (_local3.scaleMultiper / 100);
if (_local3.scaleMultiper > 0){
_local3.scaleMultiper = (_local3.scaleMultiper - _local3.scale);
};
_local3.y = (_local3.y + _local3.ySpeed);
_local3.ySpeed = (_local3.ySpeed + 0.5);
_local3.rotation = (_local3.rotation + _local3.rot);
if (_local3.scaleMultiper <= 0){
if (_local3.parent){
_local3.parent.removeChild(_local3);
};
parts.splice(_local2, 1);
};
_local2--;
};
if (!parts.length){
removeEventListener(Event.ENTER_FRAME, partsStep);
};
}
function explode(){
var _local1:int;
var _local2:ExplosionFireball;
var _local3:MovieClip;
preloader.explosion.addFrameScript((preloader.explosion.totalFrames - 1), stopExplosion);
fireballs = new Array();
parts = new Array();
_local1 = 0;
while (_local1 < 10) {
_local2 = new ExplosionFireball();
_local2.rotation = (Math.random() * 360);
_local2.mc.scaleX = (_local2.mc.scaleY = ((Math.random() * 0.5) + 0.5));
_local2.xSpeed = (10 + (Math.random() * 10));
fireballs.push(_local2);
preloader.explosion.addChild(_local2);
_local1++;
};
_local1 = 0;
while (_local1 < 30) {
_local3 = new ExplosionPart();
_local3.gotoAndStop((1 + (Math.random() * _local3.totalframes)));
_local3.rot = (Math.random() * 45);
_local3.xSpeed = (-10 + (Math.random() * 20));
_local3.ySpeed = (-10 + (Math.random() * 20));
_local3.scaleMultiper = (Math.random() * 300);
_local3.scale = (_local3.scaleMultiper / 40);
parts.push(_local3);
preloader.explosion.addChild(_local3);
_local1++;
};
addEventListener(Event.ENTER_FRAME, fireballsStep, false, 0, true);
addEventListener(Event.ENTER_FRAME, partsStep, false, 0, true);
}
public static function openURL(_arg1:String){
var url = _arg1;
try {
ExternalInterface.call("window.open", url, "_blank", "");
} catch(error:Error) {
navigateToURL(new URLRequest(url), "_blank");
};
}
public static function sourceLink(_arg1:Event=null):void{
openURL("http://www.publicdomainpictures.net");
}
public static function biclopsLink(_arg1:Event=null):void{
openURL("http://www.biclopsgames.com");
}
public static function addGameLink(_arg1:Event=null):void{
openURL("http://www.biclopsgames.com/distro.php");
}
public static function arcadeVoidLink(_arg1:Event=null):void{
openURL("http://arcadevoid.com/?jigcircle");
}
}
}//package
Section 17
//Elephant (Elephant)
package {
import flash.display.*;
public dynamic class Elephant extends BitmapData {
public function Elephant(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 18
//ExplosionFireball (ExplosionFireball)
package {
import flash.display.*;
public dynamic class ExplosionFireball extends MovieClip {
public var mc:MovieClip;
}
}//package
Section 19
//ExplosionPart (ExplosionPart)
package {
import flash.display.*;
public dynamic class ExplosionPart extends MovieClip {
}
}//package
Section 20
//Fireworks1 (Fireworks1)
package {
import flash.media.*;
public dynamic class Fireworks1 extends Sound {
}
}//package
Section 21
//Fireworks2 (Fireworks2)
package {
import flash.media.*;
public dynamic class Fireworks2 extends Sound {
}
}//package
Section 22
//Fireworks3 (Fireworks3)
package {
import flash.media.*;
public dynamic class Fireworks3 extends Sound {
}
}//package
Section 23
//Fruit (Fruit)
package {
import flash.display.*;
public dynamic class Fruit extends BitmapData {
public function Fruit(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 24
//Game (Game)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.filters.*;
public class Game extends Sprite {
public var soundButton:SimpleButton;
public var clockingShown:Boolean;// = false
public static var game:Game;
private static var cookie:SharedObject;
public function Game(){
clockingShown = false;
super();
game = this;
cookie = SharedObject.getLocal("JigCircle");
getLevelsComplete();
showLevelSelect();
soundButton.addEventListener(MouseEvent.CLICK, toggleSound, false, 0, true);
}
function toggleSound(_arg1:MouseEvent){
var _local2:BevelFilter;
Sounds.toggle();
_local2 = soundButton.filters[0];
if (Sounds.mute){
_local2.strength = 0.5;
} else {
_local2.strength = 1.5;
};
soundButton.filters = [_local2];
}
function checkClocking(){
var _local1:LevelInfo;
if (clockingShown){
return;
};
for each (_local1 in Level.levelList) {
if (!_local1.completed){
return;
};
};
clockingShown = true;
addChild(new Clocking());
}
function levelSelected(_arg1:JigEvent){
var _local2:LevelSelect;
_local2 = (_arg1.currentTarget as LevelSelect);
_local2.removeEventListener(JigEvent.LEVEL_SELECTED, levelSelected, false);
removeChild(_local2);
playLevel(_arg1.level);
}
function showLevelSelect(){
var _local1:LevelSelect;
_local1 = new LevelSelect();
addChild(_local1);
_local1.addEventListener(JigEvent.LEVEL_SELECTED, levelSelected, false, 0, true);
setChildIndex(soundButton, (numChildren - 1));
checkClocking();
}
function nextLevel(_arg1:JigEvent){
var _local2:Level;
var _local3:int;
_local2 = (_arg1.currentTarget as Level);
removeChild(_local2);
_local2.dispose();
_local2.removeEventListener(JigEvent.LEVEL_EXITED, levelExited, false);
_local2.removeEventListener(JigEvent.NEXT_LEVEL, nextLevel, false);
_local3 = (_local2.levelNumber + 1);
if (_local3 < Level.levelList.length){
playLevel(_local3);
} else {
showLevelSelect();
};
}
function playLevel(_arg1:int){
var _local2:Level;
_local2 = new Level(_arg1);
addChild(_local2);
_local2.addEventListener(JigEvent.LEVEL_EXITED, levelExited, false, 0, true);
_local2.addEventListener(JigEvent.NEXT_LEVEL, nextLevel, false, 0, true);
setChildIndex(soundButton, (numChildren - 1));
}
function getLevelsComplete(){
var _local1:uint;
var _local2:int;
_local1 = cookie.data.completed;
if (!_local1){
return;
};
if (Math.sqrt((_local1 - 2)) != int(Math.sqrt((_local1 - 2)))){
return;
};
_local1 = (Math.sqrt((_local1 - 2)) - 5);
_local2 = 0;
while (_local2 < Level.levelList.length) {
Level.levelList[_local2].completed = (_local1 & Math.pow(2, _local2));
_local2++;
};
}
function levelExited(_arg1:JigEvent){
var _local2:Level;
_local2 = (_arg1.currentTarget as Level);
removeChild(_local2);
_local2.dispose();
_local2.removeEventListener(JigEvent.LEVEL_EXITED, levelExited, false);
_local2.removeEventListener(JigEvent.NEXT_LEVEL, nextLevel, false);
showLevelSelect();
}
public static function updateLevelsComplete(){
var _local1:uint;
var _local2:int;
var _local3:int;
_local1 = 0;
_local2 = 0;
_local3 = 0;
while (_local3 < Level.levelList.length) {
if (Level.levelList[_local3].completed){
_local1 = (_local1 + Math.pow(2, _local3));
_local2++;
};
_local3++;
};
if (!_local2){
return;
};
cookie.data.completed = (((_local1 + 5) * (_local1 + 5)) + 2);
cookie.flush();
}
}
}//package
Section 25
//Garden (Garden)
package {
import flash.display.*;
public dynamic class Garden extends BitmapData {
public function Garden(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 26
//JigEvent (JigEvent)
package {
import flash.events.*;
public class JigEvent extends Event {
public var level:int;
public static const LEVEL_SELECTED:String = "Level Selected";
public static const LEVEL_EXITED:String = "Level Exited";
public static const NEXT_LEVEL:String = "Next Level";
public function JigEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:int=0){
super(_arg1, _arg2, _arg3);
this.level = _arg4;
}
function Clone():Event{
return (new JigEvent(type, bubbles, cancelable, level));
}
}
}//package
Section 27
//Labrador (Labrador)
package {
import flash.display.*;
public dynamic class Labrador extends BitmapData {
public function Labrador(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 28
//Landscape (Landscape)
package {
import flash.display.*;
public dynamic class Landscape extends BitmapData {
public function Landscape(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 29
//Level (Level)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.geom.*;
public class Level extends MovieClip {
public var nextButton:SimpleButton;
public var arcadeVoidButton:SimpleButton;
public var background:Bitmap;
public var timeDisplay:TextField;
public var puzzle:Sprite;
public var rings:Array;
public var timer:Timer;
public var image:BitmapData;
public var menuButton:SimpleButton;
public var intro:Bitmap;
public var nextMask:MovieClip;
public var levelInfo:LevelInfo;
public var currentSlice:Slice;
public var display:Sprite;
public var time:int;
public var levelNumber:int;
private static const TO_DEGREES:Number = 57.2957795130823;
private static const CIRCLE:Number = 6.28318530717959;
private static var BEVEL:BevelFilter = new BevelFilter(1, 45);
private static var zeroPoint:Point = new Point(0, 0);
public static var levelList:Array = [new LevelInfo(new Sunrise(400, 400), 3), new LevelInfo(new Abbey(400, 400), 3), new LevelInfo(new Cat(400, 400), 3), new LevelInfo(new Bricks(400, 400), 3), new LevelInfo(new Labrador(400, 400), 4), new LevelInfo(new Cow(400, 400), 4), new LevelInfo(new Garden(400, 400), 4), new LevelInfo(new CDs(400, 400), 4), new LevelInfo(new Landscape(400, 400), 4), new LevelInfo(new Cereal(400, 400), 4), new LevelInfo(new OldBuilding(400, 400), 5), new LevelInfo(new Penguins(400, 400), 5), new LevelInfo(new Arches(400, 400), 5), new LevelInfo(new Fruit(400, 400), 5), new LevelInfo(new Spaniel(400, 400), 5), new LevelInfo(new Rope(400, 400), 5), new LevelInfo(new Monument(400, 400), 5), new LevelInfo(new Rose(400, 400), 5), new LevelInfo(new Strawberries(400, 400), 5), new LevelInfo(new Cross(400, 400), 5), new LevelInfo(new Orange(400, 400), 5), new LevelInfo(new Elephant(400, 400), 6), new LevelInfo(new Sunset(400, 400), 6), new LevelInfo(new BoB(400, 400), 6)];
private static var BLACK_GLOW:GlowFilter = new GlowFilter(0, 1, 2, 2, 5, BitmapFilterQuality.HIGH);
private static var DIVIDER_GLOW:GlowFilter = new GlowFilter(4294901760, 0.5, 1.5, 1.5, 5, BitmapFilterQuality.HIGH);
private static var YELLOW_GLOW:GlowFilter = new GlowFilter(0xFFFF00, 1, 1.5, 1.5, 5, BitmapFilterQuality.HIGH);
public function Level(_arg1:int=-1){
var _local2:BitmapData;
var _local3:*;
var _local4:Number;
var _local5:Sprite;
var _local6:Ring;
var _local7:int;
var _local8:Number;
var _local9:int;
var _local10:Number;
var _local11:uint;
var _local12:uint;
var _local13:uint;
var _local14:Sprite;
var _local15:Graphics;
var _local16:Number;
var _local17:Rectangle;
var _local18:BitmapData;
var _local19:BitmapData;
var _local20:BitmapData;
var _local21:Number;
var _local22:Number;
var _local23:Rectangle;
var _local24:BitmapData;
var _local25:Bitmap;
var _local26:Slice;
super();
addFrameScript(8, frame9);
stop();
if (_arg1 < 0){
return;
};
this.levelNumber = _arg1;
levelInfo = (levelInfo = levelList[_arg1]);
_local2 = levelInfo.image;
_local3 = levelInfo.rings;
image = new BitmapData(400, 400);
_local4 = Math.max((image.width / _local2.width), (image.height / _local2.height));
image.draw(_local2, new Matrix(_local4, 0, 0, _local4, ((400 - (_local2.width * _local4)) / 2), ((400 - (_local2.height * _local4)) / 2)));
background = new Bitmap(image);
display = new Sprite();
puzzle = new Sprite();
puzzle.x = 200;
puzzle.y = 200;
puzzle.addEventListener(MouseEvent.MOUSE_DOWN, puzzleClick, false, 0, true);
_local5 = new Sprite();
_local5.graphics.beginFill(0);
_local5.graphics.drawCircle(puzzle.x, puzzle.y, 200);
_local5.graphics.endFill();
addChild(background);
display.addChild(_local5);
display.addChild(puzzle);
addChild(display);
timeDisplay.mouseEnabled = false;
time = 0;
timer = new Timer(1000);
timer.addEventListener(TimerEvent.TIMER, timerTick, false, 0, true);
displayTime();
menuButton.addEventListener(MouseEvent.MOUSE_DOWN, buttonPress, false, 0, true);
menuButton.addEventListener(MouseEvent.CLICK, menuClick, false, 0, true);
nextButton.addEventListener(MouseEvent.MOUSE_DOWN, buttonPress, false, 0, true);
nextButton.addEventListener(MouseEvent.CLICK, nextClick, false, 0, true);
nextButton.mask = nextMask;
arcadeVoidButton.addEventListener(MouseEvent.CLICK, Document.arcadeVoidLink, false, 0, true);
rings = new Array();
_local9 = 3;
_local10 = 20;
_local7 = 0;
while (_local7 < _local3) {
_local6 = new Ring();
_local6.minDist = (_local7 * _local10);
_local6.maxDist = ((_local7 + 1) * _local10);
rings.push(_local6);
_local7++;
};
_local11 = 4278190080;
_local12 = 4278190335;
_local13 = 4294901760;
_local14 = new Sprite();
_local15 = _local14.graphics;
_local15.lineStyle(0, _local12);
for each (_local6 in rings) {
_local15.drawCircle(0, 0, _local6.maxDist);
_local7 = 0;
while (_local7 < _local9) {
_local8 = ((((_local7 + 0.5) / _local9) - 0.25) * CIRCLE);
_local15.moveTo((Math.cos(_local8) * _local6.minDist), (Math.sin(_local8) * _local6.minDist));
_local15.lineTo((Math.cos(_local8) * _local6.maxDist), (Math.sin(_local8) * _local6.maxDist));
_local7++;
};
_local9++;
};
_local16 = (400 / _local14.width);
_local14.scaleX = (_local14.scaleY = _local16);
_local17 = new Rectangle(0, 0, _local14.width, _local14.height);
_local18 = new BitmapData(_local17.width, _local17.height, true, _local11);
_local19 = new BitmapData(_local17.width, _local17.height, true, 0);
_local20 = new BitmapData(_local17.width, _local17.height, true, _local11);
_local18.draw(_local14, new Matrix(_local16, 0, 0, _local16, (_local14.width / 2), (_local14.height / 2)));
_local9 = 3;
for each (_local6 in rings) {
_local7 = 0;
while (_local7 < _local9) {
_local8 = (((_local7 / _local9) - 0.25) * CIRCLE);
_local21 = ((_local17.width / 2) + ((Math.cos(_local8) * (_local6.minDist + (_local10 / 2))) * _local16));
_local22 = ((_local17.height / 2) + ((Math.sin(_local8) * (_local6.minDist + (_local10 / 2))) * _local16));
_local18.floodFill(_local21, _local22, _local13);
_local19.copyChannel(_local18, _local17, zeroPoint, BitmapDataChannel.RED, BitmapDataChannel.RED);
_local19.copyChannel(_local18, _local17, zeroPoint, BitmapDataChannel.RED, BitmapDataChannel.ALPHA);
_local20.applyFilter(_local19, _local17, zeroPoint, DIVIDER_GLOW);
_local23 = _local18.getColorBoundsRect(_local13, _local13, true);
_local18.floodFill(_local21, _local22, _local11);
_local24 = new BitmapData(_local23.width, _local23.height);
_local24.copyPixels(image, _local23, zeroPoint, _local20, new Point(_local23.x, _local23.y));
_local25 = new Bitmap(_local24, "auto", true);
_local25.filters = [BEVEL];
_local26 = new Slice((_local8 * TO_DEGREES));
_local26.bmp = _local25;
_local25.x = (_local23.x - puzzle.x);
_local25.y = (_local23.y - puzzle.y);
_local26.addChild(_local25);
puzzle.addChild(_local26);
_local6.slices.push(_local26);
_local26.ring = _local6;
_local7++;
};
_local9++;
};
shuffle();
_local18.dispose();
_local20.dispose();
intro = new Bitmap(image);
addChild(intro);
intro.addEventListener(Event.ENTER_FRAME, fadeIntro, false, 0, true);
Sounds.begin();
}
function win(){
Sounds.victory();
levelInfo.completed = true;
Game.updateLevelsComplete();
timer.removeEventListener(TimerEvent.TIMER, timerTick, false);
puzzle.removeEventListener(MouseEvent.MOUSE_DOWN, puzzleClick, false);
display.blendMode = "layer";
display.graphics.beginFill(0xFFFFFF, 0.3);
display.graphics.drawRect(0, 0, 400, 400);
display.graphics.endFill();
display.addEventListener(Event.ENTER_FRAME, fadeOut, false, 0, true);
}
function dropSlice(_arg1:MouseEvent=null){
if (!currentSlice){
return;
};
currentSlice.bmp.filters = [BEVEL];
currentSlice = null;
stage.removeEventListener(MouseEvent.MOUSE_MOVE, updateSlice);
stage.removeEventListener(MouseEvent.MOUSE_UP, dropSlice);
}
function buttonPress(_arg1:MouseEvent){
Sounds.click();
}
function dispose(){
var _local1:Ring;
var _local2:Slice;
for each (_local1 in rings) {
for each (_local2 in _local1.slices) {
_local2.bmp.bitmapData.dispose();
};
};
}
function fadeIntro(_arg1:Event){
intro.alpha = Math.max(0, (intro.alpha - 0.02));
if (intro.alpha == 0){
intro.removeEventListener(Event.ENTER_FRAME, fadeIntro, false);
removeChild(intro);
timer.start();
setChildIndex(display, 0);
setChildIndex(background, 0);
};
}
function fadeOut(_arg1:Event){
display.alpha = Math.max(0, (display.alpha - 0.04));
if (display.alpha == 0){
display.removeEventListener(Event.ENTER_FRAME, fadeOut, false);
play();
};
}
function menuClick(_arg1:MouseEvent){
dispatchEvent(new JigEvent(JigEvent.LEVEL_EXITED));
Sounds.release();
}
function updateSlice(_arg1:MouseEvent=null){
var _local2:Slice;
var _local3:Number;
var _local4:Ring;
var _local5:Number;
var _local6:Slice;
var _local7:Number;
var _local8:Number;
_local3 = (Math.atan2(puzzle.mouseY, puzzle.mouseX) * TO_DEGREES);
_local4 = currentSlice.ring;
_local5 = ((360 / _local4.slices.length) / 2);
for each (_local6 in _local4.slices) {
_local7 = ((_local6.rotation + _local6.startRot) - _local5);
_local8 = ((_local6.rotation + _local6.startRot) + _local5);
while (_local3 > _local8) {
_local3 = (_local3 - 360);
};
while (_local3 < _local7) {
_local3 = (_local3 + 360);
};
if (_local3 < _local8){
_local2 = _local6;
break;
};
};
if (((_local2) && (!((_local2 == currentSlice))))){
swapSlices(currentSlice, _local2);
Sounds.swap();
checkWin();
};
}
function nextClick(_arg1:MouseEvent){
dispatchEvent(new JigEvent(JigEvent.NEXT_LEVEL));
Sounds.release();
}
function pickupSlice(_arg1:Slice){
if (!_arg1){
return;
};
currentSlice = _arg1;
_arg1.bmp.filters = [YELLOW_GLOW];
puzzle.setChildIndex(_arg1, (puzzle.numChildren - 1));
stage.addEventListener(MouseEvent.MOUSE_MOVE, updateSlice);
stage.addEventListener(MouseEvent.MOUSE_UP, dropSlice);
}
function timerTick(_arg1:TimerEvent){
time++;
displayTime();
}
function swapSlices(_arg1:Slice, _arg2:Slice){
var _local3:Number;
_local3 = _arg1.rotation;
_arg1.rotation = ((_arg2.rotation + _arg2.startRot) - _arg1.startRot);
_arg2.rotation = ((_local3 + _arg1.startRot) - _arg2.startRot);
if (Math.abs(_arg1.rotation) < 0.01){
_arg1.rotation = 0;
};
if (Math.abs(_arg2.rotation) < 0.01){
_arg2.rotation = 0;
};
}
function displayTime(){
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:String;
_local1 = time;
_local2 = int((_local1 / 3600));
_local1 = (_local1 - (_local2 * 3600));
_local3 = int((_local1 / 60));
_local1 = (_local1 - (_local3 * 60));
_local4 = "";
if (_local2){
_local4 = (_local4 + (_local2 + ":"));
if (_local3 < 10){
_local4 = (_local4 + "0");
};
};
_local4 = (_local4 + (_local3 + ":"));
if (_local1 < 10){
_local4 = (_local4 + "0");
};
_local4 = (_local4 + _local1);
timeDisplay.text = _local4;
}
function checkWin(){
var _local1:Ring;
var _local2:Slice;
for each (_local1 in rings) {
for each (_local2 in _local1.slices) {
if (_local2.rotation != 0){
return;
};
};
};
dropSlice();
win();
}
function frame9(){
stop();
}
function puzzleClick(_arg1:MouseEvent){
var _local2:Array;
var _local3:Bitmap;
_local2 = puzzle.getObjectsUnderPoint(new Point(mouseX, mouseY));
for each (_local3 in _local2) {
if ((_local3.bitmapData.getPixel32(_local3.mouseX, _local3.mouseY) & 4278190080)){
pickupSlice((_local3.parent as Slice));
break;
};
};
}
function shuffle(){
var _local1:Slice;
var _local2:Ring;
var _local3:Array;
var _local4:Array;
var _local5:int;
var _local6:int;
for each (_local2 in rings) {
_local3 = _local2.slices;
_local4 = _local3.concat();
while (_local4.length > 1) {
_local5 = int((Math.random() * _local4.length));
_local6 = 0;
while (_local6 < _local4.length) {
if (_local6 == _local5){
} else {
swapSlices(_local4[_local6], _local4[_local5]);
if ((((_local4[_local6].rotation == 0)) || ((_local4[_local5].rotation == 0)))){
swapSlices(_local4[_local6], _local4[_local5]);
} else {
_local4.splice(_local5, 1);
break;
};
};
_local6++;
};
};
};
}
}
}//package
Section 30
//LevelButton (LevelButton)
package {
import flash.display.*;
import flash.filters.*;
public class LevelButton extends Sprite {
public var level:int;
public var tick:Sprite;
public static const SIZE:Number = 60;
private static var f1:BevelFilter = new BevelFilter(2, 225, 0xCCCCCC, 1, 0, 0, 1, 1, 0.5, BitmapFilterQuality.HIGH);
private static var f2:BevelFilter = new BevelFilter(2, 45, 0xCCCCCC, 1, 0, 0, 1, 1, 1, BitmapFilterQuality.HIGH);
public function LevelButton(_arg1:int=0, _arg2:Boolean=false){
var _local3:Bitmap;
super();
buttonMode = true;
level = _arg1;
_local3 = new Bitmap(Level.levelList[level].image, "auto", true);
_local3.width = (_local3.height = SIZE);
_local3.x = (_local3.y = (-(SIZE) / 2));
_local3.filters = [f1, f2];
addChildAt(_local3, 0);
if (!_arg2){
removeChild(tick);
};
}
}
}//package
Section 31
//LevelInfo (LevelInfo)
package {
import flash.display.*;
public class LevelInfo {
public var completed:Boolean;
public var rings:int;
public var image:BitmapData;
public function LevelInfo(_arg1:BitmapData=null, _arg2:int=3, _arg3:Boolean=false){
this.image = _arg1;
this.rings = _arg2;
this.completed = _arg3;
}
}
}//package
Section 32
//LevelSelect (LevelSelect)
package {
import flash.display.*;
import flash.events.*;
public class LevelSelect extends Sprite {
public var arcadeVoidButton:SimpleButton;
public var sourceButton:SimpleButton;
public var addGameButton:SimpleButton;
public var buttons:Array;
public var biclopsButton:SimpleButton;
public function LevelSelect(){
var _local1:int;
var _local2:*;
var _local3:LevelButton;
super();
buttons = new Array();
_local1 = 6;
_local2 = 0;
while (_local2 < Level.levelList.length) {
_local3 = new LevelButton(_local2, Level.levelList[_local2].completed);
_local3.x = ((((_local2 % _local1) + 0.5) * 65) + 5);
_local3.y = (((int((_local2 / _local1)) + 0.5) * 65) + 80);
addChild(_local3);
_local3.addEventListener(MouseEvent.CLICK, levelClick, false, 0, true);
_local3.addEventListener(MouseEvent.ROLL_OVER, rollOver, false, 0, true);
_local3.addEventListener(MouseEvent.ROLL_OUT, rollOut, false, 0, true);
_local3.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown, false, 0, true);
buttons.push(_local3);
_local2++;
};
sourceButton.addEventListener(MouseEvent.CLICK, Document.sourceLink, false, 0, true);
addGameButton.addEventListener(MouseEvent.CLICK, Document.addGameLink, false, 0, true);
biclopsButton.addEventListener(MouseEvent.CLICK, Document.biclopsLink, false, 0, true);
arcadeVoidButton.addEventListener(MouseEvent.CLICK, Document.arcadeVoidLink, false, 0, true);
}
function levelClick(_arg1:MouseEvent){
var _local2:LevelButton;
_local2 = (_arg1.currentTarget as LevelButton);
dispatchEvent(new JigEvent(JigEvent.LEVEL_SELECTED, false, false, _local2.level));
disable();
Sounds.release();
}
function rollOut(_arg1:MouseEvent){
var _local2:LevelButton;
_local2 = (_arg1.currentTarget as LevelButton);
_local2.scaleX = (_local2.scaleY = 1);
}
function disable(){
var _local1:LevelButton;
while (buttons.length) {
_local1 = (buttons.pop() as LevelButton);
_local1.removeEventListener(MouseEvent.CLICK, levelClick, false);
_local1.removeEventListener(MouseEvent.ROLL_OVER, rollOver, false);
_local1.removeEventListener(MouseEvent.ROLL_OUT, rollOut, false);
_local1.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDown, false);
};
sourceButton.removeEventListener(MouseEvent.CLICK, Document.sourceLink, false);
addGameButton.removeEventListener(MouseEvent.CLICK, Document.addGameLink, false);
biclopsButton.addEventListener(MouseEvent.CLICK, Document.biclopsLink, false);
}
function mouseDown(_arg1:MouseEvent){
var _local2:LevelButton;
_local2 = (_arg1.currentTarget as LevelButton);
_local2.scaleX = (_local2.scaleY = 1.05);
Sounds.click();
}
function rollOver(_arg1:MouseEvent){
var _local2:LevelButton;
_local2 = (_arg1.currentTarget as LevelButton);
_local2.scaleX = (_local2.scaleY = 1.1);
}
}
}//package
Section 33
//Monument (Monument)
package {
import flash.display.*;
public dynamic class Monument extends BitmapData {
public function Monument(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 34
//OldBuilding (OldBuilding)
package {
import flash.display.*;
public dynamic class OldBuilding extends BitmapData {
public function OldBuilding(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 35
//Orange (Orange)
package {
import flash.display.*;
public dynamic class Orange extends BitmapData {
public function Orange(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 36
//Particle (Particle)
package {
import flash.display.*;
public class Particle extends MovieClip {
public var dy:Number;
public var dx:Number;
}
}//package
Section 37
//Penguins (Penguins)
package {
import flash.display.*;
public dynamic class Penguins extends BitmapData {
public function Penguins(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 38
//ReleaseSound (ReleaseSound)
package {
import flash.media.*;
public dynamic class ReleaseSound extends Sound {
}
}//package
Section 39
//Ring (Ring)
package {
public class Ring {
var slices:Array;
var maxDist:Number;
var minDist:Number;
public function Ring(){
slices = new Array();
}
}
}//package
Section 40
//Rope (Rope)
package {
import flash.display.*;
public dynamic class Rope extends BitmapData {
public function Rope(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 41
//Rose (Rose)
package {
import flash.display.*;
public dynamic class Rose extends BitmapData {
public function Rose(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 42
//Slice (Slice)
package {
import flash.display.*;
public class Slice extends Sprite {
public var startRot:Number;
public var ring:Ring;
public var bmp:Bitmap;
public function Slice(_arg1:Number){
startRot = _arg1;
}
}
}//package
Section 43
//Sounds (Sounds)
package {
import flash.media.*;
public class Sounds {
private static var fireworks2Sound:Sound = new Fireworks2();
private static var releaseSound:Sound = new ReleaseSound();
public static var mute:Boolean = false;
public static var volume:Number = 1;
private static var victorySound:Sound = new VictorySound();
private static var beginSound:Sound = new BeginSound();
private static var clickSound:Sound = new ClickSound();
private static var fireworks3Sound:Sound = new Fireworks3();
private static var fireworks1Sound:Sound = new Fireworks1();
private static var swapSound:Sound = new SwapSound();
public static function release(_arg1:Number=0){
releaseSound.play(0, 0, new SoundTransform(volume, _arg1));
}
public static function click(_arg1:Number=0){
clickSound.play(0, 0, new SoundTransform(volume, _arg1));
}
public static function swap(_arg1:Number=0){
swapSound.play(0, 0, new SoundTransform(volume, _arg1));
}
public static function toggle(){
mute = !(mute);
if (mute){
volume = 0;
SoundMixer.stopAll();
} else {
volume = 1;
};
}
public static function victory(_arg1:Number=0){
victorySound.play(0, 0, new SoundTransform(volume, _arg1));
}
public static function fireworks1(_arg1:Number=0){
fireworks1Sound.play(0, 0, new SoundTransform(volume, _arg1));
}
public static function begin(_arg1:Number=0){
beginSound.play(0, 0, new SoundTransform(volume, _arg1));
}
public static function fireworks2(_arg1:Number=0){
fireworks2Sound.play(0, 0, new SoundTransform(volume, _arg1));
}
public static function fireworks3(_arg1:Number=0){
fireworks3Sound.play(0, 0, new SoundTransform(volume, _arg1));
}
}
}//package
Section 44
//Spaniel (Spaniel)
package {
import flash.display.*;
public dynamic class Spaniel extends BitmapData {
public function Spaniel(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 45
//Strawberries (Strawberries)
package {
import flash.display.*;
public dynamic class Strawberries extends BitmapData {
public function Strawberries(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 46
//Sunrise (Sunrise)
package {
import flash.display.*;
public dynamic class Sunrise extends BitmapData {
public function Sunrise(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 47
//Sunset (Sunset)
package {
import flash.display.*;
public dynamic class Sunset extends BitmapData {
public function Sunset(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 48
//SwapSound (SwapSound)
package {
import flash.media.*;
public dynamic class SwapSound extends Sound {
}
}//package
Section 49
//VictorySound (VictorySound)
package {
import flash.media.*;
public dynamic class VictorySound extends Sound {
}
}//package