Frame 1
stop();
Instance of Symbol 12 MovieClip in Frame 1
onClipEvent (enterFrame) {
p = _root.getBytesLoaded() / _root.getBytesTotal();
loaded.text = Math.round(p * 100) + "%";
if (p == 1) {
_root.play();
}
}
Frame 98
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("96e3d317", this, 10301, true);
function UpdateRank() {
var _local1 = false;
while ((Rank < (ranks.length - 1)) && (score >= requirements[Rank + 1])) {
Rank++;
_local1 = true;
}
return(_local1);
}
stop();
Arm.Init();
var DEVMODE = false;
if (!DEVMODE) {
_quality = "LOW";
}
var UILayer = null;
var TileLayer = null;
var SuperLayer = new Layer(100000, 110000);
var ranks = new Array("(No Rank Yet)", "Old Fiend", "Hedonist", "Barmaid", "Apprentice", "Brewer", "Artisan", "Beer Wizard", "Brewmaster", "Brewmaster Supreme");
var requirements = new Array(0, 1, 150, 400, 1000, 2000, 4000, 8000, 16000, 32000);
attachMovie("CurtainClip", "curtain", SuperLayer.GetLayer());
curtain.SetIn();
curtain.FadeOut(true);
var Rank = 0;
var TopScore = 0;
var TopLevel = 0;
var sound = true;
var tips = true;
var StartLevel = 1;
hso = SharedObject.getLocal("morebeers");
if (hso.data.valid) {
TopScore = hso.data.TopScore;
TopLevel = hso.data.TopLevel;
Rank = hso.data.Rank;
sound = hso.data.sound;
tips = hso.data.tips;
} else {
TopScore = (hso.data.TopScore = 0);
TopLevel = (hso.data.TopLevel = 0);
Rank = (hso.data.Rank = 0);
sound = (hso.data.sound = true);
tips = (hso.data.tips = true);
hso.data.valid = true;
hso.flush();
}
var score = 0;
_root.attachMovie("Layout", "surface", 1);
var game = new Game(10, 10, 5, 80, 497, 93, 523, 300, 3, surface);
var Playing = false;
var helpText = "Use pipes to connect the top of the kegs to the bar. The more you use, the more points you get each second. Once the keg is empty, the pipes will collapse.\n\n<font color='#990000'><b>Watch the timer</b></font> - unless you keep the beers coming, the game will end!";
var tipTexts = ["Connect the kegs to the bar to keep everyone happy:\n\n\n\n\nEach keg only lasts a few seconds, then the pipe collapses!", "\n\nMore points for more pipes! Get a point per second for each pipe you use, plus two bonus points if you use a cross pipe twice.", "The wrench rotates pipes 90 degrees clockwise. It can be used three times, but clicking an empty space, keg, or block spends a use without doing anything. Keep one handy, and you won't have to dig for the right pipe for so long.", "\n\nUse time bonuses! You get <font color='#990000'><b>+7sec</b></font> when you hook a keg up to the tap, and <font color='#990000'><b>+1sec</b></font> for each second it is connected.", "\n\nThe hammer knocks out unwanted pipes. It can be used three times, but clicking an empty space, keg, or block spends a use without doing anything.", "\n\n\nDirect the beer through a golden pipe to get double points!", "\n\n\nIf you have two connected pipelines at the same time, both get double points! And if you have three...", "\n\nBe careful what you hammer - if you hit a pipe that is currently pumping beer to the tap, the entire line will break!", "\n\nReuse your tools! Even after you have used a hammer or wrench, you can still put it back in your toolbox.", "\nUse what you've got! It's a good idea to build multiple possible paths to the bar so that you can use whatever the toolbox throws at you."];
var tipTitle = "Tip!";
var PlusOne = new Sound();
PlusOne.attachSound("PlusOne");
var Explosion = new Sound();
Explosion.attachSound("Explosion");
Explosion.setVolume(70);
var Place = new Sound();
Place.attachSound("Place");
Place.setVolume(50);
var Miss = new Sound();
Miss.attachSound("Miss");
Miss.setVolume(80);
var Pound = new Sound();
Pound.attachSound("Pound");
Pound.setVolume(70);
var Ratchet = new Sound();
Ratchet.attachSound("Ratchet");
Ratchet.setVolume(70);
var Click = new Sound();
Click.attachSound("Click");
var Edan = new Sound();
Edan.attachSound("Edan");
var Applause = new Sound();
Applause.attachSound("Applause");
Instance of Symbol 240 MovieClip in Frame 98
onClipEvent (enterFrame) {
if (_root.game.Paused) {
return(undefined);
}
_root.game.Update();
}
onClipEvent (keyDown) {
if (_root.DEVMODE) {
var code = Key.getCode();
if (code == "C".charCodeAt(0)) {
_root.hso.data.valid = false;
_root.hso.flush();
trace("data cleared.");
} else if (code == "T".charCodeAt(0)) {
_root.game.TimeBonus(5);
trace("+5sec.");
}
}
}
Instance of Symbol 69 MovieClip [MainMenu] "MainMenu" in Frame 98
onClipEvent (load) {
function UpdateScore() {
TopScore = _root.TopScore;
TopScoreText = ("<b>Best: " + TopScore) + "</b>";
Rank = ("<b>" + _root.ranks[_root.Rank]) + "</b>";
}
function updateStartText() {
StartLevelText = ("<b>Start: " + _root.StartLevel) + "</b>";
}
function Lock() {
Locked = true;
Blocker._visible = true;
}
function Unlock() {
Locked = false;
Blocker._visible = false;
}
UpdateScore();
updateStartText();
}
Instance of Symbol 117 MovieClip [OptionsMenu] "OptionsMenu" in Frame 98
onClipEvent (load) {
function UpdateStatus() {
TipsStatus = (_root.tips ? "<b>Tips: On</b>" : "<b>Tips: Off</b>");
SoundStatus = (_root.sound ? "<b>Sound: On</b>" : "<b>Sound: Off</b>");
_root.hso.data.sound = _root.sound;
_root.hso.data.tips = _root.tips;
_root.hso.flush();
}
_alpha = ((alphaTarget = 0));
_visible = false;
Locked = true;
UpdateStatus();
}
Instance of Symbol 108 MovieClip [PauseMenu] "PauseMenu" in Frame 98
onClipEvent (load) {
Locked = true;
_visible = false;
_alpha = 0;
}
Instance of Symbol 247 MovieClip "Help" in Frame 98
onClipEvent (load) {
function Show(title, text) {
Locked = false;
Up = true;
yTarget = 120;
this.title = title;
this.text = text;
}
function FadeOut() {
Up = false;
yTarget = 600;
}
Up = false;
_y = ((yTarget = 600));
}
onClipEvent (enterFrame) {
_y = (_y + ((yTarget - _y) / 4));
}
Instance of Symbol 250 MovieClip "Clear" in Frame 98
onClipEvent (load) {
function Show() {
_y = 285;
_visible = true;
alphaTarget = 100;
timeLeft = Game.Framerate;
blinkOn = {ra:100, rb:155, ga:100, gb:155, ba:100, bb:155, aa:100, ab:0};
}
_visible = false;
_alpha = 0;
alphaTarget = 0;
color = new Color(this);
blink = false;
blinkDecay = 1;
blinkOff = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
blinkOn = null;
}
onClipEvent (enterFrame) {
if (_visible) {
if ((timeLeft--) < 0) {
alphaTarget = 0;
if (_alpha < 1) {
_visible = false;
}
}
_y = (_y-1);
a = _alpha;
blinkOn.gb = (blinkOn.bb = (blinkOn.rb = Math.max(0, blinkOn.rb - blinkDecay)));
if ((blink = !blink)) {
color.setTransform(blinkOn);
} else {
color.setTransform(blinkOff);
}
_alpha = a;
if (_alpha < alphaTarget) {
_alpha = Math.min(_alpha + 5, alphaTarget);
} else {
_alpha = Math.max(alphaTarget, _alpha - 5);
}
}
}
Instance of Symbol 253 MovieClip "Complete" in Frame 98
onClipEvent (load) {
function Show() {
_y = 285;
_visible = true;
alphaTarget = 100;
timeLeft = Game.Framerate * 3;
blinkOn = {ra:100, rb:155, ga:100, gb:155, ba:100, bb:155, aa:100, ab:0};
}
_visible = false;
_alpha = 0;
alphaTarget = 0;
color = new Color(this);
blink = false;
blinkDecay = 1;
blinkOff = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
blinkOn = null;
}
onClipEvent (enterFrame) {
if (_visible) {
if ((timeLeft--) < 0) {
alphaTarget = 0;
if (_alpha < 1) {
_visible = false;
}
}
_y = (_y - 0.3);
a = _alpha;
blinkOn.gb = (blinkOn.bb = (blinkOn.rb = Math.max(0, blinkOn.rb - blinkDecay)));
if ((blink = !blink)) {
color.setTransform(blinkOn);
} else {
color.setTransform(blinkOff);
}
_alpha = a;
if (_alpha < alphaTarget) {
_alpha = Math.min(_alpha + 5, alphaTarget);
} else {
_alpha = Math.max(alphaTarget, _alpha - 5);
}
}
}
Instance of Symbol 258 MovieClip "OkNo" in Frame 98
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
_x = (_root.Help._x - 85);
_y = (_root.Help._y + 155);
if ((_y > Stage.height) && (!_root.Help.Up)) {
_visible = false;
}
}
Instance of Symbol 265 MovieClip "RankDisplay" in Frame 98
onClipEvent (load) {
function Show() {
_alpha = 100;
_visible = true;
newRank = _root.ranks[_root.Rank];
Blinky.Flash();
_root.Edan.start(0, 1);
}
function FadeOut() {
fadeOut = true;
}
_visible = false;
}
onClipEvent (enterFrame) {
if (fadeOut) {
_alpha = (_alpha - 10);
if (_alpha <= 0) {
fadeOut = false;
_visible = false;
}
}
}
Symbol 5 Button
on (release) {
if (_parent.Locked != true) {
getURL ("http://www.dragongamez.com/", "_blank");
}
}
Symbol 270 MovieClip [__Packages.Levels] Frame 0
class Levels
{
function Levels () {
}
static var LevelTimes = [75, 90, 90, 90, 90, 105, 105, 105, 120, 120, 120, 120, 135, 135, 135, 135, 135, 135, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150];
static var LevelSet = [[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 9, 9, 0, 0, 0, 0], [0, 0, 0, 0, 8, 8, 0, 0, 0, 0],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, 0, 0, 0, 0, 0, 0, 7], [6, 0, 0, 14, 0, 0, 7, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 9, 9, 9, 9, 9, 9, 9, 9, 0]]];
}
Symbol 271 MovieClip [__Packages.BasicMenu] Frame 0
class BasicMenu extends MovieClip
{
var _alpha, _visible;
function BasicMenu () {
super();
}
function onLoad() {
alphaTarget = _alpha;
}
function onEnterFrame() {
if (_alpha < alphaTarget) {
_alpha = Math.min(alphaTarget, _alpha + fadeSpeed);
} else {
_alpha = Math.max(alphaTarget, _alpha - fadeSpeed);
if (_alpha == 0) {
_visible = false;
}
}
}
function FadeIn() {
_visible = true;
alphaTarget = 100;
}
function FadeOut() {
alphaTarget = 0;
}
static var fadeSpeed = 12;
var alphaTarget = 0;
}
Symbol 272 MovieClip [__Packages.Arm] Frame 0
class Arm extends MovieClip
{
var _rotation, _parent, talkX, Layer, attachMovie;
function Arm () {
super();
}
static function Init() {
receivePhrases = new Array("Cheers :)", "Thanks!", "Keep 'em coming...");
waitPhrases = new Array("Where's that pint?", "More beer!", "What's the hold up?", "Come on, man", "Tap another!");
requestPhrases = new Array("One more, yeah?", "Send one my way", "Can I get a beer?");
}
function Drink() {
if (mug == null) {
return(undefined);
}
if (!wait) {
rTarget = rTarget + (50 * RDir);
raise = true;
Drinking = true;
}
}
function onEnterFrame() {
if (_root.game.Paused) {
return(undefined);
}
_rotation = _rotation + ((rTarget - _rotation) / 8);
talkTimer--;
if (waiting) {
waitTimer++;
if (((waitTimer % 600) == 0) && (talkTimer < 0)) {
_parent.Bubble.Speak(talkX, waitPhrases[Math.floor(Math.random() * waitPhrases.length)]);
talkTimer = talkDelay;
}
}
if ((mug == null) && (!wait)) {
wait = true;
_parent.Serve(this);
return(undefined);
}
if (Math.abs(rTarget - _rotation) < 4) {
if (armUp) {
upTime--;
if (upTime < 0) {
raise = false;
armUp = false;
rTarget = rest;
}
} else if (raise) {
armUp = true;
upTime = (2 + Math.random()) * Game.Framerate;
if (!mug.Drink(20 + (Math.random() * 10))) {
wait = true;
doServe = true;
}
} else {
Drinking = false;
if (doServe) {
doServe = false;
_parent.Serve(this);
waiting = true;
waitTimer = 0;
if ((talkTimer < 0) && (Math.random() < 0.4)) {
_parent.Bubble.Speak(talkX, requestPhrases[Math.floor(Math.random() * requestPhrases.length)]);
talkTimer = talkDelay;
}
}
}
}
}
function Grab() {
if (mug != null) {
mug.removeMovieClip();
}
waiting = false;
var _local3 = Layer.GetLayer();
var _local2 = "Mug" + _local3;
attachMovie("Mug", _local2, _local3);
mug = this[_local2];
mug._x = mugX;
mug._y = mugY;
mug._xscale = 100 * RDir;
mug._alpha = 100;
mug.SetFull();
ArmGraphic.swapDepths(mug.getDepth());
if (talkTimer < 0) {
_parent.Bubble.Speak(talkX, receivePhrases[Math.floor(Math.random() * receivePhrases.length)]);
talkTimer = talkDelay;
}
wait = false;
}
var rest = 0;
var rTarget = 0;
var upTime = 0;
var armUp = false;
var raise = false;
var mug = null;
var wait = false;
var mugX = 0;
var mugY = 0;
var doServe = false;
var RDir = 1;
var Drinking = false;
var ArmGraphic = null;
var CatchX = 0;
var CatchY = 0;
var talkTimer = 0;
var waitTimer = 0;
var waiting = false;
static var talkDelay = 400;
static var receivePhrases = null;
static var waitPhrases = null;
static var requestPhrases = null;
}
Symbol 273 MovieClip [__Packages.Mug] Frame 0
class Mug extends MovieClip
{
var _alpha;
function Mug () {
super();
_alpha = 0;
Volume = 0;
}
function Drink(amount) {
var _local2 = Math.min(Volume, (Full * amount) / 100);
Volume = Volume - _local2;
Mask.Drink(_local2);
return(Volume > 0);
}
function Fill(amount) {
var _local2 = Math.min(Full - Volume, (Full * amount) / 100);
Volume = Volume + _local2;
Mask.Drink(-_local2);
return(Volume == Full);
}
function SetFull() {
DoFill = true;
}
function onEnterFrame() {
if (!_root.Game.Paused) {
_alpha = Math.min(_alpha + 10, 100);
if (DoFill) {
DoFill = false;
Volume = Full;
Mask.Set(0);
}
}
}
static var Full = 22;
var Volume = 0;
var Mask = null;
var DoEmpty = false;
var DoFill = false;
}
Symbol 274 MovieClip [__Packages.BeerMask] Frame 0
class BeerMask extends MovieClip
{
var _y, _parent, _rotation, Head;
function BeerMask () {
super();
yTarget = (_y = Mug.Full);
_parent.Beer._visible = false;
_parent.MyHead._visible = false;
}
function Drink(amount) {
yTarget = yTarget + amount;
}
function Set(amount) {
_y = (yTarget = amount);
}
function onEnterFrame() {
_parent.Beer._visible = true;
_parent.MyHead._visible = true;
if (!offsetSet) {
offsetSet = true;
rotationOffset = _parent._parent._rotation;
rotationDir = _parent._parent.RDir;
}
_rotation = -((_parent._parent._rotation * rotationDir) - rotationOffset);
if (yTarget > _y) {
_y = Math.min(yTarget, _y + 0.25);
} else {
_y = Math.max(yTarget, _y - 0.25);
}
Head._y = _y;
Head._rotation = _rotation;
}
var yTarget = 0;
var offsetSet = false;
var rotationOffset = 0;
var rotationDir = 1;
}
Symbol 275 MovieClip [__Packages.Head] Frame 0
class Head extends MovieClip
{
function Head () {
super();
}
function Drink(amount) {
drinkTarget = drinkTarget + amount;
}
function onEnterFrame() {
}
static var drinkSpeed = 0.5;
var drank = 0;
var drinkTarget = 0;
}
Symbol 276 MovieClip [__Packages.Layer] Frame 0
class Layer
{
static var Temp;
var Base, layer, Max;
function Layer (base, range) {
if (TempSet == false) {
TempSet = true;
Temp = new Layer(1, 10);
}
Base = (layer = base);
Max = (Base + range) - 1;
}
function GetLayer() {
if ((++layer) > Max) {
layer = Base;
}
return(layer);
}
static var TempSet = false;
}
Symbol 277 MovieClip [__Packages.Game] Frame 0
class Game
{
var surface, barLayer, bubbleLayer, tracker, board, tilebox;
function Game (rows, cols, boardLeft, boardTop, boxLeft, boxTop, scoreLeft, scoreTop, tileboxSize, surface) {
this.surface = surface;
this.scoreLeft = scoreLeft;
ScoreDisplay.UISurface = surface;
surface.BlurFast();
var _local6 = new Layer(1001, 2000);
var _local7 = new Layer(2001, 9999);
_root.TileLayer = _local7;
var _local9 = 10000;
var _local8 = new Layer(10001, 20000);
barLayer = new Layer(20001, 29000);
bubbleLayer = new Layer(29001, 30000);
var _local5 = new Layer(30001, 40000);
var _local3 = new Layer(40001, 50000);
tracker = surface.tracker;
tracker._visible = false;
tracker.swapDepths(1000);
_root.UILayer = _local5;
board = new Board(rows, cols, boardLeft, boardTop, scoreLeft, scoreTop, _local6, _local5, surface, this);
tilesets = new Array(new Tileset(new Array(TileType.Cross, TileType.Curve, TileType.Straight), new Array(0.2, 0.45, 0.35)), new Tileset(new Array(TileType.Cross, TileType.Curve, TileType.Straight, TileType.Wrench), new Array(0.15, 0.45, 0.35, 0.05)), new Tileset(new Array(TileType.Cross, TileType.Curve, TileType.Straight, TileType.Hammer, TileType.Wrench), new Array(0.15, 0.45, 0.32, 0.03, 0.05)));
tilebox = new Tilebox(tilesets[0], _local8, surface, tileboxSize, boxLeft, boxTop);
surface.attachMovie("Bar", "MyBar", barLayer.GetLayer());
_root.Bar = surface.MyBar;
_root.Bar.Self = _root.Bar;
_root.Bar.Init(bubbleLayer);
_root.Lattice.swapDepths(_local9);
_root.MainMenu.swapDepths(_local3.GetLayer());
_root.OptionsMenu.swapDepths(_local3.GetLayer());
_root.Help.swapDepths(_local3.GetLayer());
_root.Clear.swapDepths(_local3.GetLayer());
_root.Complete.swapDepths(_local3.GetLayer());
_root.OkNo.swapDepths(_local3.GetLayer());
_root.RankDisplay.swapDepths(_local3.GetLayer());
_root.PauseMenu.swapDepths(_local3.GetLayer());
_root.DemoNotice.swapDepths(_local3.GetLayer());
timerDisplay = new ScoreDisplay("0", _local5);
positionTimer();
timerDisplay.Dull();
timerDisplay.UnderBlink(4);
Mouse.addListener(this);
Key.addListener(this);
pCode = "P".charCodeAt(0);
}
function LevelCleared() {
clearWait = clearWaitTime;
isClear = true;
inRound = false;
fadeSelected();
tilebox.Fill();
if (level == (Levels.LevelSet.length - 1)) {
_root.Complete.Show();
clearWait = clearWait * 1.5;
} else {
_root.Clear.Show();
}
}
function fadeSelected() {
if (selectedTile != null) {
if (TileType.IsTool(selectedTile.Type)) {
leftoverTool = selectedTile;
selectedTile.Fall();
} else {
selectedTile.Fade();
}
selectedTile = null;
}
}
function Start() {
if (leftoverTool != null) {
leftoverTool.Fade();
}
level = _root.StartLevel - 2;
tilebox.ChangeSet(tilesets[0]);
var _local3 = setChanges.length - 1;
while (_local3 >= 0) {
if (level >= setChanges[_local3]) {
tilebox.ChangeSet(tilesets[_local3]);
currentSet = _local3;
break;
}
_local3--;
}
board.ResetScore();
surface.Focus();
tilebox.Flush();
NextLevel();
}
function NextLevel() {
if ((++level) >= Levels.LevelSet.length) {
endGame();
}
while ((currentSet < (tilesets.length - 1)) && (level >= setChanges[currentSet + 1])) {
tilebox.ChangeSet(tilesets[++currentSet]);
}
if (_root.tips && (level < _root.tipTexts.length)) {
tipWait = true;
_root.Help.Show(_root.tipTitle, _root.tipTexts[level]);
if (level == 0) {
_root.OkNo._visible = true;
}
} else {
doSetLevel = true;
}
}
function onMouseMove() {
if (TileType.IsTool(selectedTile.Type)) {
if (surface._xmouse > tilebox.Left) {
board.Unlight();
} else {
board.Highlight(surface._xmouse, surface._ymouse);
}
}
}
function onMouseDown() {
if (!inRound) {
return(undefined);
}
if (Paused) {
return(undefined);
}
if (surface._xmouse > tilebox.Left) {
if (selectedTile == null) {
selectedTile = tilebox.Grab(surface._xmouse, surface._ymouse);
} else {
tilebox.Replace(selectedTile);
selectedTile = null;
}
} else {
if (selectedTile == null) {
return(undefined);
}
if ((surface._xmouse > board.Left) && (surface._ymouse > board.Top)) {
if (board.Place(surface._xmouse, surface._ymouse, selectedTile)) {
tilebox.Fill();
selectedTile = null;
}
}
}
}
function endGame() {
inRound = false;
_root.Playing = false;
_root.TopScore = Math.max(_root.TopScore, _root.score);
if (_root.UpdateRank()) {
_root.RankDisplay.Locked = false;
_root.RankDisplay.Show();
} else {
_root.MainMenu.Unlock();
_root.MainMenu.FadeIn();
}
_root.hso.data.Rank = _root.Rank;
_root.TopLevel = Math.max(_root.TopLevel, level);
_root.hso.data.TopLevel = _root.TopLevel;
_root.hso.data.TopScore = _root.TopScore;
_root.hso.flush();
_root.MainMenu.UpdateScore();
fadeSelected();
surface.Blur();
Paused = false;
setVisibility(true);
board.ClearScores();
_root.score = 0;
_root.timer = 0;
board.ClearScore();
timerDisplay.SetString("0");
timerDisplay.Dull();
}
function TimeBonus(secs) {
timer = timer + (secs * Framerate);
bonusBlink = 15;
}
function Unpause() {
Paused = false;
surface.Focus();
setVisibility(true);
}
function setVisibility(v) {
board.SetVisibility(v);
if (selectedTile != null) {
selectedTile.Image._visible = v;
}
}
function Update() {
if (leftoverTool != null) {
leftoverTool.Update();
if (leftoverTool.Dead) {
leftoverTool = null;
}
}
tilebox.Update();
if (inRound && ((Key.isDown(pCode) || (Key.isDown(32))) || (Key.isDown(13)))) {
Paused = true;
setVisibility(false);
_root.PauseMenu.Locked = false;
_root.PauseMenu.FadeIn();
surface.Blur();
}
if (!barLayerSet) {
barLayerSet = true;
_root.Bar.SetLayer(barLayer);
}
if (selectedTile != null) {
selectedTile.Image._x = selectedTile.Image._x + ((surface._xmouse - selectedTile.Image._x) * 0.8);
selectedTile.Image._y = selectedTile.Image._y + ((surface._ymouse - selectedTile.Image._y) * 0.8);
if (TileType.IsTool(selectedTile.Type)) {
selectedTile.PositionUseDisplay();
}
}
if (isClear && ((clearWait--) <= 0)) {
isClear = false;
NextLevel();
}
if (doSetLevel || (tipWait && (!_root.Help.Up))) {
tipWait = false;
doSetLevel = false;
inRound = true;
board.Fill(0, 0, Levels.LevelSet[level]);
if (level == 0) {
_root.Bar.Connect.Show();
}
timer = Levels.LevelTimes[level] * Framerate;
_root.Playing = true;
}
if (inRound) {
timer = timer + (board.NumFlows() - 1);
bonusBlink--;
if (timer == 0) {
timerDisplay.SetString("0");
positionTimer();
endGame();
} else {
var _local3 = Math.ceil(timer / Framerate);
var _local4 = true;
if (visibleTimer < _local3) {
visibleTimer = Math.min(_local3, visibleTimer + 3);
} else if (visibleTimer > _local3) {
visibleTimer = Math.max(_local3, visibleTimer - 3);
} else {
_local4 = false;
}
if (_local4) {
timerDisplay.SetString("" + visibleTimer);
if ((_local3 > 5) && (bonusBlink < 0)) {
timerDisplay.Dull();
}
positionTimer();
}
}
}
board.Update();
if (Math.random() < 0.025) {
_root.Bar.Drink();
}
}
function positionTimer() {
timerDisplay.Center(scoreLeft, Stage.height - 26);
}
static var Framerate = 30;
static var KegSize = 10;
static var clearWaitTime = 2.5 * Framerate;
static var currentSet = 0;
var scoreLeft = 0;
var inRound = false;
var Paused = false;
var pCode = 0;
var bonusBlink = 0;
var leftoverTool = null;
var barLayerSet = false;
var selectedTile = null;
var timer = 0;
var visibleTimer = 0;
var timerDisplay = null;
var level = 0;
var doSetLevel = false;
var clearWait = 0;
var isClear = false;
var tipWait = false;
var tilesets = null;
var setChanges = [0, 2, 4];
}
Symbol 278 MovieClip [__Packages.Tile] Frame 0
class Tile
{
function Tile (upRedirect, downRedirect, leftRedirect, rightRedirect, tileType, layer, surface) {
Type = tileType;
redirect = new Array(4);
redirect[Direction.Up] = upRedirect;
redirect[Direction.Down] = downRedirect;
redirect[Direction.Left] = leftRedirect;
redirect[Direction.Right] = rightRedirect;
Flows = new Array(4);
var _local4 = "Tile" + (id++);
surface.attachMovie(imageNames[tileType], _local4, layer);
Image = surface[_local4];
variation = (nextVariation++) % variations[tileType];
setFrame();
color = new Color(Image);
trans = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
if (TileType.IsGold(tileType)) {
Multiplier = 2;
}
if (TileType.IsTool(tileType)) {
uses = NumUses;
useDisplay = new ScoreDisplay("" + uses, _root.UILayer);
useDisplay.SetScale(60);
useDisplay.Dull();
}
}
function Uses() {
return(uses);
}
function XSlide(amt) {
Image.XSlide(amt);
}
function UnSlide() {
Image.Sliding = false;
}
function KillCounter() {
useDisplay.Kill();
}
function PositionUseDisplay() {
var _local2 = Math.floor(Size * 0.33);
useDisplay.Center(Image._x + _local2, Image._y + _local2);
}
function Use() {
if ((--uses) == 0) {
Fall();
return(true);
}
Image.play();
useDisplay.SetString("" + uses);
return(false);
}
function Rotation() {
return(rotation);
}
function Fade() {
Image.Fade();
if (useDisplay != null) {
useDisplay.Fade();
}
}
function setFrame() {
if (TileType.IsTool(Type)) {
rotation = 0;
Image.gotoAndStop(1);
}
Image.gotoAndStop((1 + (variation * rotations[Type])) + rotation);
}
function Right() {
if ((++rotation) > 3) {
rotation = 0;
}
setFrame();
}
function Left() {
if ((--rotation) < 0) {
rotation = 3;
}
setFrame();
}
function SetRotation(rotation) {
this.rotation = rotation % 4;
setFrame();
}
function Redirect(inDirection) {
if (inDirection == Direction.None) {
return(Direction.None);
}
var _local2 = redirect[nMod(inDirection - rotation, 4)];
if (_local2 == Direction.None) {
return(Direction.None);
}
return(nMod(_local2 + rotation, 4));
}
function Zoom(x, y) {
zoomX = x;
zoomY = y;
zoom = true;
}
function Update() {
if (!_root.Playing) {
return(undefined);
}
if (zoom) {
Image._x = Image._x + ((zoomX - Image._x) / 4);
Image._y = Image._y + ((zoomY - Image._y) / 4);
if ((Math.abs(Image._x - zoomX) < 1) && (Math.abs(Image._y - zoomY) < 1)) {
Image._x = zoomX;
Image._y = zoomY;
zoom = false;
}
}
if (flash) {
trans.rb = (trans.gb = (trans.bb = Math.max(0, trans.rb - 4)));
color.setTransform(trans);
if (trans.rb <= FlashMin) {
flash = false;
}
}
if (fall) {
Image._x = Image._x + xVelocity;
Image._y = Image._y + yVelocity;
Image._rotation = Image._rotation + rVelocity;
if (Image._y > (Stage.height + Image._height)) {
removeMovieClip(Image);
Dead = true;
}
xVelocity = xVelocity * 0.99;
yVelocity = yVelocity + 0.5;
}
}
function Highlight() {
flash = false;
color.setTransform(hi);
}
function UnLight() {
color.setTransform(trans);
flash = trans.rb > 0;
}
function Flash() {
flash = true;
trans.rb = (trans.gb = (trans.bb = 100));
}
function Fall() {
FlashGenerator.MakeFlash(Image._x, Image._y, Image._parent, _root.UILayer);
Image.swapDepths(_root.TileLayer.GetLayer());
if (useDisplay != null) {
useDisplay.Fade();
}
fall = true;
xVelocity = (Math.random() * 12) - 6;
yVelocity = -6 - (Math.random() * 6);
rVelocity = (xVelocity + (Math.random() * 4)) - 2;
FlashMin = 0;
flash = true;
}
function nMod(x, mod) {
return(((x < 0) ? ((x + mod) % mod) : (x % mod)));
}
static function Create(layer, surface, type) {
switch (type) {
case TileType.Straight :
return(Straight(layer, surface));
case TileType.Curve :
return(Curve(layer, surface));
case TileType.Cross :
return(Cross(layer, surface));
case TileType.GoldStraight :
return(GoldStraight(layer, surface));
case TileType.GoldCurve :
return(GoldCurve(layer, surface));
case TileType.GoldCross :
return(GoldCross(layer, surface));
case TileType.Barrel :
return(Barrel(layer, surface));
case TileType.Block :
return(Block(layer, surface));
case TileType.Hammer :
return(Hammer(layer, surface));
case TileType.Wrench :
return(Wrench(layer, surface));
}
}
static function Wrench(layer, surface) {
return(new Tile(Direction.None, Direction.None, Direction.None, Direction.None, TileType.Wrench, layer, surface));
}
static function Hammer(layer, surface) {
return(new Tile(Direction.None, Direction.None, Direction.None, Direction.None, TileType.Hammer, layer, surface));
}
static function Straight(layer, surface) {
return(new Tile(Direction.None, Direction.None, Direction.Right, Direction.Left, TileType.Straight, layer, surface));
}
static function Cross(layer, surface) {
return(new Tile(Direction.Down, Direction.Up, Direction.Right, Direction.Left, TileType.Cross, layer, surface));
}
static function Curve(layer, surface) {
return(new Tile(Direction.Right, Direction.None, Direction.None, Direction.Up, TileType.Curve, layer, surface));
}
static function GoldStraight(layer, surface) {
return(new Tile(Direction.None, Direction.None, Direction.Right, Direction.Left, TileType.GoldStraight, layer, surface));
}
static function GoldCross(layer, surface) {
return(new Tile(Direction.Down, Direction.Up, Direction.Right, Direction.Left, TileType.GoldCross, layer, surface));
}
static function GoldCurve(layer, surface) {
return(new Tile(Direction.Right, Direction.None, Direction.None, Direction.Up, TileType.GoldCurve, layer, surface));
}
static function Barrel(layer, surface) {
return(new Tile(Direction.None, Direction.None, Direction.None, Direction.None, TileType.Barrel, layer, surface));
}
static function Block(layer, surface) {
return(new Tile(Direction.None, Direction.None, Direction.None, Direction.None, TileType.Block, layer, surface));
}
static var NumUses = 3;
static var Size = 48;
static var id = 0;
var fallTime = 0;
var FlashMin = 0;
static var nextVariation = 0;
static var imageNames = ["StraightPipe", "CurvePipe", "CrossPipe", "Block", "Hammer", "Wrench", "Barrel", "GoldStraightPipe", "GoldCurvePipe", "GoldCrossPipe"];
static var variations = [1, 1, 1, 2, 1, 1, 4, 1, 1, 1];
static var rotations = [4, 4, 1, 1, 1, 1, 1, 4, 4, 1];
var redirect = null;
var rotation = 0;
var flash = false;
var color = null;
var trans = null;
var hi = {ra:100, rb:65, ga:100, gb:65, ba:100, bb:65, aa:100, ab:0};
var fall = false;
var fade = false;
var xVelocity = 0;
var yVelocity = 0;
var rVelocity = 0;
var variation = 0;
var uses = 0;
var useDisplay = null;
var zoomX = 0;
var zoomY = 0;
var zoom = false;
var Image = null;
var Type = 0;
var Row = 0;
var Col = 0;
var Flows = null;
var NumFlows = 0;
var Multiplier = 1;
var Dead = false;
}
Symbol 279 MovieClip [__Packages.ScoreDisplay] Frame 0
class ScoreDisplay
{
static var UISurface;
var charList;
function ScoreDisplay (score, layer) {
this.layer = layer;
charList = new LinkedList();
var _local3 = layer.GetLayer();
var _local2 = "ScoreDisplay" + (id++);
UISurface.attachMovie("EmptyScoreSurface", _local2, _local3);
surface = UISurface[_local2];
SetString(score);
}
function Kill() {
surface.removeMovieClip();
}
function UnderBlink(amt) {
surface.UnderBlink(amt);
}
function Dull() {
surface.Dull();
}
function GetCenterY() {
return(surface._y + (surface._height / 2));
}
function SetScale(scale) {
surface._xscale = (surface._yscale = scale);
}
function SetString(score) {
var _local6 = charList.Iterator();
while (_local6.Next()) {
_local6.Current.removeMovieClip();
}
charList.Clear();
var _local7 = 0;
var _local3 = 0;
while (_local3 < score.length) {
var _local5 = "char" + _local3;
surface.attachMovie("ScoreCharacters", _local5, layer.GetLayer());
var _local2 = surface[_local5];
var _local4 = score.charCodeAt(_local3);
if (_local4 == 120) {
_local2.gotoAndStop(12);
} else if (_local4 == 43) {
_local2.gotoAndStop(11);
} else {
_local2.gotoAndStop(_local4 - 47);
}
_local2._x = _local7;
_local2._y = (charHeight - _local2._height) / 2;
_local7 = _local7 + _local2._width;
charList.Add(_local2);
_local3++;
}
surface.ResetBlink();
}
function Place(x, y) {
surface._x = x;
surface._y = y;
}
function Center(x, y) {
Place(x - (surface._width / 2), y - (surface._height / 2));
}
function Move(x, y) {
Place(surface._x + x, surface._y + y);
}
function Fade() {
surface.Fade();
}
static var id = 0;
static var charHeight = 20;
var time = 0;
var surface = null;
var layer = null;
}
Symbol 280 MovieClip [__Packages.LinkedList] Frame 0
class LinkedList
{
function LinkedList () {
}
function Add(data) {
var _local2 = new LinkedListNode(data);
if (last == null) {
first = (last = _local2);
} else {
last.Next = _local2;
_local2.Prev = last;
last = _local2;
}
size++;
}
function Contains(x) {
var _local2 = first;
while (_local2 != null) {
if (_local2.Data == x) {
return(true);
}
_local2 = _local2.Next;
}
return(false);
}
function Print() {
var _local3 = first;
var _local4 = "";
while (_local3 != null) {
var _local2 = Tile(_local3.Data);
_local4 = _local4 + (((((("(" + _local2.Row) + ",") + _local2.Col) + ") [") + _local2.Type) + "], ");
_local3 = _local3.Next;
}
return(_local4);
}
function Remove(data) {
var _local2 = first;
while (_local2 != null) {
if (_local2.Data == data) {
if (_local2.Prev != null) {
_local2.Prev.Next = _local2.Next;
}
if (_local2.Next != null) {
_local2.Next.Prev = _local2.Prev;
}
if (_local2 == first) {
first = _local2.Next;
}
if (_local2 == last) {
last = _local2.Prev;
}
size--;
return(true);
}
_local2 = _local2.Next;
}
return(false);
}
function Size() {
return(size);
}
function Iterator() {
return(new LinkedListIterator(this, first));
}
function Clear() {
first = (last = null);
size = 0;
}
var first = null;
var last = null;
var size = 0;
}
Symbol 281 MovieClip [__Packages.LinkedListNode] Frame 0
class LinkedListNode
{
function LinkedListNode (data) {
Data = data;
}
var Next = null;
var Prev = null;
var Data = null;
}
Symbol 282 MovieClip [__Packages.LinkedListIterator] Frame 0
class LinkedListIterator
{
function LinkedListIterator (list, first) {
this.list = list;
dummy(first);
}
function dummy(node) {
var _local2 = new LinkedListNode(null);
_local2.Next = node;
setNode(_local2);
}
function Next() {
if (current.Next == null) {
return(false);
}
setNode(current.Next);
return(true);
}
function Remove() {
var _local2 = current.Next;
list.Remove(Current);
dummy(_local2);
}
function setNode(node) {
current = node;
Current = node.Data;
}
var list = null;
var current = null;
var Current = null;
}
Symbol 283 MovieClip [__Packages.Direction] Frame 0
class Direction
{
function Direction () {
}
static function Opposite(direction) {
if (direction == None) {
return(None);
}
return((direction + 2) % 4);
}
static var None = -1;
static var Up = 0;
static var Right = 1;
static var Down = 2;
static var Left = 3;
}
Symbol 284 MovieClip [__Packages.TileType] Frame 0
class TileType
{
function TileType () {
}
static function GoldType(type) {
switch (type) {
case Straight :
return(GoldStraight);
case Curve :
return(GoldCurve);
case Cross :
return(GoldCross);
}
return(None);
}
static function IsTool(type) {
return((type == Wrench) || (type == Hammer));
}
static function IsFixture(type) {
return((type == Barrel) || (type == Block));
}
static function IsGold(type) {
return((type > 6) && (type < 10));
}
static var Clear = -2;
static var None = -1;
static var Straight = 0;
static var Curve = 1;
static var Cross = 2;
static var Block = 3;
static var Hammer = 4;
static var Wrench = 5;
static var Barrel = 6;
static var GoldStraight = 7;
static var GoldCurve = 8;
static var GoldCross = 9;
}
Symbol 285 MovieClip [__Packages.FlashGenerator] Frame 0
class FlashGenerator
{
function FlashGenerator () {
}
static function MakeFlash(x, y, surface, layer) {
var _local6 = 0;
var _local2 = 0;
while (_local2 < 8) {
var _local5 = Math.floor(Math.random() * 2);
var _local4 = layer.GetLayer();
var _local3 = "Flash" + _local4;
surface.attachMovie(types[_local2], _local3, _local4);
var _local1 = surface[_local3];
_local1._x = (x + (Math.random() * 60)) - 30;
_local1._y = (y + (Math.random() * 60)) - 30;
_local1._xscale = (_local1._yscale = 75 + (Math.random() * 50));
_local1._alpha = baseAlphas[_local5] + (Math.random() * 30);
_local1.wait = _local6;
_local6 = _local6 + (1 + Math.floor(Math.random() * 2));
_local2++;
}
}
static var types = ["Flash", "Smoke"];
static var baseAlphas = [30, 100];
}
Symbol 286 MovieClip [__Packages.Board] Frame 0
class Board
{
var Left, Top, tiles;
function Board (rows, cols, left, top, scoreLeft, scoreTop, layer, uiLayer, surface, game) {
this.rows = rows;
this.cols = cols;
this.layer = layer;
this.uiLayer = uiLayer;
Left = left;
Top = top;
this.scoreLeft = scoreLeft;
this.scoreTop = scoreTop;
this.surface = surface;
this.game = game;
grid = new Array(rows);
var _local2 = 0;
while (_local2 < rows) {
grid[_local2] = new Array(cols);
_local2++;
}
kegs = new LinkedList();
flows = new LinkedList();
tiles = new LinkedList();
scoreQueues = new LinkedList();
mainScore = new ScoreDisplay("0", uiLayer);
mainScore.SetScale(75);
mainScore.Dull();
mainScore.UnderBlink(4);
positionMainScore();
}
function ClearScore() {
_root.score = 0;
mainScore.SetString("0");
mainScore.Dull();
positionMainScore();
}
function ResetScore() {
_root.score = 0;
mainScore.SetString("0");
mainScore.Dull();
}
function positionMainScore() {
mainScore.Center(244, 563);
}
function Clear() {
var _local3 = 0;
while (_local3 < rows) {
var _local2 = 0;
while (_local2 < cols) {
grid[_local3][_local2].Image.removeMovieClip();
grid[_local3][_local2].Image = null;
grid[_local3][_local2] = null;
_local2++;
}
_local3++;
}
var _local5 = tiles.Iterator();
while (_local5.Next()) {
var _local4 = Tile(_local5.Current);
if (_local4.Image != null) {
_local4.Image.removeMovieClip();
}
}
tiles.Clear();
kegs.Clear();
flows.Clear();
}
function ClearScores() {
var _local2 = flows.Iterator();
while (_local2.Next()) {
Flow(_local2.Current).Display.Kill();
}
flows.Clear();
}
function NumFlows() {
return(flows.Size());
}
function Fill(baseRow, baseCol, newGrid) {
Clear();
var _local9 = 0;
while (_local9 < newGrid.length) {
var _local10 = baseRow + _local9;
var _local6 = 0;
while (_local6 < newGrid[_local9].length) {
var _local7 = baseCol + _local6;
var _local4 = newGrid[_local10][_local7];
var _local8 = false;
if (_local4 > 9) {
_local4 = _local4 - 9;
_local8 = true;
}
var _local2 = TileType.None;
var _local3 = 0;
switch (_local4) {
case -1 :
_local2 = TileType.Clear;
break;
case 0 :
break;
case 1 :
_local2 = TileType.Straight;
break;
case 2 :
_local2 = TileType.Straight;
_local3 = 1;
break;
case 3 :
_local2 = TileType.Cross;
break;
case 4 :
_local2 = TileType.Curve;
break;
case 5 :
_local2 = TileType.Curve;
_local3 = 1;
break;
case 6 :
_local2 = TileType.Curve;
_local3 = 2;
break;
case 7 :
_local2 = TileType.Curve;
_local3 = 3;
break;
case 8 :
_local2 = TileType.Block;
break;
case 9 :
_local2 = TileType.Barrel;
}
if (_local2 != TileType.None) {
if (_local8) {
_local2 = TileType.GoldType(_local2);
}
var _local5 = Tile.Create(Layer.Temp.GetLayer(), surface, _local2);
_local5.SetRotation(_local3);
placeTile(_local10, _local7, _local5, true);
if (_local2 == TileType.Barrel) {
kegs.Add(new Keg(_local5));
}
}
_local6++;
}
_local9++;
}
if (kegs.Size() > 0) {
cleared = false;
}
}
function ColOf(x) {
var _local2 = Math.floor((x - Left) / Tile.Size);
if (_local2 >= cols) {
_local2 = -1;
}
return(_local2);
}
function RowOf(y) {
var _local2 = Math.floor((y - Top) / Tile.Size);
if (_local2 >= rows) {
_local2 = -1;
}
return(_local2);
}
function Unlight() {
if (highlighted != null) {
highlighted.UnLight();
highlighted = null;
}
}
function Highlight(x, y) {
var _local2 = RowOf(y);
var _local3 = ColOf(x);
if ((((_local2 < 0) || (_local3 < 0)) || (grid[_local2][_local3] == highlighted)) || (TileType.IsFixture(grid[_local2][_local3].Type))) {
return(undefined);
}
Unlight();
if (grid[_local2][_local3] != null) {
highlighted = grid[_local2][_local3];
highlighted.Highlight();
}
}
function Place(x, y, tile) {
var _local8 = RowOf(y);
var _local9 = ColOf(x);
if ((_local8 < 0) || (_local9 < 0)) {
return(false);
}
var _local7 = false;
if (grid[_local8][_local9] != null) {
if (TileType.IsTool(tile.Type)) {
_local7 = tile.Use();
var _local5 = grid[_local8][_local9];
if ((tile.Type == TileType.Wrench) && (_local5.NumFlows > 0)) {
_root.Miss.start(0, 1);
} else if (TileType.IsFixture(_local5.Type)) {
_root.Miss.start(0, 1);
} else {
if (tile.Type == TileType.Hammer) {
_root.Pound.start(0, 1);
} else {
_root.Ratchet.start(0, 1);
}
if ((_local5.NumFlows > 0) && (tile.Type == TileType.Hammer)) {
var _local4 = 0;
while (_local4 < 4) {
var _local3 = _local5.Flows[_local4];
if (_local3 != null) {
killFlow(_local3.Source);
flows.Remove(_local3);
}
_local4++;
}
} else if (tile.Type == TileType.Hammer) {
_local5.Fall();
grid[_local8][_local9] = null;
} else {
grid[_local8][_local9].Right();
checkAllFlows();
}
}
if ((tile.Type == TileType.Hammer) || (_local7)) {
_local5.UnLight();
}
if (_local7) {
tiles.Add(tile);
}
return(_local7);
}
_root.Miss.start(0, 1);
return(false);
}
if (TileType.IsTool(tile.Type)) {
_root.Miss.start(0, 1);
_local7 = tile.Use();
if (_local7) {
tiles.Add(tile);
}
return(_local7);
}
placeTile(_local8, _local9, tile, false);
checkAllFlows();
return(true);
}
function placeTile(row, col, tile, init) {
grid[row][col] = tile;
var _local5 = Left + ((col + 0.5) * Tile.Size);
var _local4 = Top + ((row + 0.5) * Tile.Size);
if (init) {
if (Math.random() < 0.5) {
tile.Image._x = _local5;
if (Math.random() < 0.5) {
tile.Image._y = -Tile.Size;
} else {
tile.Image._y = Stage.height + Tile.Size;
}
} else {
if (Math.random() < 0.5) {
tile.Image._x = -Tile.Size;
} else {
tile.Image._x = Stage.width + Tile.Size;
}
tile.Image._y = _local4;
}
tile.Zoom(_local5, _local4);
} else {
tile.Image._x = _local5;
tile.Image._y = _local4;
}
tile.Image.swapDepths((layer.Base + (((rows - 1) - row) * cols)) + col);
tile.Row = row;
tile.Col = col;
tiles.Add(tile);
if (!init) {
_root.Place.start(0, 1);
}
}
function dirName(dir) {
switch (dir) {
case Direction.None :
return("<none>");
case Direction.Left :
return("<left>");
case Direction.Right :
return("<right>");
case Direction.Down :
return("<down>");
case Direction.Up :
return("<up>");
}
}
function Neighbor(row, col, direction) {
switch (direction) {
case Direction.Left :
col--;
if (col < 0) {
return(null);
}
break;
case Direction.Right :
col++;
if (col >= cols) {
return(null);
}
break;
case Direction.Up :
row--;
if (row < 0) {
return(null);
}
break;
case Direction.Down :
row++;
if (row >= rows) {
return(null);
}
break;
case Direction.None :
return(null);
}
return(grid[row][col]);
}
function checkAllFlows() {
var _local11 = kegs.Iterator();
while (_local11.Next()) {
var _local8 = Keg(_local11.Current);
var _local10 = _local8.KegTile;
if (_local10.NumFlows != 0) {
continue;
}
if (CheckFlow(_local8)) {
var _local4 = new Flow(_local8, this);
var _local7 = new Queue();
scoreQueues.Add(_local7);
_local4.Display = new ScoreDisplay("+0", uiLayer);
_local4.Display.SetScale(60);
_local4.Display.Center(scoreLeft, scoreTop + (flowDisplayHeight * flows.Size()));
var _local6 = 0;
var _local9 = 1;
var _local5 = new FlowIterator(_local10, Direction.Up, this);
var _local3;
while (_local3 = _local5.Current , _local3 != null) {
_local3.Flows[_local5.OutDir] = _local4;
if (_local3.NumFlows == 0) {
_local6++;
} else {
_local6 = _local6 + 3;
}
_local3.NumFlows++;
_local9 = _local9 * _local3.Multiplier;
_local5.Next();
_local7.Enqueue(new TileScore(_local3, _local4));
}
_local4.Value = (_local6 - 1) * _local9;
flows.Add(_local4);
_local11.Remove();
game.TimeBonus(7);
_root.Bar.GiveReserve(reservePerKeg);
}
}
}
function CheckFlow(keg) {
var _local2 = new FlowIterator(keg.KegTile, Direction.Up, this);
while (_local2.Current != null) {
if ((_local2.Current.Row == 0) && (_local2.OutDir == Direction.Up)) {
return(true);
}
_local2.Next();
}
return(false);
}
function SetVisibility(vis) {
var _local2 = tiles.Iterator();
while (_local2.Next()) {
_local2.Current.Image._visible = vis;
}
}
function rowCenter(row) {
return(Top + ((row + 0.5) * Tile.Size));
}
function colCenter(col) {
return(Left + ((col + 0.5) * Tile.Size));
}
function killFlow(keg) {
var _local3 = new FlowIterator(keg.KegTile, Direction.Up, this);
while (_local3.Current != null) {
_local3.Current.Flows[_local3.OutDir] = null;
if ((--_local3.Current.NumFlows) == 0) {
grid[_local3.Current.Row][_local3.Current.Col] = null;
_local3.Current.Fall();
}
_local3.Next();
}
_root.Explosion.start(0, 1);
}
function Update() {
if (!_root.Playing) {
return(undefined);
}
if (((--scoreTimer) < 0) && (scoreQueues.Size() > 0)) {
scoreTimer = scoreDequeueTime;
var _local12 = scoreQueues.Iterator();
while (_local12.Next()) {
var _local9 = Queue(_local12.Current);
if (_local9.Size() > 0) {
var _local3 = TileScore(_local9.Dequeue());
if (_local3.Tile.Type != TileType.Barrel) {
var _local8 = new ScoreDisplay("+" + _local3.Plus, uiLayer);
_local8.SetScale(50);
_local8.Center(colCenter(_local3.Tile.Col), rowCenter(_local3.Tile.Row));
_local8.Fade();
}
_local3.Tile.Flash();
_local3.Tile.FlashMin = 60;
_root.PlusOne.start(0, 1);
if (_local3.Tile.Type != TileType.Barrel) {
_local3.Flow.Sum = _local3.Flow.Sum + _local3.Plus;
_local3.Flow.Multiplier = _local3.Flow.Multiplier * _local3.Times;
_local3.Flow.Display.SetString("+" + (_local3.Flow.Sum * _local3.Flow.Multiplier));
}
} else {
iterator.Remove();
}
}
}
var iterator = flows.Iterator();
var _local11 = 0;
var _local13 = 0;
while (iterator.Next()) {
var _local5 = Flow(iterator.Current);
_local13 = _local13 + _local5.Update();
_local5.Display.Center(scoreLeft, _local5.Display.GetCenterY() - (_local11 * flowDisplayHeight));
if (_local5.Source.Volume < 0) {
killFlow(_local5.Source);
_local5.Display.Fade();
iterator.Remove();
_local11++;
}
}
var _local14 = _local13 * flows.Size();
if (_local14 > 0) {
_root.score = _root.score + _local14;
mainScore.SetString("" + _root.score);
positionMainScore();
}
var _local7 = tiles.Iterator();
while (_local7.Next()) {
var _local10 = Tile(_local7.Current);
_local10.Update();
if (_local10.Dead) {
_local7.Remove();
}
}
if (((flows.Size() == 0) && (kegs.Size() == 0)) && (!cleared)) {
cleared = true;
_root.Applause.start(0, 1);
_local7 = tiles.Iterator();
while (_local7.Next()) {
_local7.Current.Fall();
}
var _local6 = 0;
while (_local6 < rows) {
var _local4 = 0;
while (_local4 < cols) {
grid[_local6][_local4] = null;
_local4++;
}
_local6++;
}
game.LevelCleared();
}
}
static var reservePerKeg = 6;
static var flowDisplayHeight = 30;
static var scoreDequeueTime = 3;
var grid = null;
var rows = null;
var cols = null;
var layer = null;
var uiLayer = null;
var surface = null;
var kegs = null;
var flows = null;
var scoreQueues = null;
var scoreTimer = 0;
var scoreLeft = 0;
var scoreTop = 0;
var cleared = true;
var game = null;
var mainScore = null;
var highlighted = null;
}
Symbol 287 MovieClip [__Packages.Flow] Frame 0
class Flow
{
function Flow (source, board) {
this.board = board;
Source = source;
countdown = Game.Framerate;
}
function Update() {
if (((Source.Volume--) > 0) && ((--countdown) == 0)) {
countdown = Game.Framerate;
return(Value);
}
return(0);
}
var countdown = 0;
var board = null;
var Value = 0;
var Source = null;
var Sum = 0;
var Multiplier = 1;
var Display = null;
}
Symbol 288 MovieClip [__Packages.Keg] Frame 0
class Keg
{
var KegTile, Volume;
function Keg (tile) {
KegTile = tile;
Volume = Game.KegSize * Game.Framerate;
}
}
Symbol 289 MovieClip [__Packages.Queue] Frame 0
class Queue
{
function Queue () {
}
function Enqueue(data) {
var _local2 = new QueueNode();
_local2.Data = data;
if (head == null) {
head = _local2;
} else {
tail.Next = _local2;
}
tail = _local2;
size++;
}
function Dequeue() {
var _local2 = head.Data;
head = head.Next;
size--;
return(_local2);
}
function Peek() {
return(head.Data);
}
function Size() {
return(size);
}
var head = null;
var tail = null;
var size = 0;
}
Symbol 290 MovieClip [__Packages.QueueNode] Frame 0
class QueueNode
{
function QueueNode () {
}
}
Symbol 291 MovieClip [__Packages.FlowIterator] Frame 0
class FlowIterator
{
var Current, OutDir, board;
function FlowIterator (tile, outDir, board) {
Current = tile;
OutDir = outDir;
this.board = board;
}
function Next() {
Current = board.Neighbor(Current.Row, Current.Col, OutDir);
OutDir = Direction.Opposite(OutDir);
OutDir = Current.Redirect(OutDir);
if (OutDir == Direction.None) {
Current = null;
}
}
}
Symbol 292 MovieClip [__Packages.TileScore] Frame 0
class TileScore
{
function TileScore (tile, flow) {
Tile = tile;
Flow = flow;
Plus = ((tile.NumFlows == 1) ? 1 : 3);
Times = tile.Multiplier;
}
var Tile = null;
var Flow = null;
var Plus = 0;
var Times = 1;
}
Symbol 293 MovieClip [__Packages.Tilebox] Frame 0
class Tilebox
{
var tileset, tileLayer, surface, Tiles, Size, Left, Top;
function Tilebox (tileset, tileLayer, surface, size, left, top) {
this.tileset = tileset;
this.tileLayer = tileLayer;
this.surface = surface;
Tiles = new Array(MaxSize);
Size = size;
Left = left;
Top = top;
}
function ChangeSet(newSet) {
tileset = newSet;
}
function Fill() {
var _local3 = 0;
while (_local3 < Size) {
if (Tiles[_local3] == null) {
var _local2 = Tile.Create(tileLayer.GetLayer(), surface, tileset.GetTile());
if ((!TileType.IsTool(_local2.Type)) && (!TileType.IsFixture(_local2.Type))) {
if (_local2.Type == TileType.Straight) {
if (Math.random() < 0.35) {
_local2.SetRotation(1);
}
} else {
_local2.SetRotation(Math.floor(Math.random() * 4));
}
}
placeTile(_local2, _local3, true);
}
_local3++;
}
}
function Replace(tile) {
var _local2 = 0;
while (_local2 < Size) {
if (Tiles[_local2] == null) {
placeTile(tile, _local2, false);
return(true);
}
_local2++;
}
return(false);
}
function placeTile(tile, index, slide) {
Tiles[index] = tile;
tile.Image._x = (Left + (Tile.Size / 2)) + (slide ? 64 : 0);
tile.Image._y = (Top + (index * (Tile.Size + TileSpacing))) + (Tile.Size / 2);
if (slide) {
tile.XSlide(-64);
}
if ((tile.Type == TileType.Hammer) || (tile.Type == TileType.Wrench)) {
tile.PositionUseDisplay();
}
}
function Flush() {
var _local2 = 0;
while (_local2 < Tiles.length) {
Tiles[_local2].Fade();
Tiles[_local2] = null;
_local2++;
}
Fill();
}
function Grab(mouseX, mouseY) {
mouseX = mouseX - Left;
mouseY = mouseY - Top;
if (mouseX > Tile.Size) {
return(null);
}
var _local2 = Math.floor(mouseY / (Tile.Size + TileSpacing));
if ((_local2 > Size) || (mouseY > ((_local2 * (Tile.Size + TileSpacing)) + Tile.Size))) {
return(null);
}
var _local3 = Tiles[_local2];
_local3.UnSlide();
Tiles[_local2] = null;
return(_local3);
}
function Update() {
var _local2 = 0;
while (_local2 < Size) {
if (((Tiles[_local2] != null) && (Tiles[_local2].Image.Sliding)) && (TileType.IsTool(Tiles[_local2].Type))) {
Tiles[_local2].PositionUseDisplay();
}
_local2++;
}
}
static var MaxSize = 6;
static var TileSpacing = 16;
}
Symbol 294 MovieClip [__Packages.Tileset] Frame 0
class Tileset
{
var Set;
function Tileset (set, probabilities) {
Set = new Array(100);
var _local2 = 0;
var _local3 = 0;
while (_local3 < probabilities.length) {
var _local4;
if (_local3 == (probabilities.length - 1)) {
_local4 = Set.length;
} else {
_local4 = _local2 + Math.floor(probabilities[_local3] * Set.length);
}
while (_local2 < _local4) {
Set[_local2] = set[_local3];
_local2++;
}
_local3++;
}
}
function GetTile() {
return(Set[Math.floor(Math.random() * Set.length)]);
}
}
Symbol 295 MovieClip [__Packages.BarAS] Frame 0
class BarAS extends MovieClip
{
var arms, serveQueue, attachMovie, Bubble, bubble, layer, order;
function BarAS () {
super();
}
function GiveReserve(moreBeer) {
Reserve = Math.min(maxReserve, Reserve + moreBeer);
}
function Init(bubbleLayer) {
arms = new Array(Self.Arm1, Self.Arm2, Self.Arm3, Self.Arm4, Self.Arm5);
var _local2 = 0;
while (_local2 < arms.length) {
arms[_local2].Bar = this;
_local2++;
}
serveQueue = new Queue();
attachMovie("SpeechBubbleClip", "bubble", bubbleLayer.GetLayer());
Bubble = bubble;
Bubble._y = 34;
Connect = Connect;
}
function Drink() {
var _local2 = 0;
do {
var arm = arms[Math.floor(Math.random() * arms.length)];
} while (arm.Drinking && ((_local2++) < 4));
if (!arm.Drinking) {
arm.Drink();
}
}
function SetLayer(layer) {
this.layer = layer;
var _local2 = 0;
while (_local2 < arms.length) {
arms[_local2].Layer = layer;
_local2++;
}
}
function Serve(arm) {
serveQueue.Enqueue(arm);
}
function onEnterFrame() {
if (_root.game.Paused) {
return(undefined);
}
if (((order == null) && (serveQueue.Size() > 0)) && (Reserve >= 0)) {
var _local3 = Arm(serveQueue.Dequeue());
order = new Order(499, 51, _local3.CatchX, _local3.CatchY, _local3, layer.GetLayer());
Reserve--;
}
if (order.Update()) {
order = null;
}
}
static var maxReserve = 12;
var Self = null;
var Reserve = 6;
var Connect = null;
}
Symbol 296 MovieClip [__Packages.Order] Frame 0
class Order
{
function Order (initX, initY, targetX, targetY, targetArm, layer) {
this.initX = initX;
this.initY = initY;
this.targetX = targetX;
this.targetY = targetY;
this.targetArm = targetArm;
var _local3 = "Mug" + layer;
_root.Bar.attachMovie("Mug", _local3, layer);
mug = _root.Bar[_local3];
if (targetArm.RDir == -1) {
mug._xscale = mug._xscale * -1;
this.initX = this.initX + 18;
}
mug._x = this.initX;
mug._y = initY;
var _local5 = targetX - this.initX;
var _local4 = targetY - initY;
var _local6 = Math.sqrt(_local5 * _local5, _local4 * _local4);
maxDt = 10 / _local6;
}
function Update() {
if (filled) {
t = t + Math.min(maxDt, (1 - t) / 5);
mug._x = initX + ((targetX - initX) * t);
mug._y = initY + ((targetY - initY) * t);
if (t >= 0.99) {
targetArm.Grab();
mug.removeMovieClip();
return(true);
}
} else if (!mug.DoEmpty) {
filled = mug.Fill(1);
}
return(false);
}
static var speed = 10;
var targetArm = null;
var initX = 0;
var initY = 0;
var targetX = 0;
var targetY = 0;
var t = 0;
var maxDt = 0;
var mug = null;
var filled = false;
}
Symbol 297 MovieClip [__Packages.SpeechBubble] Frame 0
class SpeechBubble extends MovieClip
{
var _alpha, _x, _visible;
function SpeechBubble () {
super();
textBox = textBox;
left = left;
right = right;
middle = middle;
pointer = pointer;
_alpha = 0;
alphaTarget = 0;
}
function Speak(x, string) {
if (!available) {
return(undefined);
}
textBox.text = string;
var _local2 = Math.ceil(textBox.textWidth) + 7;
var _local3 = (_local2 + left._width) + right._width;
middle._width = _local2;
right._x = (middle._x + _local2) - 2;
if (x < (Stage.width / 2)) {
_x = Math.min(x - (2 * left._width), (Stage.width - _local3) - right._width);
pointer._xscale = 100;
} else {
_x = Math.max((x - _local3) + (2 * right._width), left._width);
pointer._xscale = -100;
}
pointer._x = x - _x;
alphaTarget = 100;
_visible = true;
available = false;
timer = showTime;
}
function onEnterFrame() {
if (alphaTarget < _alpha) {
_alpha = Math.max(alphaTarget, _alpha - fadeRate);
if (_alpha == 0) {
_visible = false;
available = true;
}
} else {
_alpha = Math.min(alphaTarget, _alpha + fadeRate);
}
if ((timer--) == 0) {
alphaTarget = 0;
}
}
static var showTime = 150;
static var fadeRate = 6;
var textBox = null;
var left = null;
var right = null;
var middle = null;
var pointer = null;
var alphaTarget = 0;
var timer = 0;
var available = true;
}
Symbol 298 MovieClip [__Packages.ScoreSurface] Frame 0
class ScoreSurface extends MovieClip
{
var color, _visible, _y, removeMovieClip, _alpha;
function ScoreSurface () {
super();
color = new Color(this);
ResetBlink();
}
function UnderBlink(amt) {
blinkDecay = blinkDecay + amt;
}
function Dull() {
blinkOn = blinkOff;
}
function ResetBlink() {
blinkOn = {ra:100, rb:155, ga:100, gb:155, ba:100, bb:155, aa:100, ab:0};
}
function onEnterFrame() {
if (_visible) {
if (_root.game.Paused) {
_visible = false;
return(undefined);
}
blinkOn.gb = (blinkOn.bb = (blinkOn.rb = Math.max(0, blinkOn.rb - blinkDecay)));
if ((blink = !blink)) {
color.setTransform(blinkOn);
} else {
color.setTransform(blinkOff);
}
if (fade) {
time++;
_y--;
if (time > alphaDelay) {
alpha = alpha - alphaDecay;
if (alpha <= 0) {
(removeMovieClip());// not popped
}
}
}
_alpha = alpha;
} else if (!_root.game.Paused) {
_visible = true;
}
}
function Fade() {
fade = true;
}
static var alphaDecay = 5;
static var alphaDelay = 10;
static var blinkOff = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
var time = 0;
var fade = false;
var blink = false;
var blinkOn = null;
var alpha = 100;
var blinkDecay = 2;
}
Symbol 299 MovieClip [__Packages.Blinker] Frame 0
class Blinker extends MovieClip
{
var gotoAndStop, _currentframe;
function Blinker () {
super();
}
function onEnterFrame() {
if (!_root.game.Paused) {
if ((wait--) <= 0) {
(gotoAndStop(_currentframe + 1));// not popped
}
}
}
var wait = 0;
}
Symbol 300 MovieClip [__Packages.Fadable] Frame 0
class Fadable extends MovieClip
{
var _x, _alpha, removeMovieClip;
function Fadable () {
super();
}
function Fade() {
fade = true;
}
function XSlide(amt) {
Sliding = true;
slideTarget = _x + amt;
}
function onEnterFrame() {
if (!_root.game.Paused) {
if (fade) {
_alpha = _alpha - 10;
if (_alpha <= 0) {
(removeMovieClip());// not popped
}
}
if (Sliding) {
_x = _x + ((slideTarget - _x) / 5);
if (Math.abs(slideTarget - _x) < 1) {
_x = slideTarget;
Sliding = false;
}
}
}
}
var fade = false;
var Sliding = false;
var slideTarget = 0;
}
Symbol 301 MovieClip [__Packages.Curtain] Frame 0
class Curtain extends MovieClip
{
var _width, _height, _x, _y, _alpha, removeMovieClip;
function Curtain () {
super();
_width = Stage.width;
_height = Stage.height;
_x = 0;
_y = 0;
}
function onEnterFrame() {
if (target < _alpha) {
_alpha = Math.max(target, _alpha - fadeRate);
if (remove && (_alpha == 0)) {
(removeMovieClip());// not popped
}
} else {
_alpha = Math.min(target, _alpha + fadeRate);
}
}
function SetIn() {
target = (_alpha = 100);
}
function SetOut() {
target = (_alpha = 0);
}
function FadeIn() {
target = 100;
}
function FadeOut(remove) {
target = 0;
this.remove = remove;
}
static var fadeRate = 6;
var target = 0;
var remove = false;
}
Symbol 302 MovieClip [__Packages.Blurrable] Frame 0
class Blurrable extends MovieClip
{
var filters;
function Blurrable () {
super();
}
function BlurFast() {
blur = (blurTarget = maxBlur);
setBlur();
}
function Blur() {
blurTarget = maxBlur;
}
function Focus() {
blurTarget = 0;
}
function setBlur() {
if (blur == 0) {
filters = null;
} else {
filters = new Array(new flash.filters.BlurFilter(blur, blur, 1));
}
}
function onEnterFrame() {
var _local2 = true;
if (blur < blurTarget) {
blur++;
} else if (blur > blurTarget) {
blur--;
} else {
_local2 = false;
}
if (_local2) {
setBlur();
}
}
static var maxBlur = 5;
var blur = 0;
var blurTarget = 0;
}
Symbol 22 Button
on (release) {
getURL ("http://www.dragongamez.com/", "_blank");
}
Symbol 37 MovieClip [Layout] Frame 1
#initclip 61
Object.registerClass("Layout", Blurrable);
#endinitclip
Instance of Symbol 36 MovieClip "Lattice" in Symbol 37 MovieClip [Layout] Frame 1
onClipEvent (load) {
this.swapDepths(10000);
}
Symbol 41 Button
on (release) {
if (!Locked) {
Lock();
_root.game.Start();
FadeOut();
_root.Click.start(0, 1);
}
}
Symbol 42 Button
on (release) {
if (!Locked) {
Lock();
_root.OptionsMenu.Locked = false;
_root.OptionsMenu.FadeIn();
_root.Click.start(0, 1);
}
}
Symbol 47 Button
on (release) {
if (!Locked) {
var oldStart = _root.StartLevel;
_root.StartLevel = Math.max(_root.StartLevel - 1, 1);
if (oldStart != _root.StartLevel) {
updateStartText();
_root.Click.start(0, 1);
} else {
_root.Miss.start(0, 1);
}
}
}
Symbol 52 Button
on (release) {
if (!Locked) {
var oldStart = _root.StartLevel;
_root.StartLevel = Math.min(Math.min(_root.StartLevel + 1, Levels.LevelSet.length), _root.TopLevel + 1);
if (oldStart != _root.StartLevel) {
updateStartText();
_root.Click.start(0, 1);
} else {
_root.Miss.start(0, 1);
}
}
}
Symbol 57 Button
on (release) {
if (!Locked) {
Lock();
_root.Help.Locked = false;
_root.Help.Show("How to Play", _root.helpText);
_root.Click.start(0, 1);
}
}
Symbol 69 MovieClip [MainMenu] Frame 1
#initclip 34
Object.registerClass("MainMenu", BasicMenu);
#endinitclip
Instance of Symbol 68 MovieClip "Blocker" in Symbol 69 MovieClip [MainMenu] Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 79 MovieClip [Arm2] Frame 1
#initclip 35
Object.registerClass("Arm2", Arm);
#endinitclip
Symbol 83 MovieClip [Arm3] Frame 1
#initclip 36
Object.registerClass("Arm3", Arm);
#endinitclip
Symbol 87 MovieClip [Arm5] Frame 1
#initclip 37
Object.registerClass("Arm5", Arm);
#endinitclip
Symbol 91 MovieClip [Arm4] Frame 1
#initclip 38
Object.registerClass("Arm4", Arm);
#endinitclip
Symbol 95 MovieClip [Arm1] Frame 1
#initclip 39
Object.registerClass("Arm1", Arm);
#endinitclip
Symbol 101 MovieClip [Bar] Frame 1
#initclip 40
Object.registerClass("Bar", BarAS);
#endinitclip
Instance of Symbol 79 MovieClip [Arm2] "Arm2" in Symbol 101 MovieClip [Bar] Frame 1
onClipEvent (load) {
this.Mug = MyMug;
this.ArmGraphic = MyArmGraphic;
CatchX = 98;
CatchY = 25;
mugX = -59;
mugY = -26;
talkX = 125;
}
Instance of Symbol 83 MovieClip [Arm3] "Arm1" in Symbol 101 MovieClip [Bar] Frame 1
onClipEvent (load) {
this.Mug = MyMug;
this.ArmGraphic = MyArmGraphic;
CatchX = 0;
CatchY = 25;
mugX = -74;
mugY = -22;
talkX = 47;
}
Instance of Symbol 87 MovieClip [Arm5] "Arm4" in Symbol 101 MovieClip [Bar] Frame 1
onClipEvent (load) {
this.Mug = MyMug;
this.ArmGraphic = MyArmGraphic;
CatchX = 324;
CatchY = 30;
mugX = -63;
mugY = -13;
talkX = 358;
}
Instance of Symbol 91 MovieClip [Arm4] "Arm5" in Symbol 101 MovieClip [Bar] Frame 1
onClipEvent (load) {
RDir = -1;
this.Mug = MyMug;
this.ArmGraphic = MyArmGraphic;
CatchX = 478;
CatchY = 30;
mugX = 64;
mugY = -14;
talkX = 444;
}
Instance of Symbol 95 MovieClip [Arm1] "Arm3" in Symbol 101 MovieClip [Bar] Frame 1
onClipEvent (load) {
RDir = -1;
this.Mug = MyMug;
this.ArmGraphic = MyArmGraphic;
CatchX = 268;
CatchY = 30;
mugX = 75;
mugY = -18;
talkX = 255;
}
Instance of Symbol 100 MovieClip "Connect" in Symbol 101 MovieClip [Bar] Frame 1
onClipEvent (load) {
function Show() {
_visible = true;
_alpha = 100;
timer = 0;
this.onEnterFrame = function () {
if ((timer++) > 120) {
_alpha = (_alpha - 5);
if (_alpha <= 0) {
_visible = false;
delete this.onEnterFrame;
}
}
};
}
_visible = false;
timer = 0;
}
Symbol 104 Button
on (release) {
if (!Locked) {
Locked = true;
FadeOut();
_root.game.Unpause();
_root.Click.start(0, 1);
}
}
Symbol 105 Button
on (release) {
if (!Locked) {
Locked = true;
FadeOut();
_root.game.endGame();
_root.Click.start(0, 1);
}
}
Symbol 108 MovieClip [PauseMenu] Frame 1
#initclip 41
Object.registerClass("PauseMenu", BasicMenu);
#endinitclip
Symbol 111 Button
on (release) {
if (!Locked) {
if (_root.sound) {
_root.sound = false;
UpdateStatus();
} else {
_root.sound = true;
UpdateStatus();
}
_root.Click.start(0, 1);
}
}
Symbol 112 Button
on (release) {
if (!Locked) {
if (_root.tips) {
_root.tips = false;
UpdateStatus();
} else {
_root.tips = true;
UpdateStatus();
}
_root.Click.start(0, 1);
}
}
Symbol 113 Button
on (release) {
if (!Locked) {
Locked = true;
_root.MainMenu.Unlock();
FadeOut();
_root.Click.start(0, 1);
}
}
Symbol 117 MovieClip [OptionsMenu] Frame 1
#initclip 42
Object.registerClass("OptionsMenu", BasicMenu);
#endinitclip
Symbol 119 MovieClip [BeerMask] Frame 1
#initclip 43
Object.registerClass("BeerMask", BeerMask);
#endinitclip
Symbol 120 MovieClip [EmptyScoreSurface] Frame 1
#initclip 44
Object.registerClass("EmptyScoreSurface", ScoreSurface);
#endinitclip
Symbol 123 MovieClip [Flash] Frame 1
#initclip 45
Object.registerClass("Flash", Blinker);
#endinitclip
stop();
Symbol 123 MovieClip [Flash] Frame 5
removeMovieClip(this);
Symbol 125 MovieClip [Head] Frame 1
#initclip 46
Object.registerClass("Head", Head);
#endinitclip
Symbol 133 MovieClip [Mug] Frame 1
#initclip 47
Object.registerClass("Mug", Mug);
#endinitclip
this.Mask = MyMask;
this.Mask.Head = MyHead;
Symbol 160 MovieClip [Smoke] Frame 1
#initclip 48
Object.registerClass("Smoke", Blinker);
#endinitclip
stop();
Symbol 160 MovieClip [Smoke] Frame 11
removeMovieClip(this);
Symbol 167 MovieClip [Barrel] Frame 1
#initclip 49
Object.registerClass("Barrel", Fadable);
#endinitclip
Symbol 172 MovieClip [Block] Frame 1
#initclip 50
Object.registerClass("Block", Fadable);
#endinitclip
Symbol 175 MovieClip [CrossPipe] Frame 1
#initclip 51
Object.registerClass("CrossPipe", Fadable);
#endinitclip
Symbol 184 MovieClip [CurvePipe] Frame 1
#initclip 52
Object.registerClass("CurvePipe", Fadable);
#endinitclip
Symbol 187 MovieClip [GoldCrossPipe] Frame 1
#initclip 53
Object.registerClass("GoldCrossPipe", Fadable);
#endinitclip
Symbol 196 MovieClip [GoldCurvePipe] Frame 1
#initclip 54
Object.registerClass("GoldCurvePipe", Fadable);
#endinitclip
Symbol 200 MovieClip [GoldStraightPipe] Frame 1
#initclip 55
Object.registerClass("GoldStraightPipe", Fadable);
#endinitclip
Symbol 204 MovieClip [Hammer] Frame 1
#initclip 56
Object.registerClass("Hammer", Fadable);
#endinitclip
stop();
Symbol 208 MovieClip [StraightPipe] Frame 1
#initclip 57
Object.registerClass("StraightPipe", Fadable);
#endinitclip
Symbol 212 MovieClip [Wrench] Frame 1
#initclip 58
Object.registerClass("Wrench", Fadable);
#endinitclip
stop();
Symbol 223 MovieClip [CurtainClip] Frame 1
#initclip 59
Object.registerClass("CurtainClip", Curtain);
#endinitclip
Symbol 237 MovieClip [SpeechBubbleClip] Frame 1
#initclip 60
Object.registerClass("SpeechBubbleClip", SpeechBubble);
#endinitclip
Symbol 243 Button
on (release) {
if (!Locked) {
Locked = true;
if (title != tipTitle) {
_root.MainMenu.Unlock();
}
FadeOut();
_root.Click.start(0, 1);
}
}
Symbol 260 Button
on (release) {
if (!Locked) {
Locked = true;
FadeOut();
_root.MainMenu.Unlock();
_root.MainMenu.FadeIn();
_root.Click.start(0, 1);
}
}
Instance of Symbol 261 MovieClip "Blinky" in Symbol 265 MovieClip Frame 1
onClipEvent (load) {
function Flash() {
blinkOn = {ra:100, rb:155, ga:100, gb:155, ba:100, bb:155, aa:100, ab:0};
}
color = new Color(this);
blinkDecay = 5;
var blink = false;
blinkOff = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
blinkOn = null;
}
onClipEvent (enterFrame) {
blinkOn.gb = (blinkOn.bb = (blinkOn.rb = Math.max(0, blinkOn.rb - blinkDecay)));
if ((blink = !blink)) {
color.setTransform(blinkOn);
} else {
color.setTransform(blinkOff);
}
}
Symbol 268 Button
on (release) {
getURL ("http://www.dragongamez.com/", "_blank");
}