Frame 2
function tracker($clientID, $client, $passKey, $productID, $instance) {
this.clientID = $clientID;
this.client = $client;
this.passKey = $passKey;
this.productID = $productID;
this.instance = $instance;
this.domain = "local";
this.enabled = true;
this.trackerVersion = "1.2";
this.machineID = "";
}
function trackEvent($event) {
if (!_enabled) {
trace("Tracking disabled. Could not send following event: " + $event);
return(undefined);
}
_request.clientID = _tracker.clientID;
_request.productID = _tracker.productID;
_request.instance = _tracker.instance;
_request.passkey = _tracker.passKey;
_request.machineID = _tracker.machineID;
_request.eventName = $event;
_request.domain = _tracker.domain;
_request.trackerVersion = _tracker.trackerVersion;
for (var _local1 in _request) {
trace(_request[_local1]);
}
_request.sendAndLoad((_submitURL + "?clearCache=") + new Date().getTime(), _response, "POST");
}
function showResult(success) {
if (success) {
trace("data received");
}
}
stop();
onEnterFrame = function () {
var _local2 = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
preloader_mc.gotoAndStop(_local2);
preloader_mc.percentage.text = _local2.toString() + "%";
if (_local2 == 100) {
delete onEnterFrame;
gotoAndPlay ("start");
}
};
_shareFolderURL = "http://www.casinogeezer.com/counting_cards/Share/";
var share_mc = (new Share.ShareAS2());
var _request = new LoadVars();
var _response = new LoadVars();
_response.onLoad = showResult;
var _submitURL = "http://www.npbmedia.com/tracker/tracker_recorder.php";
var _enabled = true;
var _tracker = new tracker(1, "Naked Penguin Boy", "npbkey", 77, "Counting Cards");
trackEvent("FLASH_application_loaded");
Instance of Symbol 42 MovieClip "preloader_mc" in Frame 2
onClipEvent (enterFrame) {
var bTotal = _parent.getBytesTotal();
var bLoaded = _parent.getBytesLoaded();
bLoadedText = Math.round(bLoaded / 1000) + " kb";
_root.percentage = (bLoaded / bTotal) * 100;
percTxt = Math.floor(_root.percentage) + " %";
gotoAndStop(Math.floor(_root.percentage));
trace(_root._framesloaded);
if (_root.percentage == 100) {
_parent.gotoAndPlay("start");
} else {
var ld = _root._framesloaded;
if (ld > 6) {
ld = 6;
}
if (ld > 2) {
_parent.gotoAndStop(ld);
}
}
}
Frame 19
stop();
Symbol 7 MovieClip [btn_play_again] Frame 1
#initclip 13
Object.registerClass("btn_play_again", com.npb.controls.Button);
#endinitclip
Symbol 17 MovieClip [DisplayScores] Frame 1
stop();
Symbol 17 MovieClip [DisplayScores] Frame 10
stop();
Symbol 17 MovieClip [DisplayScores] Frame 20
stop();
Symbol 20 MovieClip [btn_sharethisgame] Frame 1
#initclip 10
Object.registerClass("btn_sharethisgame", com.npb.controls.Button);
#endinitclip
Symbol 23 MovieClip [btn_playgame] Frame 1
#initclip 11
Object.registerClass("btn_playgame", com.npb.controls.Button);
#endinitclip
Symbol 26 MovieClip [btn_instructions] Frame 1
#initclip 12
Object.registerClass("btn_instructions", com.npb.controls.Button);
#endinitclip
Symbol 29 MovieClip [fps_mc] Frame 1
var t = getTimer();
var fps = new Array();
onEnterFrame = function () {
fps.push(1000 / (getTimer() - t));
if (fps.length > 10) {
fps.shift();
}
t = getTimer();
totalFps = 0;
for (var _local1 in fps) {
totalFps = totalFps + fps[_local1];
}
fps_txt.text = (Math.ceil((totalFps / fps.length) * 100) / 100).toString() + " fps";
};
Symbol 279 MovieClip [__Packages.com.npb.controls.Control] Frame 0
class com.npb.controls.Control extends MovieClip
{
var state, frames, gotoAndStop, _currentframe, nextFrame, prevFrame, onEnterFrame, dispatchEvent;
function Control () {
super();
mx.events.EventDispatcher.initialize(this);
}
function onLoad() {
waitForDependencies(dependencies.Initialise, mx.utils.Delegate.create(this, initialise));
}
function initialise() {
if (!state) {
state = labels[0];
}
indexFrameLabels();
}
function indexFrameLabels() {
frames = new Object();
var _local3 = labels.length;
while (_local3--) {
var _local2 = labels[_local3];
gotoAndStop(_local2);
frames[_local2] = _currentframe;
}
gotoAndStop(frames[state]);
action();
}
function action() {
if (!_enabled) {
gotoAndStop(frames[state]);
}
if (_currentframe < frames[state]) {
nextFrame();
} else if (_currentframe > frames[state]) {
prevFrame();
} else {
if (enabled != _enabled) {
enabled = _enabled;
}
onEnterFrame = null;
var _local2 = dependencies[state];
var _local3 = mx.utils.Delegate.create(this, envokeFrameAction);
waitForDependencies(_local2, _local3);
}
}
function waitForDependencies(list, func) {
if (list instanceof Array) {
var waitID;
waitID = setInterval(function () {
var _local1 = true;
for (var _local2 in list) {
if (list == undefined) {
_local1 = false;
}
}
if (_local1 == true) {
clearInterval(waitID);
func();
}
}, 10);
} else {
func();
}
}
function envokeFrameAction() {
dispatchEvent({target:this, type:"frame" + state, state:state});
if (this["onFrame" + state] instanceof Function) {
this["onFrame" + state]();
}
}
function setState(state, jump) {
if (enabled) {
if (jump) {
gotoAndStop(frames[state]);
}
this.state = state;
onEnterFrame = action;
}
}
var enabled = true;
var dependencies = new Object();
var _enabled = true;
var labels = [];
}
Symbol 280 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 281 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 282 MovieClip [__Packages.com.npb.controls.Button] Frame 0
class com.npb.controls.Button extends com.npb.controls.Control
{
var label, dependencies, onDragOver, onDragOut, onReleaseOutside, _onPressActions, _onReleaseActions, setState, _onRollOverActions, _onRollOutActions, _width, startDrag, stopDrag, _dragable, _enabled, enabled;
function Button () {
super();
dependencies.Initialise = new Array(label);
}
function initialise() {
super.initialise();
onRelease = (_onRelease);
onPress = (_onPress);
onRollOver = (_onRollOver);
onRollOut = (_onRollOut);
onDragOver = onRollOver;
onDragOut = onRollOut;
onReleaseOutside = onRelease;
onPress = (function () {
this.setState("Down");
});
if (label) {
label.addEventListener("update", this);
}
}
function _onPress() {
var _local2 = _onPressActions.length;
while (_local2--) {
_onPressActions[_local2].apply(this);
}
}
function set onPress(f) {
if (f != onPress) {
if (!_onPressActions) {
_onPressActions = new Array();
}
_onPressActions.push(f);
}
//return(onPress);
}
function get onPress() {
return(_onPress);
}
function _onRelease() {
var _local2 = _onReleaseActions.length;
setState("Over");
while (_local2--) {
_onReleaseActions[_local2].apply(this);
}
}
function _onRollOver() {
var _local2 = _onRollOverActions.length;
setState("Over");
while (_local2--) {
_onRollOverActions[_local2].apply(this);
}
}
function _onRollOut() {
var _local2 = _onRollOutActions.length;
setState("Off");
while (_local2--) {
_onRollOutActions[_local2].apply(this);
}
}
function set onRelease(f) {
if (f != onRelease) {
if (!_onReleaseActions) {
_onReleaseActions = new Array();
}
_onReleaseActions.push(f);
}
//return(onRelease);
}
function get onRelease() {
return(_onRelease);
}
function get onRollOver() {
return(_onRollOver);
}
function set onRollOver(f) {
if (f != onRollOver) {
if (!_onRollOverActions) {
_onRollOverActions = new Array();
}
_onRollOverActions.push(f);
}
//return(onRollOver);
}
function get onRollOut() {
return(_onRollOut);
}
function set onRollOut(f) {
if (f != onRollOut) {
if (!_onRollOutActions) {
_onRollOutActions = new Array();
}
_onRollOutActions.push(f);
}
//return(onRollOut);
}
function clearHandler(e) {
var _local2 = ("_" + e) + "Actions";
this[_local2] = new Array();
}
function removeHandler(e, f) {
var _local3 = ("_" + e) + "Actions";
if (f != undefined) {
var _local2 = this[_local3].length;
while (_local2--) {
if (_local3[_local2] == f) {
_local3[_local2].splice(_local2, 1);
}
}
} else {
delete this[_local3];
}
}
function update() {
centerLabel();
}
function centerLabel() {
label._x = (_width - label._width) / 2;
}
function set dragable(dragable) {
if (dragable) {
onPress = (startDrag);
onRelease = (stopDrag);
} else {
removeHandler("onPress", startDrag);
removeHandler("onRelease", startDrag);
}
_dragable = dragable;
//return(this.dragable);
}
function get dragable() {
return(_dragable);
}
function setEnabled(e) {
_enabled = e;
if (!_enabled) {
setState("Disabled");
} else {
enabled = true;
setState("Off");
}
}
function getEnabled() {
return(_enabled);
}
var labels = ["Off", "Over", "Down", "Disabled"];
var useHandCursor = false;
}
Symbol 283 MovieClip [__Packages.com.npb.controls.Label] Frame 0
class com.npb.controls.Label extends com.npb.controls.Control
{
var textField, dependencies, dispatchEvent, __get__embedFonts, _x, _width, _parent;
function Label () {
super();
dependencies.Initialise = new Array(textField);
}
function initialise() {
super.initialise();
autosize = (true);
}
function set autosize(autosize) {
textField.autoSize = autosize;
dispatchEvent({type:"update"});
//return(this.autosize);
}
function get autosize() {
return((textField.autoSize ? true : false));
}
function set align(align) {
textFormat.align = align;
dispatchEvent({type:"update"});
//return(this.align);
}
function get align() {
return(textFormat.align);
}
function set textFormat(textFormat) {
textField.setNewTextFormat(textFormat);
dispatchEvent({type:"update"});
//return(this.textFormat);
}
function get textFormat() {
return(textField.getTextFormat());
}
function set embedFonts(embedFonts) {
textField.embedFonts = embedFonts;
dispatchEvent({type:"update"});
//return(__get__embedFonts());
}
function set text(txt) {
__text = txt;
dispatchEvent({type:"update"});
//return(text);
}
function get text() {
return(__text);
}
function position() {
if (!(align === "center")) {
} else {
_x = (_parent._width - _width) / 2;
}
}
var password = false;
var __text = "";
}
Symbol 284 MovieClip [__Packages.Share.ShareAS2] Frame 0
class Share.ShareAS2
{
static var instance;
var _sharePanelStatus, _shareFolderURL, _sharePanel;
function ShareAS2 () {
init();
}
function init() {
instance = this;
_sharePanelStatus = false;
_shareFolderURL = _root._shareFolderURL;
trace(_shareFolderURL);
System.security.allowDomain("www.casinogeezer.com");
var _local3 = new Object();
_local3.onLoadComplete = function (target_mc, httpStatus) {
trace(">> loadListener.onLoadComplete()");
trace(">> =============================");
this._sharePanelStatus = false;
target_mc._visible = false;
Share.ShareAS2.instance.setDepth();
};
_local3.onLoadInit = function (target_mc) {
trace(">> loadListener.onLoadInit()");
trace(">> =============================");
};
var _local4 = new MovieClipLoader();
_local4.addListener(_local3);
_sharePanel = _root.createEmptyMovieClip("_sharePanel", _root.getNextHighestDepth());
_sharePanel._x = 50;
_sharePanel._y = 100;
_local4.loadClip(_shareFolderURL + "share_panel_AS2.swf", _sharePanel);
}
static function getInstance() {
return(instance);
}
function setDepth() {
_sharePanel.swapDepths(_root.getNextHighestDepth());
instance.swapDepths(_root.getNextHighestDepth());
}
function show() {
setDepth();
_sharePanel._visible = true;
_sharePanel.share_mc._visible = true;
_sharePanelStatus = true;
}
function hide() {
_sharePanel._visible = false;
_sharePanel.share_mc._visible = false;
_sharePanelStatus = false;
}
function alternateVisibility() {
if (_sharePanel.share_mc._visible == false) {
_sharePanelStatus = false;
}
if (_sharePanelStatus) {
hide();
} else {
show();
}
}
}
Symbol 285 MovieClip [__Packages.PersonalLeaderBoard] Frame 0
class PersonalLeaderBoard
{
function PersonalLeaderBoard () {
}
function create(sName, nCpid, aNames, aEmails, onCreateHandler, nInitialScore, sGameURL) {
var _local5 = aNames.length - 1;
var _local3 = new LoadVars();
_local3.leaderboardName = sName;
_local3.cpid = nCpid;
_local3.ownerName = aNames[0];
_local3.ownerEmail = aEmails[0];
_local3.friends = _local5;
_local3.gameURL = sGameURL;
var _local2 = 1;
while (_local2 <= _local5) {
_local3["friendName" + _local2] = aNames[_local2];
_local3["friendEmail" + _local2] = aEmails[_local2];
trace("aEmails [i] = " + aEmails[_local2]);
_local2++;
}
if (nInitialScore != undefined) {
_local3.initialScore = nInitialScore;
}
_local3.sendAndLoad(_submitURL + "createLeaderBoard.php", _local3, "POST");
_local3.onLoad = onCreateHandler;
}
function addFriends(nLeaderBoardID, sOwner, aNames, aEmails, onAddFriendsHandler, initialScore, sGameURL) {
var _local4 = aNames.length - 1;
var _local3 = new LoadVars();
_local3.LeaderboardID = nLeaderBoardID;
_local3.friends = _local4;
_local3.ownerName = sOwner;
_local3.gameURL = sGameURL;
if (initialScore != undefined) {
_local3.initialScore = initialScore;
}
var _local2 = 1;
while (_local2 <= _local4) {
_local3["friendName" + _local2] = aNames[_local2];
_local3["friendEmail" + _local2] = aEmails[_local2];
_local2++;
}
_local3.domain = domain;
_local3.sendAndLoad(_submitURL + "addFriends.php", _local3, "POST");
_local3.onLoad = onAddFriendsHandler;
}
function getHighScore(nKeyCode, onLoadHandler, sOrder) {
var _local2 = new LoadVars();
_local2.keycode = nKeyCode;
if (sOrder != undefined) {
_local2.order = sOrder;
}
_local2.sendAndLoad(_submitURL + "getHighscore.php", _local2, "POST");
_local2.root_mc = this;
_local2.onLoad = onLoadHandler;
}
function setHighScore(nKeyCode, nScore, onLoadHandler) {
trace("--entering set high score");
var _local2 = new LoadVars();
_local2.keycode = nKeyCode;
_local2.score = nScore;
_local2.root_mc = this;
_local2.sendAndLoad(_submitURL + "setHighscore.php", _local2, "POST");
_local2.onLoad = onLoadHandler;
}
var _submitURL = "http://www.npbmedia.com/npbhighscores/personalLeaderboard/";
var domain = "knockoffornot.com";
}
Symbol 286 MovieClip [__Packages.counting_cards] Frame 0
class counting_cards extends MovieClip
{
var allCards, timer, _parent;
function counting_cards () {
super();
allCards = new Array();
timer = setInterval(mx.utils.Delegate.create(this, countDown), 1000);
resetTime(true);
}
function clickCard(card) {
selected_cards.push(card);
card.select();
switch (checkTotal(card)) {
case 0 :
break;
case 1 :
resetTime();
break;
case 2 :
resetClicks();
}
}
function countDown() {
trace(this);
if (pauseGame == true) {
return(undefined);
}
time--;
_parent.time_txt.text = time;
if (time <= 0) {
gameOver();
}
}
function addCard(value) {
allCards.push(value);
}
function removeCard(value) {
var _local2 = 0;
while (_local2 < allCards.length) {
if (value == allCards[_local2]) {
allCards.splice(_local2, 1);
break;
}
_local2++;
}
}
function resetTime(firstRun) {
score = score + (time * selected_cards.length);
if ((time * selected_cards.length) > 0) {
var _local9 = _root.getNextHighestDepth();
var _local10 = _root.attachMovie("pointsUp", "points" + _local9, _local9, {_x:_root._xmouse, _y:_root._ymouse});
_local10.points_txt.text = time * selected_cards.length;
_local10.onEnterFrame = function () {
this._alpha = this._alpha - 4;
this._y = this._y - 2;
if (this._alpha <= 0) {
this.swapDepths(this._parent.getNextHighestDepth());
this.removeMovieClip();
}
};
}
time = 11;
resetCards(true);
if ((allCards.length <= 0) && (!firstRun)) {
level = level + 3;
for (var _local8 in this) {
if (this[_local8].isCard) {
this[_local8]._xscale = (this[_local8]._yscale = (this[_local8]._alpha = 0));
this[_local8].init();
}
}
}
if (!firstRun) {
target = 0;
var _local7 = allCards.length + 1;
while (_local7 > allCards.length) {
_local7 = random(4 + level) + 1;
}
var _local4 = new Array();
while (_local4.length < _local7) {
var _local5 = random(allCards.length);
var _local6 = false;
var _local3 = 0;
while (_local3 < _local4.length) {
if (_local4[_local3] == _local5) {
_local6 = true;
break;
}
_local3++;
}
if (!_local6) {
_local4.push(_local5);
target = target + allCards[_local5];
}
}
} else {
target = 10;
}
_parent.target_txt.text = target;
_parent.score_txt.text = score;
}
function checkTotal(card) {
total = total + card.value;
if (total > target) {
return(2);
}
if (total == target) {
return(1);
}
return(0);
}
function resetClicks() {
_parent.target_txt.text = target;
resetCards(false);
}
function resetCards(remove) {
total = 0;
if (remove) {
counted = counted + selected_cards.length;
}
while (selected_cards.length > 0) {
if (remove) {
var _local2 = selected_cards.pop();
removeCard(_local2.value);
_local2.remove();
} else {
selected_cards.pop().deselect();
}
}
_parent.counted_txt.text = counted;
}
function reset() {
pauseGame = false;
resetTime();
}
function restart() {
clearInterval(timer);
_parent.gotoAndStop("how_to_play");
}
function gameOver() {
clearInterval(timer);
_parent.score = score;
_parent.gotoAndStop("game_over");
}
var time = 0;
var total = 0;
var target = 0;
var selected_cards = new Array();
var score = 0;
var counted = 0;
var level = 0;
var pauseGame = false;
}
Symbol 287 MovieClip [__Packages.Card] Frame 0
class Card extends MovieClip
{
var _alpha, _rotation, _xscale, _yscale, selected_mc, _parent, value, gotoAndStop, _currentframe;
function Card () {
super();
init();
}
function onEnterFrame() {
if (!visible) {
if (_alpha > 0) {
_rotation = _rotation + 35;
_alpha = _alpha - 5;
_xscale = (_yscale = _yscale - 5);
}
} else if (_alpha < 100) {
_rotation = _rotation - 35;
_alpha = _alpha + 5;
_xscale = (_yscale = _yscale + 5);
} else if (((_rotation != 0) || (_alpha != 100)) || (_xscale != 100)) {
_rotation = 0;
_xscale = (_yscale = (_alpha = 100));
}
}
function onPress() {
if ((!selected_mc._visible) && (visible)) {
_parent.clickCard(this);
}
}
function select() {
selected_mc._visible = true;
}
function deselect() {
selected_mc._visible = false;
}
function remove() {
visible = false;
}
function init() {
visible = true;
value = Math.ceil(Math.random() * 10);
_parent.addCard(value);
if (value == 1) {
gotoAndStop(13);
}
gotoAndStop(value - 1);
gotoAndStop(_currentframe + (random(4) * 13));
deselect();
}
var visible = true;
var isCard = true;
}
Symbol 42 MovieClip Frame 1
stop();
Symbol 73 MovieClip Frame 1
play_btn.onRelease = function () {
_parent.gotoAndStop("game");
};
if ((_root.keycode == undefined) || (_root.keycode == "")) {
add_btn._visible = false;
scores_btn._visible = false;
} else {
create_txt.text = "";
create_btn._visible = false;
}
create_btn.onRelease = function () {
_parent.gotoAndStop("create");
};
add_btn.onRelease = function () {
_parent.gotoAndStop("add");
};
scores_btn.onRelease = function () {
_parent.gotoAndStop("scores");
};
Symbol 83 MovieClip Frame 13
stop();
instructions_btn.onRelease = function () {
gotoAndStop ("instructions");
_root.trackEvent("FLASH_instructions_viewed");
};
play_btn.onRelease = function () {
play();
_root.share_mc.hide();
};
share_btn.onRelease = function () {
_root.share_mc.alternateVisibility();
_root.trackEvent("FLASH_share_viewed");
};
Symbol 83 MovieClip Frame 25
_parent.gotoAndStop("game");
stop();
Symbol 83 MovieClip Frame 27
play_btn.onRelease = function () {
play();
_root.share_mc.hide();
};
Symbol 83 MovieClip Frame 38
_parent.gotoAndStop("game");
stop();
Symbol 175 MovieClip [cardfront] Frame 1
#initclip 21
Object.registerClass("cardfront", Card);
#endinitclip
stop();
Symbol 175 MovieClip [cardfront] Frame 52
stop();
Symbol 176 MovieClip [_game] Frame 1
#initclip 14
Object.registerClass("_game", counting_cards);
#endinitclip
Symbol 191 MovieClip [MenuItem_IconExit] Frame 1
#initclip 15
Object.registerClass("MenuItem_IconExit", com.npb.controls.Button);
#endinitclip
Symbol 194 MovieClip [btn_restart] Frame 1
#initclip 16
Object.registerClass("btn_restart", com.npb.controls.Button);
#endinitclip
Symbol 197 MovieClip [btn_continue] Frame 1
#initclip 17
Object.registerClass("btn_continue", com.npb.controls.Button);
#endinitclip
Symbol 198 MovieClip Frame 1
stop();
Symbol 198 MovieClip Frame 2
_root.main.main_game.pauseGame = true;
Symbol 198 MovieClip Frame 8
high_btn._visible = !((_root.keycode == "") || (_root.keycode == undefined));
create_btn._visible = (_root.keycode == "") || (_root.keycode == undefined);
Symbol 198 MovieClip Frame 15
exit_btn.onRelease = function () {
play();
_root.share_mc.hide();
_parent.disable_window_mc._visible = false;
};
create_btn.onRelease = function () {
_parent.gotoAndStop("create");
play();
};
restart_btn.onRelease = function () {
_parent.main_game.restart();
_parent.gotoAndStop("game");
_root.share_mc.hide();
_parent.disable_window_mc._visible = false;
play();
};
high_btn.onRelease = function () {
_parent.gotoAndStop("scores");
play();
};
continue_btn.onRelease = function () {
play();
_root.share_mc.hide();
_parent.disable_window_mc._visible = false;
};
share_btn.onRelease = function () {
_root.share_mc.alternateVisibility();
};
stop();
Symbol 198 MovieClip Frame 27
_visible = false;
Symbol 198 MovieClip Frame 31
_root.main.main_game.pauseGame = false;
Symbol 222 MovieClip Frame 1
stop();
Symbol 222 MovieClip Frame 2
_root.main.main_game.pauseGame = true;
Symbol 222 MovieClip Frame 8
high_btn._visible = !((_root.keycode == "") || (_root.keycode == undefined));
create_btn._visible = (_root.keycode == "") || (_root.keycode == undefined);
Symbol 222 MovieClip Frame 15
exit_btn.onRelease = function () {
play();
};
create_btn.onRelease = function () {
_parent.gotoAndStop("create");
play();
};
play_btn.onRelease = function () {
_parent.gotoAndStop("how_to_play");
play();
};
high_btn.onRelease = function () {
_parent.gotoAndStop("scores");
play();
};
send_btn.onRelease = function () {
getURL ("mailto:?subject=Check out this great game&Message=");
};
continue_btn.onRelease = function () {
play();
};
stop();
Symbol 222 MovieClip Frame 27
_visible = false;
Symbol 222 MovieClip Frame 31
_root.main.main_game.pauseGame = false;
Symbol 227 MovieClip [btn_menu] Frame 1
#initclip 18
Object.registerClass("btn_menu", com.npb.controls.Button);
#endinitclip
Symbol 256 MovieClip [btn_send_to_friend] Frame 1
#initclip 19
Object.registerClass("btn_send_to_friend", com.npb.controls.Button);
#endinitclip
Symbol 261 MovieClip [btn_high_score] Frame 1
#initclip 20
Object.registerClass("btn_high_score", com.npb.controls.Button);
#endinitclip
Symbol 264 MovieClip Frame 1
play_btn.onRelease = function () {
_parent.gotoAndStop("game");
};
if ((_root.keycode == undefined) || (_root.keycode == "")) {
add_btn._visible = false;
scores_btn._visible = false;
} else {
create_txt.text = "";
create_btn._visible = false;
}
create_btn.onRelease = function () {
_parent.gotoAndStop("create");
};
add_btn.onRelease = function () {
_parent.gotoAndStop("add");
};
scores_btn.onRelease = function () {
_parent.gotoAndStop("scores");
};
Symbol 278 MovieClip Frame 5
casino_geezer_mc.onRelease = function () {
getURL ("http://www.casinogeezer.com", "_blank");
_root.trackEvent("FLASH_external_link_clicked_casinogeezer_com");
};
casino_geezer_mc.onRollOver = function () {
this.useHandCursor = true;
};
Symbol 278 MovieClip Frame 15
stop();
var score = 0;
Symbol 278 MovieClip Frame 25
stop();
disable_window_mc.onRollOver = function () {
};
disable_window_mc.useHandCursor = false;
disable_window_mc._visible = false;
menu_mc._visible = false;
menu_btn.onPress = function () {
if (menu_mc._visible == false) {
menu_mc.gotoAndPlay(1);
menu_mc._visible = true;
disable_window_mc._visible = true;
}
};
panel_2_mc.casino_geezer_mc.onRelease = function () {
getURL ("http://www.casinogeezer.com", "_blank");
};
panel_2_mc.casino_geezer_mc.onRollOver = function () {
casino_geezer_mc.useHandCursor = true;
};
_root.trackEvent("FLASH_game_played");
Symbol 278 MovieClip Frame 46
function onLoadHandlerGet() {
ds.gotoAndStop("normal");
ds.player_txt.text = this.currentPlayer;
ds.leaderboard_txt.text = this.LeaderboardName;
showScores(this.highScoresText);
}
function showScores(sScores) {
var _local11 = sScores.split("*lineSplit*");
var _local3;
var _local8 = 200;
var _local9 = 50;
var _local7 = 20;
var _local6 = 20;
var _local2 = 0;
_local11.pop();
var _local5 = _local11.length;
nTotalRowsT = _local5;
if (_local5 > 5) {
_local5 = 5;
}
j = -1;
var _local1 = 0;
while (_local1 < _local5) {
j++;
if (j >= _local5) {
break;
}
_local3 = _local11[j].split("*fieldSplit*");
if (_local3[2] == 0) {
_local1--;
} else {
var _local10 = _local3.length;
var _local4 = ds.createTextField("position" + _local5, _local2, 10, (_local7 * _local1) + _local6, _local8, _local9);
_local4.text = _local3[0];
_local4.textColor = 0;
_local2++;
_local4 = ds.createTextField("name" + _local5, _local2, 30, (_local7 * _local1) + _local6, _local8, _local9);
_local4.text = _local3[1];
_local4.textColor = 0;
_local2++;
_local4 = ds.createTextField("score" + _local5, _local2, 290, (_local7 * _local1) + _local6, _local8, _local9);
_local4.text = _local3[2];
_local4.textColor = 0;
if (_local4.text == "9999") {
_local4.text = "0";
}
_local2++;
}
_local1++;
}
}
stop();
_global.scoreSent = true;
if (((_root.keycode != undefined) && (_root.keycode != "")) && (_root.lid != undefined)) {
createLeaderBoard_btn._visible = false;
var pl = new PersonalLeaderBoard();
ds.gotoAndStop("loading");
pl.getHighScore(_root.keycode, onLoadHandlerGet, "DESC");
} else {
ds.gotoAndStop("empty");
addFriends_btn.swapDepths(this.getNextHighestDepth());
addFriends_btn.removeMovieClip();
ds.swapDepths(this.getNextHighestDepth());
ds.removeMovieClip();
}
Symbol 278 MovieClip Frame 53
stop();
var so = SharedObject.getLocal("CountingCards");
if ((so.data.score < score) || (so.data.score == undefined)) {
so.data.score = score;
}
so.flush();
gameover_mc.score_txt.text = score;
gameover_mc.best_txt.text = so.data.score;
var pl = new PersonalLeaderBoard();
pl.setHighScore(_root.keycode, so.data.score, null);