Section 1
//ExternalLinkButton (com.GAME.components.ExternalLinkButton)
package com.GAME.components {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class ExternalLinkButton extends SimpleButton {
public function ExternalLinkButton(_arg1:DisplayObject=null, _arg2:DisplayObject=null, _arg3:DisplayObject=null, _arg4:DisplayObject=null){
super(_arg1, _arg2, _arg3, _arg4);
this.addEventListener(MouseEvent.CLICK, handleClick);
}
private function handleClick(_arg1:MouseEvent):void{
var e = _arg1;
var localDomainLC:LocalConnection = new LocalConnection();
var btnUrl = (("http://www.dressupone.com/?utm_source=" + localDomainLC.domain) + "&utm_medium=game&utm_campaign=yellow-bus-kiss");
var request:URLRequest = new URLRequest(btnUrl);
try {
navigateToURL(request);
} catch(e:Error) {
trace(e);
};
}
}
}//package com.GAME.components
Section 2
//LevelTimer (com.GAME.components.LevelTimer)
package com.GAME.components {
import flash.display.*;
import flash.events.*;
import com.GAME.events.*;
import com.GAME.*;
import flash.utils.*;
import flash.text.*;
public class LevelTimer extends Sprite {
public var text_tf:TextField;
private var nTime:Number;// = 0
private var oTimer:Timer;
private var textTF:TextField;
public function LevelTimer(){
this.textTF = (this.getChildByName("text_tf") as TextField);
this.oTimer = new Timer(1000, 1);
}
public function start():void{
this.oTimer = new Timer(1000, Game.LEVEL_TIME);
this.oTimer.addEventListener(TimerEvent.TIMER, this.handleTimerUpdate);
this.oTimer.addEventListener(TimerEvent.TIMER_COMPLETE, this.handleTimerComplete);
this.oTimer.start();
}
private function handleTimerUpdate(_arg1:TimerEvent):void{
this.nTime++;
this.setValue(this.nTime);
}
private function setValue(_arg1:Number):void{
var _local2:Number = (Game.LEVEL_TIME - _arg1);
var _local3:Number = Math.floor((_local2 / 60));
var _local4:Number = (_local2 - (_local3 * 60));
var _local5:String = ((_local4 < 10)) ? ("0" + _local4) : String(_local4);
textTF.text = ((_local3 + " : ") + _local5);
}
private function handleTimerComplete(_arg1:TimerEvent):void{
this.dispatchEvent(new GameEvent(GameEvent.TIMER_COMPLETE));
}
public function reset():void{
this.oTimer.stop();
this.nTime = 0;
this.setValue(0);
}
public function unpause():void{
this.oTimer.start();
}
public function pause():void{
this.oTimer.stop();
}
}
}//package com.GAME.components
Section 3
//Lives (com.GAME.components.Lives)
package com.GAME.components {
import flash.display.*;
public class Lives extends MovieClip {
public function setValue(_arg1:Number):void{
this.gotoAndStop((4 - _arg1));
}
}
}//package com.GAME.components
Section 4
//Peek (com.GAME.components.Peek)
package com.GAME.components {
import flash.display.*;
import flash.utils.*;
public class Peek extends MovieClip {
public var peek_time:Number;// = 0
private var oTimer:Timer;
public var peeking:Boolean;// = false
public var id:Number;
public function Peek(){
this.stop();
}
}
}//package com.GAME.components
Section 5
//Player (com.GAME.components.Player)
package com.GAME.components {
import flash.display.*;
public class Player extends MovieClip {
public function Player(){
addFrameScript(21, frame22, 26, frame27, 27, frame28);
this.stop();
}
function frame28(){
this.stop();
}
function frame27(){
this.gotoAndStop(1);
}
function frame22(){
this.gotoAndPlay(8);
}
}
}//package com.GAME.components
Section 6
//Progress (com.GAME.components.Progress)
package com.GAME.components {
import flash.display.*;
import flash.events.*;
import com.GAME.events.*;
import com.GAME.DF.*;
import flash.text.*;
public class Progress extends MovieClip {
private var scoreTF:TextField;
public var score_tf:TextField;
public function Progress(){
addFrameScript(581, frame582);
this.stop();
this.scoreTF = (this.getChildByName("score_tf") as TextField);
this.addEventListener(Event.ENTER_FRAME, handleEnterFrame);
}
function frame582(){
this.dispatchEvent(new GameEvent(GameEvent.LEVEL_PROGRESS_COMPLETE));
}
private function handleEnterFrame(_arg1:Event):void{
GameData.instance.lvl_scores = ((this.currentFrame - 1) * 2);
this.scoreTF.text = String((GameData.instance.game_scores + GameData.instance.lvl_scores));
}
}
}//package com.GAME.components
Section 7
//GameData (com.GAME.DF.GameData)
package com.GAME.DF {
public class GameData {
public var game_scores:Number;// = 0
public var lvl_scores:Number;// = 0
public static var instance:GameData = new (GameData);
;
}
}//package com.GAME.DF
Section 8
//GameEvent (com.GAME.events.GameEvent)
package com.GAME.events {
import flash.events.*;
public class GameEvent extends Event {
public static var LEVEL_PROGRESS_COMPLETE:String = "levelProgressComplete";
public static var TIMER_COMPLETE:String = "timerComplete";
public function GameEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
}
}//package com.GAME.events
Section 9
//PeekEvent (com.GAME.events.PeekEvent)
package com.GAME.events {
import flash.events.*;
public class PeekEvent extends Event {
private var nID:Number;
public static var PEEK_START:String = "peekStart";
public static var PEEK_FINISH:String = "peekFinish";
public function PeekEvent(_arg1:String, _arg2:Number, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
this.nID = _arg2;
}
public function get id():Number{
return (nID);
}
}
}//package com.GAME.events
Section 10
//Game (com.GAME.Game)
package com.GAME {
import flash.display.*;
import flash.events.*;
import com.GAME.events.*;
import com.GAME.DF.*;
import com.GAME.components.*;
import flash.utils.*;
import flash.text.*;
public class Game extends Sprite {
private var playBTN:SimpleButton;
private var howtoBTN:SimpleButton;
private var bBusted:Boolean;// = false
private var oTimer:Timer;
private var bRepeatPeek:Boolean;// = false
private var startBTN:SimpleButton;
private var levelTimer:LevelTimer;
private var bKissing:Boolean;// = false
private var progressBar:Progress;
private var howtoCloseBTN:SimpleButton;
private var peek_time:Number;// = 0
public var player_mc:Player;
public var peek0:driver_peek;
private var nLevel:Number;
public var peek2:childpeek_2;
public var peek3:childpeek_3;
private var nLives:Number;// = 3
public var peek1:childpeek_1;
private var action_peeks:Array;
public var peek4:childpeek_4;
private var moreBTN:ExternalLinkButton;
private var action_peek:Number;
private var restartBTN:SimpleButton;
public var lives_mc:Lives;
public var timer_mc:LevelTimer;
public var peek5:childpeek_5;
private var scoresTF:TextField;
public var win_mc:MovieClip;
private var livesMC:Lives;
private var player:Player;
private var bPeek:Boolean;// = false
private var nRepPeekID:Number;// = 0
public var progress_mc:Progress;
private var peeks:Array;
private var winMC:MovieClip;
private static var BUSTED:String = "busted";
public static var LEVEL_TIME:Number = 90;
private static var COMPLETE:String = "complete";
private static var PEEK_INTERVAL:Array = [8, 7, 6, 4, 2];
private static var TIME_UP:String = "time_up";
public function Game(){
var _local2:Peek;
super();
this.winMC = (this.getChildByName("win_mc") as MovieClip);
this.player = (this.getChildByName("player_mc") as Player);
this.levelTimer = (this.getChildByName("timer_mc") as LevelTimer);
this.livesMC = (this.getChildByName("lives_mc") as Lives);
this.progressBar = (this.getChildByName("progress_mc") as Progress);
this.levelTimer.addEventListener(GameEvent.TIMER_COMPLETE, this.handleTimerComplete);
this.progressBar.addEventListener(GameEvent.LEVEL_PROGRESS_COMPLETE, this.handleLevelComplete);
this.progressBar.gotoAndStop(1);
this.peeks = [];
var _local1:int;
while (_local1 < 6) {
_local2 = (this.getChildByName(("peek" + _local1)) as Peek);
_local2.id = _local1;
_local2.addEventListener(PeekEvent.PEEK_START, handlePeekStart);
_local2.addEventListener(PeekEvent.PEEK_FINISH, handlePeekFinish);
this.peeks.push(_local2);
_local1++;
};
this.playBTN = (this.winMC.getChildByName("play_btn") as SimpleButton);
this.restartBTN = (this.winMC.getChildByName("playagain_btn") as SimpleButton);
this.startBTN = (this.winMC.getChildByName("start_btn") as SimpleButton);
this.moreBTN = (this.winMC.getChildByName("more_btn") as ExternalLinkButton);
this.playBTN.addEventListener(MouseEvent.CLICK, this.handlePlay);
this.startBTN.addEventListener(MouseEvent.CLICK, this.handlePlay);
this.restartBTN.addEventListener(MouseEvent.CLICK, this.handleRestart);
this.howtoBTN = (this.winMC.getChildByName("howto_btn") as SimpleButton);
this.howtoCloseBTN = (this.winMC.howto_mc.getChildByName("ok_btn") as SimpleButton);
this.howtoBTN.addEventListener(MouseEvent.CLICK, this.handleHowto);
this.howtoCloseBTN.addEventListener(MouseEvent.CLICK, this.handleHowtoClose);
this.scoresTF = (this.winMC.getChildByName("scores_tf") as TextField);
this.winMC.howto_mc.visible = false;
this.restartBTN.visible = false;
this.playBTN.visible = false;
this.lives = 3;
this.level = 1;
GameData.instance.game_scores = 0;
GameData.instance.lvl_scores = 0;
}
private function shuffle(_arg1:Number, _arg2:Number):Number{
var _local3:Number = (Math.round((Math.random() * 2)) - 1);
return (_local3);
}
private function setupPeeks(_arg1:Number):void{
this.peek_time = _arg1;
if (this.peek_time != 0){
this.oTimer = new Timer(getRandomTime(), 1);
this.oTimer.addEventListener(TimerEvent.TIMER_COMPLETE, this.handlePeekTimerComplete);
this.oTimer.start();
};
}
private function handleHowto(_arg1:MouseEvent):void{
this.winMC.howto_mc.visible = true;
}
private function get level():Number{
return (this.nLevel);
}
private function handleRepeatPeekTimer(_arg1:TimerEvent):void{
this.peeks[this.nRepPeekID].gotoAndPlay("peek");
}
public function unpausePeeks():void{
var _local1:Peek;
for each (_local1 in this.peeks) {
_local1.gotoAndStop("blind");
_local1.peeking = false;
};
if (this.peek_time != 0){
this.oTimer = new Timer(getRandomTime(), 1);
this.oTimer.addEventListener(TimerEvent.TIMER_COMPLETE, this.handlePeekTimerComplete);
this.oTimer.start();
};
}
private function set level(_arg1:Number):void{
GameData.instance.game_scores = (GameData.instance.game_scores + GameData.instance.lvl_scores);
GameData.instance.lvl_scores = 0;
this.winMC.gotoAndStop(_arg1);
this.winMC.visible = true;
this.removeEventListener(MouseEvent.MOUSE_DOWN, this.handleMouseDown);
this.removeEventListener(MouseEvent.MOUSE_UP, this.handleMouseUp);
this.nLevel = _arg1;
this.levelTimer.reset();
this.progressBar.gotoAndStop(1);
this.resetPeeks();
this.setupPeeks(PEEK_INTERVAL[(this.nLevel - 1)]);
this.pausePeeks();
var _local2:Array = [];
this.action_peeks = [this.nLevel];
this.action_peek = 0;
var _local3:int;
while (_local3 < this.nLevel) {
_local2.push(_local3);
_local3++;
};
_local2.sort(shuffle);
var _local4:int;
while (_local4 < _local2.length) {
this.action_peeks.push(_local2[_local4]);
_local4++;
};
if (_arg1 == 1){
scoresTF.text = "";
} else {
scoresTF.text = ("Your score: " + GameData.instance.game_scores);
};
this.startBTN.visible = (this.howtoBTN.visible = (this.howtoCloseBTN.visible = (_arg1 == 1)));
this.playBTN.visible = !((_arg1 == 1));
}
private function handlePeekFinish(_arg1:PeekEvent):void{
var _local2:Peek;
var _local3:Boolean;
var _local4:Timer;
this.bPeek = false;
this.peeks[_arg1.id].peeking = false;
for each (_local2 in this.peeks) {
if (_local2.peeking){
this.bPeek = true;
};
};
_local3 = (Math.random() > 0.7);
if (((_local3) || (this.bRepeatPeek))){
this.setupPeeks(this.peek_time);
this.bRepeatPeek = false;
} else {
this.bRepeatPeek = true;
this.nRepPeekID = _arg1.id;
_local4 = new Timer(350, 1);
_local4.addEventListener(TimerEvent.TIMER_COMPLETE, handleRepeatPeekTimer);
_local4.start();
};
this.peeks[_arg1.id].gotoAndStop("blind");
}
private function handlePeekTimerComplete(_arg1:TimerEvent):void{
var _local2:Number = this.action_peeks[this.action_peek];
this.action_peek = ((this.action_peek == (this.action_peeks.length - 1))) ? 0 : (this.action_peek + 1);
this.peeks[_local2].play();
}
private function handleMouseDown(_arg1:MouseEvent):void{
if (!this.bBusted){
this.bKissing = true;
this.player.gotoAndPlay("kiss");
this.progressBar.play();
if (this.bPeek){
handleBusted();
};
};
}
private function handleLevelComplete(_arg1:GameEvent):void{
if (this.level < 5){
this.level++;
} else {
this.handleGameOver(COMPLETE);
};
}
private function handleGameOver(_arg1:String):void{
var _local2:Number;
this.levelTimer.reset();
this.resetPeeks();
switch (_arg1){
case BUSTED:
_local2 = 7;
scoresTF.y = -100;
break;
case TIME_UP:
_local2 = 8;
scoresTF.y = -30;
break;
case COMPLETE:
_local2 = 6;
break;
};
this.restartBTN.visible = true;
this.startBTN.visible = (this.howtoBTN.visible = (this.howtoCloseBTN.visible = (this.playBTN.visible = false)));
this.winMC.gotoAndStop(_local2);
this.winMC.visible = true;
GameData.instance.game_scores = (GameData.instance.game_scores + GameData.instance.lvl_scores);
scoresTF.text = ("Your score: " + GameData.instance.game_scores);
}
private function handleBustedComplete(_arg1:TimerEvent):void{
this.lives--;
this.bBusted = false;
this.player.gotoAndStop("static");
if (this.lives >= 0){
this.levelTimer.unpause();
this.unpausePeeks();
};
}
private function getRandomTime():Number{
return ((1000 * ((this.peek_time - Math.round((Math.random() * 2))) + 1)));
}
public function pausePeeks():void{
var _local1:Peek;
for each (_local1 in this.peeks) {
_local1.stop();
};
if (this.peek_time != 0){
this.oTimer.stop();
};
}
private function set lives(_arg1:Number):void{
this.nLives = _arg1;
if (this.nLives >= 0){
this.livesMC.setValue(this.nLives);
} else {
this.handleGameOver(BUSTED);
};
}
private function handleTimerComplete(_arg1:GameEvent):void{
this.handleGameOver(TIME_UP);
}
private function handleMouseUp(_arg1:MouseEvent):void{
if (!this.bBusted){
this.bKissing = false;
this.progressBar.stop();
this.player.gotoAndPlay("unkiss");
};
}
private function handleBusted():void{
var _local1:Peek;
var _local2:Timer;
this.levelTimer.pause();
this.bKissing = false;
this.bPeek = false;
this.bBusted = true;
this.progressBar.stop();
this.player.gotoAndStop("busted");
this.pausePeeks();
for each (_local1 in this.peeks) {
if (_local1.peeking){
_local1.gotoAndStop("busted");
};
_local1.peeking = false;
};
_local2 = new Timer(3000, 1);
_local2.addEventListener(TimerEvent.TIMER_COMPLETE, handleBustedComplete);
_local2.start();
}
private function handleRestart(_arg1:MouseEvent):void{
this.resetPeeks();
this.restartBTN.visible = false;
this.playBTN.visible = true;
this.lives = 3;
this.level = 1;
GameData.instance.game_scores = 0;
GameData.instance.lvl_scores = 0;
scoresTF.y = -180;
}
public function resetPeeks():void{
var _local1:Peek;
for each (_local1 in this.peeks) {
_local1.gotoAndStop("blind");
_local1.peeking = false;
};
if (this.oTimer){
this.oTimer.stop();
};
this.peek_time = 0;
}
private function get lives():Number{
return (this.nLives);
}
private function handleHowtoClose(_arg1:MouseEvent):void{
this.winMC.howto_mc.visible = false;
}
private function handlePlay(_arg1:MouseEvent):void{
this.winMC.visible = false;
this.howtoCloseBTN.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
this.levelTimer.start();
this.unpausePeeks();
this.player.gotoAndStop("static");
this.addEventListener(MouseEvent.MOUSE_DOWN, this.handleMouseDown);
this.addEventListener(MouseEvent.MOUSE_UP, this.handleMouseUp);
}
private function handlePeekStart(_arg1:PeekEvent):void{
this.peeks[_arg1.id].peeking = true;
this.bPeek = true;
if (this.bKissing){
handleBusted();
};
}
}
}//package com.GAME
Section 11
//heartspop_32 (yellow_fla.heartspop_32)
package yellow_fla {
import flash.display.*;
public dynamic class heartspop_32 extends MovieClip {
public function heartspop_32(){
addFrameScript(86, frame87);
}
function frame87(){
gotoAndPlay(44);
}
}
}//package yellow_fla
Section 12
//mc_main_0014_19 (yellow_fla.mc_main_0014_19)
package yellow_fla {
import flash.display.*;
public dynamic class mc_main_0014_19 extends MovieClip {
public function mc_main_0014_19(){
addFrameScript(34, frame35);
}
function frame35(){
stop();
}
}
}//package yellow_fla
Section 13
//preloader_1 (yellow_fla.preloader_1)
package yellow_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public dynamic class preloader_1 extends MovieClip {
public var percent_tf:TextField;
public var bar:MovieClip;
public var s1:MovieClip;
public var s2:MovieClip;
public function preloader_1(){
addFrameScript(85, frame86, 190, frame191, 200, frame201);
}
function frame86(){
s2.mask = s1;
s1.cacheAsBitmap = true;
s2.cacheAsBitmap = true;
}
function frame201(){
stop();
}
function frame191(){
this.dispatchEvent(new Event(Event.COMPLETE));
}
}
}//package yellow_fla
Section 14
//AVATAR_kiss (AVATAR_kiss)
package {
import flash.display.*;
import flash.events.*;
import com.GAME.*;
import flash.net.*;
import flash.system.*;
public class AVATAR_kiss extends MovieClip {
private var bLoadComplete:Boolean;// = false
public var preloader_mc:MovieClip;
private var preloaderMC:MovieClip;
private var bShowComplete:Boolean;// = false
public function AVATAR_kiss(){
var _local1:Game;
var _local2:Object;
var _local3:URLLoader;
super();
if (Security){
_local2 = Security;
if (_local2.sandboxType != "localWithFile"){
_local3 = new URLLoader();
_local3.load(new URLRequest("http://www.britetrade.com/api/gameplay.php?key=8a99758c3fe46c09cd9effaea5b8a8de&id=32"));
};
};
this.stop();
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, handleLoading);
this.preloaderMC = (this.getChildByName("preloader_mc") as MovieClip);
this.preloaderMC.addEventListener(Event.COMPLETE, handleShowComplete);
}
private function handleLoading(_arg1:ProgressEvent):void{
var _local2:Number = Math.round(((_arg1.bytesLoaded / _arg1.bytesTotal) * 100));
this.preloaderMC.percent_tf.text = _local2;
if (_local2 == 100){
bLoadComplete = true;
this.checkPreconditions();
};
}
private function handleShowComplete(_arg1:Event):void{
bShowComplete = true;
this.preloaderMC.stop();
this.checkPreconditions();
}
private function checkPreconditions():void{
if (((bShowComplete) && (bLoadComplete))){
this.gotoAndStop(2);
} else {
if (bShowComplete){
};
};
this.preloaderMC.play();
}
}
}//package
Section 15
//btnns0109 (btnns0109)
package {
import com.GAME.components.*;
public dynamic class btnns0109 extends ExternalLinkButton {
}
}//package
Section 16
//btnss02 (btnss02)
package {
import com.GAME.components.*;
public dynamic class btnss02 extends ExternalLinkButton {
}
}//package
Section 17
//childpeek_1 (childpeek_1)
package {
import com.GAME.events.*;
import com.GAME.components.*;
public dynamic class childpeek_1 extends Peek {
public function childpeek_1(){
addFrameScript(30, frame31, 83, frame84);
}
function frame84(){
this.dispatchEvent(new PeekEvent(PeekEvent.PEEK_FINISH, this.id));
}
function frame31(){
this.dispatchEvent(new PeekEvent(PeekEvent.PEEK_START, this.id));
}
}
}//package
Section 18
//childpeek_2 (childpeek_2)
package {
import com.GAME.events.*;
import com.GAME.components.*;
public dynamic class childpeek_2 extends Peek {
public function childpeek_2(){
addFrameScript(21, frame22, 62, frame63);
}
function frame63(){
this.dispatchEvent(new PeekEvent(PeekEvent.PEEK_FINISH, this.id));
}
function frame22(){
this.dispatchEvent(new PeekEvent(PeekEvent.PEEK_START, this.id));
}
}
}//package
Section 19
//childpeek_3 (childpeek_3)
package {
import com.GAME.events.*;
import com.GAME.components.*;
public dynamic class childpeek_3 extends Peek {
public function childpeek_3(){
addFrameScript(17, frame18, 58, frame59);
}
function frame59(){
this.dispatchEvent(new PeekEvent(PeekEvent.PEEK_FINISH, this.id));
}
function frame18(){
this.dispatchEvent(new PeekEvent(PeekEvent.PEEK_START, this.id));
}
}
}//package
Section 20
//childpeek_4 (childpeek_4)
package {
import com.GAME.events.*;
import com.GAME.components.*;
public dynamic class childpeek_4 extends Peek {
public function childpeek_4(){
addFrameScript(19, frame20, 59, frame60);
}
function frame20(){
this.dispatchEvent(new PeekEvent(PeekEvent.PEEK_START, this.id));
}
function frame60(){
this.dispatchEvent(new PeekEvent(PeekEvent.PEEK_FINISH, this.id));
}
}
}//package
Section 21
//childpeek_5 (childpeek_5)
package {
import com.GAME.events.*;
import com.GAME.components.*;
public dynamic class childpeek_5 extends Peek {
public function childpeek_5(){
addFrameScript(17, frame18, 58, frame59);
}
function frame59(){
this.dispatchEvent(new PeekEvent(PeekEvent.PEEK_FINISH, this.id));
}
function frame18(){
this.dispatchEvent(new PeekEvent(PeekEvent.PEEK_START, this.id));
}
}
}//package
Section 22
//driver_peek (driver_peek)
package {
import com.GAME.events.*;
import com.GAME.components.*;
public dynamic class driver_peek extends Peek {
public function driver_peek(){
addFrameScript(18, frame19, 69, frame70);
}
function frame19(){
this.dispatchEvent(new PeekEvent(PeekEvent.PEEK_START, this.id));
}
function frame70(){
this.dispatchEvent(new PeekEvent(PeekEvent.PEEK_FINISH, this.id));
}
}
}//package
Section 23
//incentive (incentive)
package {
import com.GAME.components.*;
public dynamic class incentive extends ExternalLinkButton {
}
}//package
Section 24
//lodsin (lodsin)
package {
import flash.media.*;
public dynamic class lodsin extends Sound {
}
}//package
Section 25
//moregames (moregames)
package {
import com.GAME.components.*;
public dynamic class moregames extends ExternalLinkButton {
}
}//package
Section 26
//topbtn (topbtn)
package {
import com.GAME.components.*;
public dynamic class topbtn extends ExternalLinkButton {
}
}//package