STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229595
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2595 · P5190

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/97505491?noj=FRM97505491-22DC" width="1" height="1"></div>

Christmas Threes.swf

This is the info page for
Flash #47829

(Click the ID number above for more basic data on this flash file.)


Text
XMASUP

Loading....

this is you
(cursor)

<< prev

next >>

Your the new intern
at the Christmas
Tree Division of
Santa Claus Inc.

Your job is to help
people feel Christmas
by transforming
small plants into
Christmas Trees

Objects that make
the trees grow
float down
from above

Spread them evenly
among the plants to
grow three
beautiful trees.

Next comes the
lights & decors,
guide them properly
to make your trees
more attractive

the more attractive
your tree is,
the more people
notice it and raise
their christmas spirits

Birds and Balloons
mess up your
arrangements.
So, pop or drive them
away before they touch
the floating objects

Now, go and
make Santa
proud!

S

M

T

I

R

H

C

THR33S

Start Game

choose difficulty

Easy

Medium

Hard

How to Play

More Games

Highscores

0

Menu

Christmas
Spirit

Christmas
Score

Distribute
objects
floating down equally among
the 3 trees to make them grow
fully into majestic
Christmas trees!
-
pop balloons & drive birds
away for an easier time

Close

Resume game

Restart Game

Main Menu

ActionScript [AS3]

Section 1
//MochiAdsAPIHandler (Cavalcade.APIHandler.MochiAdsAPIHandler) package Cavalcade.APIHandler { import flash.display.*; import flash.events.*; import Cavalcade.Utilities.*; import mochi.*; import flash.system.*; public class MochiAdsAPIHandler extends EventDispatcher { protected var _mochiServicesContainer:MovieClip; protected var _container:DisplayObjectContainer; protected var _active:Boolean;// = false private var _connected:Boolean;// = false protected var _gameId:String; protected var _defaultBoardId:String; public static const EVENT_BOARD_CLOSE:String = "event_board_close"; public static const EVENT_BOARD_DISPLAY:String = "event_board_display"; public function submitScore(_arg1:int, _arg2:String=""):Boolean{ var score = _arg1; var boardId = _arg2; if (!_connected){ return (false); }; if (boardId == ""){ boardId = _defaultBoardId; }; trace(("boardId " + boardId)); trace(("score " + score)); Security.allowDomain("www.mochiads.com"); Security.allowDomain("x.mochiads.com"); try { bringContainerToTop(); MochiScores.showLeaderboard({boardID:boardId, score:score, previewScores:true, showTableRank:true}); } catch(e:Error) { return (false); }; return (true); } public function get connected():Boolean{ return (_connected); } protected function onLeaderBoardDisplay():void{ dispatchEvent(new Event(EVENT_BOARD_DISPLAY)); } public function showLeaderboard(_arg1:String=""):Boolean{ if (!_connected){ return (false); }; if (_arg1 == ""){ _arg1 = _defaultBoardId; }; bringContainerToTop(); MochiScores.showLeaderboard({boardID:_arg1, onDisplay:onLeaderBoardDisplay, onClose:onLeaderBoardClose}); return (true); } protected function bringContainerToTop():void{ if ((((_mochiServicesContainer == null)) || ((_container == null)))){ return; }; _container.addChild(_mochiServicesContainer); } public function connect(_arg1:DisplayObjectContainer):Boolean{ var container = _arg1; if (!_active){ trace("<MochiAdsAPIHelper> Connect aborted. Mochi-Services is turned off in settings."); _connected = false; return (false); }; try { _container = container; Utilities.removeChildFromContainer(_mochiServicesContainer); _mochiServicesContainer = new MovieClip(); _container.addChild(_mochiServicesContainer); Security.allowDomain("www.mochiads.com"); Security.allowDomain("x.mochiads.com"); MochiServices.connect(_gameId, _mochiServicesContainer, onConnectError); _connected = true; } catch(e:Error) { trace(("<MochiAdsAPIHelper Error> " + e.message)); _connected = false; }; return (_connected); } protected function onLeaderBoardClose():void{ dispatchEvent(new Event(EVENT_BOARD_CLOSE)); } public function onConnectError(_arg1:String):void{ trace(("<MochiAdsAPIHelper ConnectError> " + _arg1)); _connected = false; } } }//package Cavalcade.APIHandler
Section 2
//Controller (Cavalcade.Controller.Controller) package Cavalcade.Controller { public class Controller { protected var _model; public function Controller(_arg1){ _model = _arg1; } } }//package Cavalcade.Controller
Section 3
//IStepEventHandler (Cavalcade.Controller.IStepEventHandler) package Cavalcade.Controller { import Cavalcade.Event.*; import Cavalcade.Interface.*; public interface IStepEventHandler { function setStepEventDispatcher(_arg1:IStepEventDispatcher):void; function onStepEvent(_arg1:StepEvent):void; } }//package Cavalcade.Controller
Section 4
//StepController (Cavalcade.Controller.StepController) package Cavalcade.Controller { import Cavalcade.Event.*; import Cavalcade.Interface.*; public class StepController implements IStepEventHandler { protected var _model:IStep; public function StepController(_arg1:IStep){ _model = _arg1; } public function setStepEventDispatcher(_arg1:IStepEventDispatcher):void{ _arg1.addStepEventHandler(onStepEvent, false, 0, true); } public function onStepEvent(_arg1:StepEvent):void{ _model.step(_arg1.elapsedTime); } } }//package Cavalcade.Controller
Section 5
//EngineEvent (Cavalcade.Event.EngineEvent) package Cavalcade.Event { import flash.events.*; public class EngineEvent extends Event { public static const RESUME:String = "engine_event_resume"; public static const PAUSE:String = "engine_event_pause"; public function EngineEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function toString():String{ return (formatToString("EngineEvent", "type", "bubbles", "cancelable", "eventPhase")); } override public function clone():Event{ return (new EngineEvent(type, bubbles, cancelable)); } } }//package Cavalcade.Event
Section 6
//MenuEvent (Cavalcade.Event.MenuEvent) package Cavalcade.Event { import flash.events.*; public class MenuEvent extends Event { private var _menuItemName:String; public static const MENUITEM_CLICK:String = "menu_item_click"; public function MenuEvent(_arg1:String, _arg2:String=""){ super(_arg1, false, false); _menuItemName = _arg2; } public function set menuItemName(_arg1:String):void{ _menuItemName = _arg1; } public function get menuItemName():String{ return (_menuItemName); } } }//package Cavalcade.Event
Section 7
//ScoreEvent (Cavalcade.Event.ScoreEvent) package Cavalcade.Event { import flash.events.*; public class ScoreEvent extends Event { private var _score:Number; private var _total:Number; public static const DOWN:String = "down"; public static const UP:String = "up"; public static const RESET:String = "reset"; public function ScoreEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } public function get total():Number{ return (_total); } public function set total(_arg1:Number):void{ _total = _arg1; } public function get score():Number{ return (_score); } public function set score(_arg1:Number):void{ _score = _arg1; } } }//package Cavalcade.Event
Section 8
//StepEvent (Cavalcade.Event.StepEvent) package Cavalcade.Event { import flash.events.*; public class StepEvent extends Event { private var _elapsedTime:int; public static const STEP:String = "engine_event_step"; public function StepEvent(_arg1:String, _arg2:int){ var _local3:Boolean; var _local4:Boolean; super(_arg1, _local3, _local4); _elapsedTime = _arg2; } public function get elapsedTime():int{ return (_elapsedTime); } override public function toString():String{ return (formatToString("StepEvent", "type", "bubbles", "cancelable", "eventPhase")); } public function set elapsedTime(_arg1:int):void{ _elapsedTime = _arg1; } } }//package Cavalcade.Event
Section 9
//IActiveState (Cavalcade.Interface.IActiveState) package Cavalcade.Interface { public interface IActiveState { function activate():void; function deactivate():void; function get active():Boolean; } }//package Cavalcade.Interface
Section 10
//IDestructor (Cavalcade.Interface.IDestructor) package Cavalcade.Interface { public interface IDestructor { function destroy():void; } }//package Cavalcade.Interface
Section 11
//IDisposable (Cavalcade.Interface.IDisposable) package Cavalcade.Interface { public interface IDisposable { function dispose():void; } }//package Cavalcade.Interface
Section 12
//IFinished (Cavalcade.Interface.IFinished) package Cavalcade.Interface { public interface IFinished { function get finished():Boolean; } }//package Cavalcade.Interface
Section 13
//IHitTest (Cavalcade.Interface.IHitTest) package Cavalcade.Interface { public interface IHitTest { function hitTestPoint(_arg1:Number, _arg2:Number):Boolean; } }//package Cavalcade.Interface
Section 14
//IPause (Cavalcade.Interface.IPause) package Cavalcade.Interface { public interface IPause { function get paused():Boolean; function resume():Boolean; function pause():Boolean; } }//package Cavalcade.Interface
Section 15
//IScoreEventDispatcher (Cavalcade.Interface.IScoreEventDispatcher) package Cavalcade.Interface { public interface IScoreEventDispatcher { function addScoreEventHandler(_arg1:Function, _arg2:Boolean=false, _arg3:int=0, _arg4:Boolean=true):void; } }//package Cavalcade.Interface
Section 16
//IStartStop (Cavalcade.Interface.IStartStop) package Cavalcade.Interface { public interface IStartStop { function get started():Boolean; function stop():void; function start():void; } }//package Cavalcade.Interface
Section 17
//IStep (Cavalcade.Interface.IStep) package Cavalcade.Interface { public interface IStep { function step(_arg1:int):void; } }//package Cavalcade.Interface
Section 18
//IStepEventDispatcher (Cavalcade.Interface.IStepEventDispatcher) package Cavalcade.Interface { public interface IStepEventDispatcher { function removeStepEventHandler(_arg1:Function, _arg2:Boolean=false):void; function dispatchStepEvent(_arg1:int):void; function addStepEventHandler(_arg1:Function, _arg2:Boolean=false, _arg3:int=0, _arg4:Boolean=true):void; } }//package Cavalcade.Interface
Section 19
//LevelModel (Cavalcade.Model.LevelModel) package Cavalcade.Model { import Cavalcade.Interface.*; public class LevelModel implements IStep, IStartStop { private var _started:Boolean;// = false private var _lives:int;// = 0 private var _timeLeft:int; private var _allowedTime:int; private var _difficulty:int;// = 2 private var _levelNumber:int;// = 1 private var _livesLeft:int; public static const DIFFICULTY_NORMAL:int = 2; public static const DIFFICULTY_EASY:int = 1; public static const DIFFICULTY_HARD:int = 3; public function get started():Boolean{ return (_started); } public function get lives():int{ return (_lives); } public function stop():void{ if (!_started){ return; }; _started = false; } public function step(_arg1:int):void{ if (!_started){ return; }; if (_timeLeft > 0){ _timeLeft = (_timeLeft - _arg1); if (_timeLeft < 0){ _timeLeft = 0; }; }; } public function set lives(_arg1:int):void{ _lives = _arg1; } public function get allowedTime():int{ return (_allowedTime); } public function set levelNumber(_arg1:int):void{ _levelNumber = _arg1; } public function set livesLeft(_arg1:int):void{ _livesLeft = _arg1; } public function start():void{ if (_started){ return; }; _timeLeft = _allowedTime; _livesLeft = _lives; _started = true; } public function set allowedTime(_arg1:int):void{ _allowedTime = _arg1; } public function get levelNumber():int{ return (_levelNumber); } public function get livesLeft():int{ return (_livesLeft); } public function set difficulty(_arg1:int):void{ _difficulty = _arg1; } public function get difficulty():int{ return (_difficulty); } } }//package Cavalcade.Model
Section 20
//ParticleModel (Cavalcade.Model.ParticleModel) package Cavalcade.Model { import flash.geom.*; import flash.events.*; import Cavalcade.Interface.*; import Cavalcade.Utilities.*; public class ParticleModel extends EventDispatcher implements IStep { protected var _activeForce:Point; private var _originalLocation:Point; private var _activeImpulseApplied:Point; protected var _gravity:Point; protected var _activeImpulse:Point; protected var _location:Point; protected var _friction:Number;// = 0 protected var _mass:Number; protected var _rotation:Number;// = 0 private var _targetLocation:Point; protected var _dispatchChangeEvent:Boolean;// = true private static const IMPULSE_DURATION:Number = 200; public function ParticleModel(){ _gravity = new Point(0, 0); _location = new Point(0, 0); super(); } public function get activeForce():Point{ return (_activeForce); } public function get gravity():Point{ return (_gravity); } protected function stepActiveForce(_arg1:int):void{ var _local2:Point = _activeForce.clone(); _local2.x = (_local2.x * 0.1); _local2.y = (_local2.y * 0.1); _activeForce = _activeForce.subtract(_local2); if ((((Math.abs(_activeForce.x) <= 3)) && ((Math.abs(_activeForce.y) <= 3)))){ _activeForce = null; }; var _local3:Point = _local2.clone(); _local3.x = (_local3.x * _friction); _local3.y = (_local3.y * _friction); _local2 = _local2.subtract(_local3); var _local4:Point = location.clone(); location.clone().x = (_local4.x + _local2.x); _local4.y = (_local4.y + _local2.y); _location = _local4; if (_local2.x > 0){ _rotation = (_rotation + (_local2.x + _local2.y)); } else { if (_local2.x < 0){ _rotation = (_rotation - (_local2.x + _local2.y)); }; }; } public function get activeImpulse():Point{ return (_activeImpulse); } public function step(_arg1:int):void{ if (_activeImpulse != null){ stepActiveImpulse(_arg1); } else { if (_activeForce != null){ stepActiveForce(_arg1); }; }; _rotation = (_rotation + (_friction * 10)); if (_rotation > 360){ _rotation = (_rotation % 360); }; var _local2:Point = _gravity.clone(); _local2.x = (_local2.x * (_arg1 / Time.SECOND)); _local2.y = (_local2.y * (_arg1 / Time.SECOND)); _local2.y = (_local2.y + (_mass / _gravity.y)); _location = _location.add(_local2); if (_dispatchChangeEvent){ dispatchEvent(new Event(Event.CHANGE)); }; } public function set gravity(_arg1:Point):void{ _gravity = _arg1; } public function applyForce(_arg1:Point):void{ _activeForce = _arg1; } protected function stepActiveImpulse(_arg1:int):void{ var _local2:Point = _activeImpulse.clone(); _local2.x = (_local2.x * (_arg1 / IMPULSE_DURATION)); _local2.y = (_local2.y * (_arg1 / IMPULSE_DURATION)); if (_activeImpulse.x < 0){ if ((_activeImpulseApplied.x + _local2.x) < _activeImpulse.x){ _local2.x = (_activeImpulse.x - _activeImpulseApplied.x); }; } else { if ((_activeImpulseApplied.x + _local2.x) > _activeImpulse.x){ _local2.x = (_activeImpulse.x - _activeImpulseApplied.x); }; }; if (_activeImpulse.y < 0){ if ((_activeImpulseApplied.y + _local2.y) < _activeImpulse.y){ _local2.y = (_activeImpulse.y - _activeImpulseApplied.y); }; } else { if ((_activeImpulseApplied.y + _local2.y) > _activeImpulse.y){ _local2.y = (_activeImpulse.y - _activeImpulseApplied.y); }; }; if ((((_activeImpulseApplied.x == 0)) && ((_activeImpulseApplied.y == 0)))){ _activeImpulseApplied = _local2.clone(); } else { _activeImpulseApplied = PointHelper.coordinateAdd(_activeImpulseApplied, _local2); }; var _local3:Number = (_friction * (_arg1 / Time.SECOND)); var _local4:Point = new Point(_local3, _local3); if (Math.abs(_local2.x) < _local3){ _local4.x = _local2.x; }; if (Math.abs(_local2.y) < _local3){ _local4.y = _local2.y; }; _local2 = PointHelper.coordinateSubtract(_local2, _local4); _location = _location.add(_local2); if (PointHelper.equal(_activeImpulseApplied, _activeImpulse)){ _activeImpulse = null; }; } public function applyImpulse(_arg1:Point):void{ _activeImpulse = _arg1; _targetLocation = _location.add(_activeImpulse); _originalLocation = _location.clone(); _activeImpulseApplied = new Point(0, 0); } public function set mass(_arg1:Number):void{ _mass = _arg1; } public function set friction(_arg1:Number):void{ _friction = _arg1; } public function get location():Point{ return (_location); } public function setLocation(_arg1:Point):void{ _location = _arg1; if (_dispatchChangeEvent){ dispatchEvent(new Event(Event.CHANGE)); }; } public function get friction():Number{ return (_friction); } public function get mass():Number{ return (_mass); } public function set rotation(_arg1:Number):void{ _rotation = _arg1; } public function get rotation():Number{ return (_rotation); } } }//package Cavalcade.Model
Section 21
//PreloaderModel (Cavalcade.Model.PreloaderModel) package Cavalcade.Model { import flash.display.*; import flash.events.*; public class PreloaderModel extends EventDispatcher { private var _loaderInfo:LoaderInfo; private var _percentComplete:Number;// = 0 public function PreloaderModel(_arg1:DisplayObjectContainer){ _loaderInfo = _arg1.loaderInfo; _loaderInfo.addEventListener(ProgressEvent.PROGRESS, onLoaderInfoProgress, false, 0, true); _loaderInfo.addEventListener(Event.COMPLETE, onLoaderInfoComplete, false, 0, true); } public function get percentComplete():Number{ return (_percentComplete); } private function onLoaderInfoComplete(_arg1:Event):void{ _loaderInfo.removeEventListener(ProgressEvent.PROGRESS, onLoaderInfoProgress); _loaderInfo.removeEventListener(Event.COMPLETE, onLoaderInfoComplete); dispatchEvent(new Event(Event.CHANGE)); dispatchEvent(new Event(Event.COMPLETE)); } private function onLoaderInfoProgress(_arg1:ProgressEvent):void{ _percentComplete = ((_arg1.bytesLoaded / _arg1.bytesTotal) * 100); dispatchEvent(new Event(Event.CHANGE)); } } }//package Cavalcade.Model
Section 22
//ScoreModel (Cavalcade.Model.ScoreModel) package Cavalcade.Model { import flash.events.*; import Cavalcade.Event.*; import Cavalcade.Interface.*; public class ScoreModel extends EventDispatcher { private var _total:Number;// = 0 private var _scoreSource:IScoreEventDispatcher; public function ScoreModel(_arg1:IScoreEventDispatcher){ _scoreSource = _arg1; _scoreSource.addScoreEventHandler(onScoreEvent); } public function get total():Number{ return (_total); } private function onScoreEvent(_arg1:ScoreEvent):void{ _total = _arg1.total; dispatchEvent(new Event(Event.CHANGE)); } public function set total(_arg1:Number):void{ _total = _arg1; } } }//package Cavalcade.Model
Section 23
//SoundManager (Cavalcade.SoundManager.SoundManager) package Cavalcade.SoundManager { import flash.events.*; import Cavalcade.Interface.*; import flash.media.*; import Cavalcade.Utilities.*; public class SoundManager extends EventDispatcher implements IActiveState { private var _muted:Boolean;// = false private var _sounds:Array; private var _soundsTrash:Array; private var _active:Boolean;// = true public function SoundManager(){ _sounds = []; _soundsTrash = []; super(); } public function stop(_arg1:String):void{ var _local2:SoundManagerItem = findItem(_arg1); if (_local2 == null){ return; }; _local2.stop(); } public function deactivate():void{ var _local1:SoundManagerItem; if (!_active){ return; }; for each (_local1 in _sounds) { _local1.deactivate(); }; _active = false; dispatchEvent(new SoundManagerEvent(SoundManagerEvent.ACTIVE_STATE_CHANGED)); } public function update():void{ cleanTrash(); } public function pauseAll():void{ var _local1:SoundManagerItem; for each (_local1 in _sounds) { _local1.pause(); }; } public function play(_arg1:String, _arg2:String="", _arg3:Number=0, _arg4:int=0, _arg5:SoundTransform=null):SoundManagerItem{ if (!_active){ return (null); }; if (_arg2 == ""){ _arg2 = _arg1; }; var _local6:SoundManagerItem = findItem(_arg2); if (_local6 == null){ _local6 = new SoundManagerItem(); _local6.id = _arg2; _local6.soundName = _arg1; _local6.soundTransform = _arg5; _local6.startTime = _arg3; _local6.loops = _arg4; _local6.sound = createSound(_arg1); _sounds.push(_local6); }; _local6.play(); if (((_muted) && (!(_local6.muted)))){ _local6.mute(); } else { if (((!(_muted)) && (_local6.muted))){ _local6.unMute(); }; }; return (_local6); } public function get active():Boolean{ return (_active); } public function itemExists(_arg1:String):Boolean{ var _local2:SoundManagerItem = findItem(_arg1); return (!((_local2 == null))); } public function toggleMute():void{ var _local1:SoundManagerItem; for each (_local1 in _sounds) { _local1.toggleMute(); }; _muted = !(_muted); } private function addToTrash(_arg1:SoundManagerItem):void{ } public function deleteItem(_arg1:SoundManagerItem):void{ _arg1 = ArrayHelper.popItem(_sounds, _arg1); if (_arg1 != null){ addToTrash(_arg1); }; } public function get muted():Boolean{ return (_muted); } public function findItem(_arg1:String):SoundManagerItem{ var _local2:SoundManagerItem; for each (_local2 in _sounds) { if (_local2.id == _arg1){ return (_local2); }; }; return (null); } private function cleanTrash():void{ } public function activate():void{ var _local1:SoundManagerItem; if (_active){ return; }; for each (_local1 in _sounds) { _local1.activate(); }; _active = true; dispatchEvent(new SoundManagerEvent(SoundManagerEvent.ACTIVE_STATE_CHANGED)); } public function createSound(_arg1:String):Sound{ throw (new Error("The function createSound should be overridden.")); } public function resumeAll():void{ var _local1:SoundManagerItem; if (!_active){ return; }; for each (_local1 in _sounds) { _local1.resume(); }; } public function stopAll():void{ var _local1:SoundManagerItem; for each (_local1 in _sounds) { _local1.stop(); }; } } }//package Cavalcade.SoundManager
Section 24
//SoundManagerEvent (Cavalcade.SoundManager.SoundManagerEvent) package Cavalcade.SoundManager { import flash.events.*; public class SoundManagerEvent extends Event { public static const ACTIVE_STATE_CHANGED:String = "activate_state_changed"; public function SoundManagerEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function toString():String{ return (formatToString("SoundManagerEvent", "type", "bubbles", "cancelable", "eventPhase")); } override public function clone():Event{ return (new SoundManagerEvent(type, bubbles, cancelable)); } public function get soundManager():SoundManager{ return (SoundManager(this.target)); } } }//package Cavalcade.SoundManager
Section 25
//SoundManagerItem (Cavalcade.SoundManager.SoundManagerItem) package Cavalcade.SoundManager { import flash.events.*; import Cavalcade.Interface.*; import flash.media.*; public class SoundManagerItem implements IPause, IActiveState { private var _sound:Sound; private var _active:Boolean; private var _id:String; private var _soundName:String; private var _lastPosition:Number;// = 0 private var _soundTransform:SoundTransform; private var _channel:SoundChannel; private var _paused:Boolean; private var _startTime:Number;// = 0 private var _volumeBeforeMute:Number;// = 0 private var _loops:int;// = 0 private var _muted:Boolean;// = false private var _playing:Boolean; public function SoundManagerItem(){ activate(); } public function stop():void{ stopAndDestroyChannel(); _paused = false; _playing = false; } public function get channel():SoundChannel{ return (_channel); } public function set channel(_arg1:SoundChannel):void{ _channel = _arg1; } public function deactivate():void{ stop(); _active = false; } public function get active():Boolean{ return (_active); } public function get sound():Sound{ return (_sound); } public function toggleMute():void{ if (_muted){ unMute(); } else { mute(); }; } public function mute():Boolean{ if (((_muted) || (!(_playing)))){ return (false); }; var _local1:SoundTransform = _channel.soundTransform; _volumeBeforeMute = _local1.volume; _local1.volume = 0; _channel.soundTransform = _local1; _muted = true; return (true); } public function get volume():Number{ return (_channel.soundTransform.volume); } public function get id():String{ return (_id); } public function get soundTransform():SoundTransform{ return (_soundTransform); } public function set startTime(_arg1:Number):void{ _startTime = _arg1; } public function set sound(_arg1:Sound):void{ _sound = _arg1; } public function resume():Boolean{ if (((((!(_paused)) || (!(_active)))) || (_playing))){ return (false); }; _paused = false; _playing = true; try { _channel = _sound.play(_lastPosition, _loops, _soundTransform); if (_channel != null){ _channel.addEventListener(Event.SOUND_COMPLETE, onSoundComplete, false, 0, true); }; } catch(e:Error) { _playing = false; }; return (true); } public function get playing():Boolean{ return (_playing); } public function play():void{ if (_playing){ return; }; if (!_active){ return; }; try { _channel = _sound.play(_startTime, _loops, _soundTransform); _channel.addEventListener(Event.SOUND_COMPLETE, onSoundComplete, false, 0, true); _playing = true; _paused = false; if (_muted){ _muted = false; mute(); }; } catch(e:Error) { _playing = false; _paused = false; _muted = false; }; } public function set loops(_arg1:int):void{ _loops = _arg1; } public function get paused():Boolean{ return (_paused); } public function set soundTransform(_arg1:SoundTransform):void{ _soundTransform = _arg1; } public function set id(_arg1:String):void{ _id = _arg1; } public function get soundName():String{ return (_soundName); } public function get loops():int{ return (_loops); } public function unMute():Boolean{ if (((!(_muted)) || (!(_playing)))){ return (false); }; var _local1:SoundTransform = _channel.soundTransform; _local1.volume = _volumeBeforeMute; _channel.soundTransform = _local1; _muted = false; return (true); } public function get startTime():Number{ return (_startTime); } public function decreaseVolume(_arg1:Number):void{ var _local2:SoundTransform = _channel.soundTransform; _local2.volume = (_local2.volume - _arg1); _channel.soundTransform = _local2; } private function onSoundComplete(_arg1:Event):void{ stop(); } public function get muted():Boolean{ return (_muted); } public function activate():void{ _active = true; } public function set soundName(_arg1:String):void{ _soundName = _arg1; } public function pause():Boolean{ if (((_paused) || (!(_playing)))){ return (false); }; if (_channel != null){ _lastPosition = _channel.position; stopAndDestroyChannel(); }; _paused = true; _playing = false; return (true); } public function destroy():void{ stop(); _sound = null; } public function increaseVolume(_arg1:Number):void{ var _local2:SoundTransform = _channel.soundTransform; _local2.volume = (_local2.volume + _arg1); _channel.soundTransform = _local2; } private function stopAndDestroyChannel():void{ if (_channel == null){ return; }; _channel.stop(); _channel.removeEventListener(Event.SOUND_COMPLETE, onSoundComplete); } } }//package Cavalcade.SoundManager
Section 26
//ArrayHelper (Cavalcade.Utilities.ArrayHelper) package Cavalcade.Utilities { public class ArrayHelper { public static function popItem(_arg1:Array, _arg2){ var _local3:int = _arg1.indexOf(_arg2); if (_local3 < 0){ return (null); }; return (ArrayHelper.popItemAt(_arg1, _local3)); } public static function clone(_arg1:Array):Array{ return (null); } public static function popItemAt(_arg1:Array, _arg2:int){ if (_arg1.length <= _arg2){ return (null); }; var _local3:* = _arg1[_arg2]; _arg1.splice(_arg2, 1); return (_local3); } } }//package Cavalcade.Utilities
Section 27
//DebugHelper (Cavalcade.Utilities.DebugHelper) package Cavalcade.Utilities { import flash.display.*; import flash.geom.*; import flash.utils.*; public class DebugHelper { public static function createRectangle(_arg1:DisplayObjectContainer, _arg2:Rectangle):Sprite{ var _local3:Sprite = new Sprite(); _arg1.addChild(_local3); _local3.graphics.lineStyle(0, 0xFF0000); _local3.graphics.drawRect(_arg2.x, _arg2.y, _arg2.width, _arg2.height); return (_local3); } public static function createCircle(_arg1:Point, _arg2:DisplayObjectContainer, _arg3:uint=0xFF00):Sprite{ var _local4:Sprite = new Sprite(); _local4.graphics.beginFill(_arg3); _local4.graphics.drawCircle(_arg1.x, _arg1.y, 10); _arg2.addChild(_local4); return (_local4); } public static function log(_arg1:String, _arg2:String="", _arg3:String="", _arg4:String=""):void{ var _local5 = (getTimer().toString() + " <"); if (_arg4 != ""){ _local5 = (_local5 + (_arg4 + "|")); }; if (_arg3 != ""){ _local5 = (_local5 + (_arg3 + "|")); }; if (_arg2 != ""){ _local5 = (_local5 + _arg2); }; _local5 = StringHelper.trimBack(_local5, "|"); _local5 = (_local5 + "> "); _local5 = (_local5 + _arg1); trace(_local5); } } }//package Cavalcade.Utilities
Section 28
//MathEx (Cavalcade.Utilities.MathEx) package Cavalcade.Utilities { public class MathEx { public static function absoluteAdd(_arg1:Number, _arg2:Number):Number{ return ((Math.abs(_arg1) + Math.abs(_arg2))); } public static function random(_arg1:int, _arg2:int):int{ return ((Math.floor((Math.random() * (_arg2 - _arg1))) + _arg1)); } public static function absoluteDifference(_arg1:Number, _arg2:Number):Number{ if (_arg1 >= _arg2){ return ((_arg1 - _arg2)); }; return ((_arg2 - _arg1)); } } }//package Cavalcade.Utilities
Section 29
//PointHelper (Cavalcade.Utilities.PointHelper) package Cavalcade.Utilities { import flash.geom.*; public class PointHelper { public static function coordinateAdd(_arg1:Point, _arg2:Point):Point{ if (_arg1.x >= 0){ _arg1.x = (_arg1.x + Math.abs(_arg2.x)); } else { _arg1.x = (_arg1.x - Math.abs(_arg2.x)); }; if (_arg1.y >= 0){ _arg1.y = (_arg1.y + Math.abs(_arg2.y)); } else { _arg1.y = (_arg1.y - Math.abs(_arg2.y)); }; return (_arg1); } public static function equal(_arg1:Point, _arg2:Point):Boolean{ if ((((_arg1.x == _arg2.x)) && ((_arg1.y == _arg2.y)))){ return (true); }; return (false); } public static function coordinateSubtract(_arg1:Point, _arg2:Point):Point{ if (_arg1.x >= 0){ _arg1.x = (_arg1.x - Math.abs(_arg2.x)); } else { _arg1.x = (_arg1.x + Math.abs(_arg2.x)); }; if (_arg1.y >= 0){ _arg1.y = (_arg1.y - Math.abs(_arg2.y)); } else { _arg1.y = (_arg1.y + Math.abs(_arg2.y)); }; return (_arg1); } public static function absoluteEqual(_arg1:Point, _arg2:Point):Boolean{ if ((((Math.abs(_arg1.x) == Math.abs(_arg2.x))) && ((Math.abs(_arg1.y) == Math.abs(_arg2.y))))){ return (true); }; return (false); } } }//package Cavalcade.Utilities
Section 30
//StringHelper (Cavalcade.Utilities.StringHelper) package Cavalcade.Utilities { public class StringHelper { public static function trimBack(_arg1:String, _arg2:String):String{ _arg2 = stringToCharacter(_arg2); if (_arg1.charAt((_arg1.length - 1)) == _arg2){ _arg1 = trimBack(_arg1.substring(0, (_arg1.length - 1)), _arg2); }; return (_arg1); } public static function trim(_arg1:String, _arg2:String=" "):String{ return (trimBack(trimFront(_arg1, _arg2), _arg2)); } public static function replace(_arg1:String, _arg2:String, _arg3:String):String{ return (_arg1.split(_arg2).join(_arg3)); } public static function stringToCharacter(_arg1:String):String{ if (_arg1.length == 1){ return (_arg1); }; return (_arg1.slice(0, 1)); } public static function trimFront(_arg1:String, _arg2:String):String{ _arg2 = stringToCharacter(_arg2); if (_arg1.charAt(0) == _arg2){ _arg1 = trimFront(_arg1.substring(1), _arg2); }; return (_arg1); } } }//package Cavalcade.Utilities
Section 31
//Time (Cavalcade.Utilities.Time) package Cavalcade.Utilities { public class Time { public static const SECOND:int = 1000; } }//package Cavalcade.Utilities
Section 32
//Utilities (Cavalcade.Utilities.Utilities) package Cavalcade.Utilities { import flash.display.*; public class Utilities { public static function urlIsInDomainList(_arg1:String, _arg2:Array):Boolean{ var _local3:Number = (_arg1.indexOf("://") + 3); var _local4:Number = _arg1.indexOf("/", _local3); var _local5:String = _arg1.substring(_local3, _local4); var _local6:Number = (_local5.lastIndexOf(".") - 1); var _local7:Number = (_local5.lastIndexOf(".", _local6) + 1); _local5 = _local5.substring(_local7, _local5.length); trace(("url: " + _arg1)); trace(("domain: " + _local5)); if (_arg2.lastIndexOf(_local5) >= 0){ return (true); }; return (false); } public static function getCurrentUrl(_arg1:Stage):String{ return (_arg1.loaderInfo.url); } public static function removeChildFromContainer(_arg1:DisplayObject):Boolean{ var child = _arg1; if (child == null){ return (false); }; if (child.parent == null){ return (false); }; try { child.parent.removeChild(child); return (true); } catch(e:Error) { return (false); }; return (true); } } }//package Cavalcade.Utilities
Section 33
//ComponentView (Cavalcade.View.ComponentView) package Cavalcade.View { import flash.display.*; import flash.events.*; import Cavalcade.Interface.*; public class ComponentView extends Sprite implements IStep { protected var _model:Object; protected var _controller:Object; public function ComponentView(_arg1:Object, _arg2:Object=null){ _model = _arg1; _controller = _arg2; } public function get model():Object{ return (_model); } public function get controller():Object{ return (_controller); } public function destruct():void{ _model = null; _controller = null; } public function update(_arg1:Event=null):void{ } public function step(_arg1:int):void{ } } }//package Cavalcade.View
Section 34
//CompositeView (Cavalcade.View.CompositeView) package Cavalcade.View { import flash.events.*; public class CompositeView extends ComponentView { protected var _views:Array; public function CompositeView(_arg1:Object=null, _arg2:Object=null){ _views = []; super(_arg1, _arg2); } override public function update(_arg1:Event=null):void{ var _local2:ComponentView; for each (_local2 in _views) { _local2.update(); }; } public function removeAllViews():void{ var _local1:ComponentView; for each (_local1 in _views) { removeChild(_local1); }; _views = []; } public function addView(_arg1:ComponentView, _arg2:int=-1):void{ if (_arg2 >= 0){ addChildAt(_arg1, _arg2); } else { addChild(_arg1); }; _views.push(_arg1); } public function removeView(_arg1:ComponentView):void{ removeChild(_arg1); if (_views.indexOf(_arg1) >= 0){ _views.splice(_views.indexOf(_arg1), 1); }; } } }//package Cavalcade.View
Section 35
//MenuItem (Cavalcade.View.MenuItem) package Cavalcade.View { public class MenuItem { private var _name:String; private var _displayObjectName:String; public function set name(_arg1:String):void{ _name = _arg1; } public function set displayObjectName(_arg1:String):void{ _displayObjectName = _arg1; } public function get name():String{ return (_name); } public function get displayObjectName():String{ return (_displayObjectName); } } }//package Cavalcade.View
Section 36
//MenuView (Cavalcade.View.MenuView) package Cavalcade.View { import flash.display.*; import flash.events.*; import Cavalcade.Event.*; public class MenuView extends ComponentView { private var _menuItems:Array; public function MenuView(_arg1:Object=null, _arg2:Object=null){ _menuItems = []; super(_arg1, _arg2); } protected function prepareMenuItem(_arg1:Object, _arg2:String):void{ var _local3:Object; if (menuItemNameExists(_arg2)){ return; }; if ((_arg1 is SimpleButton)){ _local3 = _arg1; } else { _local3 = _arg1; _local3.buttonMode = true; }; _local3.addEventListener(MouseEvent.CLICK, onMenuItemDisplayClick, false, 0, true); var _local4:MenuItem = new MenuItem(); _local4.displayObjectName = _local3.name; _local4.name = _arg2; _menuItems.push(_local4); } public function removeMenuItemClickListener(_arg1:Function):void{ removeEventListener(MenuEvent.MENUITEM_CLICK, _arg1); } protected function onMenuItemDisplayClick(_arg1:MouseEvent):void{ var _local2:MenuItem = getMenuItemFromDisplayName(DisplayObject(_arg1.target).name); if (_local2 != null){ dispatchMenuItemClickEvent(_local2.name); }; } private function menuItemNameExists(_arg1:String):Boolean{ var _local2:MenuItem; for each (_local2 in _menuItems) { if (_local2.name == _arg1){ return (true); }; }; return (false); } public function addMenuItemClickListener(_arg1:Function):void{ addEventListener(MenuEvent.MENUITEM_CLICK, _arg1, false, 0, true); } private function getMenuItemFromDisplayName(_arg1:String):MenuItem{ var _local2:MenuItem; for each (_local2 in _menuItems) { if (_local2.displayObjectName == _arg1){ return (_local2); }; }; return (null); } protected function dispatchMenuItemClickEvent(_arg1:String):void{ var _local2:MenuEvent = new MenuEvent(MenuEvent.MENUITEM_CLICK, _arg1); dispatchEvent(_local2); } } }//package Cavalcade.View
Section 37
//ParticleManagerView (Cavalcade.View.ParticleManagerView) package Cavalcade.View { import Cavalcade.Event.*; import Cavalcade.Interface.*; public class ParticleManagerView extends CompositeView implements IStep, IActiveState, IDestructor { protected var _active:Boolean;// = true private var _stepEventDispatcher:IStepEventDispatcher; public function ParticleManagerView(_arg1:IStepEventDispatcher){ _stepEventDispatcher = _arg1; _stepEventDispatcher.addStepEventHandler(onStepHandler); } public function activate():void{ if (_active){ return; }; _active = true; } public function get active():Boolean{ return (_active); } public function deactivate():void{ if (!_active){ return; }; _active = false; } public function destroy():void{ _stepEventDispatcher.removeStepEventHandler(onStepHandler); _stepEventDispatcher = null; } override public function step(_arg1:int):void{ var _local2:IStep; for each (_local2 in _views) { _local2.step(_arg1); }; } private function onStepHandler(_arg1:StepEvent):void{ step(_arg1.elapsedTime); } } }//package Cavalcade.View
Section 38
//PreloaderView (Cavalcade.View.PreloaderView) package Cavalcade.View { import flash.events.*; import Cavalcade.Model.*; public class PreloaderView extends ComponentView { public function PreloaderView(_arg1:PreloaderModel){ super(_arg1, null); _arg1.addEventListener(Event.CHANGE, onModelChange, false, 0, true); _arg1.addEventListener(Event.COMPLETE, onModelComplete, false, 0, true); } protected function onModelChange(_arg1:Event):void{ } protected function onModelComplete(_arg1:Event):void{ var _local2:PreloaderModel = PreloaderModel(_model); _local2.removeEventListener(Event.CHANGE, onModelChange); _local2.removeEventListener(Event.COMPLETE, onModelComplete); dispatchEvent(new Event(Event.COMPLETE)); } } }//package Cavalcade.View
Section 39
//ScoreView (Cavalcade.View.ScoreView) package Cavalcade.View { import flash.events.*; import Cavalcade.Model.*; public class ScoreView extends ComponentView { public function ScoreView(_arg1:ScoreModel){ super(_arg1); _arg1.addEventListener(Event.CHANGE, update, false, 0, true); } override public function update(_arg1:Event=null):void{ super.update(_arg1); } } }//package Cavalcade.View
Section 40
//Bootstrap (Cavalcade.Bootstrap) package Cavalcade { import flash.display.*; import Cavalcade.View.*; import flash.events.*; import Cavalcade.Utilities.*; public class Bootstrap extends MovieClip { private var _allowedDomains:Array; private var _domainLockActive:Boolean;// = true private var _preloader:PreloaderView; public function Bootstrap(){ _allowedDomains = []; super(); stop(); addEventListener(Event.ADDED_TO_STAGE, onAddToStage, false, 0, true); } private function onAddToStage(_arg1:Event):void{ removeEventListener(Event.ADDED_TO_STAGE, onAddToStage); initialize(); } public function get allowedDomains():Array{ return (_allowedDomains); } public function set domainLockActive(_arg1:Boolean):void{ _domainLockActive = _arg1; } protected function initialize():void{ var _local1:String; if (_domainLockActive){ _local1 = Utilities.getCurrentUrl(this.stage); if (!Utilities.urlIsInDomainList(_local1, _allowedDomains)){ showDomainLockError(); return; }; }; _preloader = createPreloader(); if (_preloader != null){ _preloader.addEventListener(Event.COMPLETE, onPreloaderComplete, false, 0, true); addChild(_preloader); }; } public function get domainLockActive():Boolean{ return (_domainLockActive); } protected function createPreloader():PreloaderView{ return (null); } protected function showDomainLockError():void{ } public function set allowedDomains(_arg1:Array):void{ _allowedDomains = _arg1; } protected function onPreloaderComplete(_arg1:Event):void{ removeChild(_preloader); } } }//package Cavalcade
Section 41
//Engine (Cavalcade.Engine) package Cavalcade { import flash.display.*; import flash.events.*; import Cavalcade.Event.*; import Cavalcade.Interface.*; import flash.utils.*; public class Engine extends Sprite implements IPause, IStepEventDispatcher { private var _started:Boolean;// = false private var _lastTimeLog:int;// = 0 private var _paused:Boolean; public function Engine(){ addEventListener(Event.ADDED_TO_STAGE, onAddToStage, false, 0, true); } public function pause():Boolean{ if (_paused){ return (false); }; _paused = true; dispatchEvent(new EngineEvent(EngineEvent.PAUSE)); return (true); } protected function step(_arg1:int):void{ dispatchStepEvent(_arg1); } protected function initialize():void{ } public function stop():Boolean{ if (!_started){ return (false); }; removeEventListener(Event.ENTER_FRAME, onEnterFrame); _started = false; return (true); } public function dispatchStepEvent(_arg1:int):void{ if (!_paused){ dispatchEvent(new StepEvent(StepEvent.STEP, _arg1)); }; } public function removeStepEventHandler(_arg1:Function, _arg2:Boolean=false):void{ removeEventListener(StepEvent.STEP, _arg1, _arg2); } private function onAddToStage(_arg1:Event):void{ removeEventListener(Event.ADDED_TO_STAGE, onAddToStage); initialize(); } public function start():Boolean{ if (_started){ return (false); }; initializeElapsedTime(); addEventListener(Event.ENTER_FRAME, onEnterFrame, false, 0, true); _started = true; return (true); } private function onEnterFrame(_arg1:Event):void{ var _local2:int = getElapsedTime(); step(_local2); } public function get paused():Boolean{ return (_paused); } private function initializeElapsedTime():void{ _lastTimeLog = getTimer(); } private function getElapsedTime():int{ var _local1:int; if (_lastTimeLog == 0){ _local1 = 0; } else { _local1 = (getTimer() - _lastTimeLog); }; _lastTimeLog = getTimer(); return (_local1); } public function resume():Boolean{ if (!_paused){ return (false); }; _paused = false; dispatchEvent(new EngineEvent(EngineEvent.RESUME)); return (true); } public function addStepEventHandler(_arg1:Function, _arg2:Boolean=false, _arg3:int=0, _arg4:Boolean=true):void{ addEventListener(StepEvent.STEP, _arg1, _arg2, _arg3, _arg4); } } }//package Cavalcade
Section 42
//SimplePoint (Cavalcade.SimplePoint) package Cavalcade { public class SimplePoint { private var _x:Number; private var _y:Number; public function SimplePoint(_arg1:Number, _arg2:Number){ _x = _arg1; _y = _arg2; } public function set x(_arg1:Number):void{ _x = _arg1; } public function get y():Number{ return (_y); } public function get x():Number{ return (_x); } public function set y(_arg1:Number):void{ _y = _arg1; } } }//package Cavalcade
Section 43
//SWFProfiler (com.flashdynamix.utils.SWFProfiler) package com.flashdynamix.utils { import flash.display.*; import flash.events.*; import flash.net.*; import flash.utils.*; import flash.ui.*; import flash.system.*; public class SWFProfiler { private static var started:Boolean = false; private static var initTime:int; public static var memList:Array = []; public static var history:int = 60; private static var itvTime:int; public static var minMem:Number; public static var fpsList:Array = []; private static var frameCount:int; private static var totalCount:int; private static var inited:Boolean = false; public static var minFps:Number; public static var maxMem:Number; private static var displayed:Boolean = false; public static var maxFps:Number; private static var currentTime:int; private static var frame:Sprite; private static var ci:ContextMenuItem; private static var content:ProfilerContent; private static var stage:Stage; private static function addEvent(_arg1:EventDispatcher, _arg2:String, _arg3:Function):void{ _arg1.addEventListener(_arg2, _arg3, false, 0, true); } public static function stop():void{ if (!started){ return; }; started = false; removeEvent(frame, Event.ENTER_FRAME, draw); } public static function get averageFps():Number{ return ((totalCount / runningTime)); } public static function init(_arg1:Stage, _arg2:InteractiveObject):void{ if (inited){ return; }; inited = true; stage = _arg1; content = new ProfilerContent(); frame = new Sprite(); minFps = Number.MAX_VALUE; maxFps = Number.MIN_VALUE; minMem = Number.MAX_VALUE; maxMem = Number.MIN_VALUE; var _local3:ContextMenu = new ContextMenu(); _local3.hideBuiltInItems(); ci = new ContextMenuItem("Show Profiler", true); addEvent(ci, ContextMenuEvent.MENU_ITEM_SELECT, onSelect); _local3.customItems = [ci]; _arg2.contextMenu = _local3; start(); } public static function get currentMem():Number{ return (((System.totalMemory / 0x0400) / 1000)); } private static function get runningTime():Number{ return (((currentTime - initTime) / 1000)); } private static function get intervalTime():Number{ return (((currentTime - itvTime) / 1000)); } private static function resize(_arg1:Event):void{ content.update(runningTime, minFps, maxFps, minMem, maxMem, currentFps, currentMem, averageFps, fpsList, memList, history); } private static function updateDisplay():void{ updateMinMax(); content.update(runningTime, minFps, maxFps, minMem, maxMem, currentFps, currentMem, averageFps, fpsList, memList, history); } private static function onSelect(_arg1:ContextMenuEvent):void{ if (!displayed){ show(); } else { hide(); }; } public static function get currentFps():Number{ return ((frameCount / intervalTime)); } private static function hide():void{ ci.caption = "Show Profiler"; displayed = false; removeEvent(stage, Event.RESIZE, resize); stage.removeChild(content); } private static function draw(_arg1:Event):void{ currentTime = getTimer(); frameCount++; totalCount++; if (intervalTime >= 1){ if (displayed){ updateDisplay(); } else { updateMinMax(); }; fpsList.unshift(currentFps); memList.unshift(currentMem); if (fpsList.length > history){ fpsList.pop(); }; if (memList.length > history){ memList.pop(); }; itvTime = currentTime; frameCount = 0; }; } private static function updateMinMax():void{ minFps = Math.min(currentFps, minFps); maxFps = Math.max(currentFps, maxFps); minMem = Math.min(currentMem, minMem); maxMem = Math.max(currentMem, maxMem); } public static function gc():void{ try { new LocalConnection().connect("foo"); new LocalConnection().connect("foo"); } catch(e:Error) { }; } public static function start():void{ if (started){ return; }; started = true; initTime = (itvTime = getTimer()); totalCount = (frameCount = 0); addEvent(frame, Event.ENTER_FRAME, draw); } private static function removeEvent(_arg1:EventDispatcher, _arg2:String, _arg3:Function):void{ _arg1.removeEventListener(_arg2, _arg3); } private static function show():void{ ci.caption = "Hide Profiler"; displayed = true; addEvent(stage, Event.RESIZE, resize); stage.addChild(content); updateDisplay(); } } }//package com.flashdynamix.utils import flash.display.*; import flash.events.*; import flash.text.*; class ProfilerContent extends Sprite { private var maxFpsTxtBx:TextField; private var minMemTxtBx:TextField; private var fps:Shape; private var box:Shape; private var minFpsTxtBx:TextField; private var maxMemTxtBx:TextField; private var infoTxtBx:TextField; private var mb:Shape; private function ProfilerContent():void{ fps = new Shape(); mb = new Shape(); box = new Shape(); this.mouseChildren = false; this.mouseEnabled = false; fps.x = 65; fps.y = 45; mb.x = 65; mb.y = 90; var _local1:TextFormat = new TextFormat("_sans", 9, 0xAAAAAA); infoTxtBx = new TextField(); infoTxtBx.autoSize = TextFieldAutoSize.LEFT; infoTxtBx.defaultTextFormat = new TextFormat("_sans", 11, 0xCCCCCC); infoTxtBx.y = 98; minFpsTxtBx = new TextField(); minFpsTxtBx.autoSize = TextFieldAutoSize.LEFT; minFpsTxtBx.defaultTextFormat = _local1; minFpsTxtBx.x = 7; minFpsTxtBx.y = 37; maxFpsTxtBx = new TextField(); maxFpsTxtBx.autoSize = TextFieldAutoSize.LEFT; maxFpsTxtBx.defaultTextFormat = _local1; maxFpsTxtBx.x = 7; maxFpsTxtBx.y = 5; minMemTxtBx = new TextField(); minMemTxtBx.autoSize = TextFieldAutoSize.LEFT; minMemTxtBx.defaultTextFormat = _local1; minMemTxtBx.x = 7; minMemTxtBx.y = 83; maxMemTxtBx = new TextField(); maxMemTxtBx.autoSize = TextFieldAutoSize.LEFT; maxMemTxtBx.defaultTextFormat = _local1; maxMemTxtBx.x = 7; maxMemTxtBx.y = 50; addChild(box); addChild(infoTxtBx); addChild(minFpsTxtBx); addChild(maxFpsTxtBx); addChild(minMemTxtBx); addChild(maxMemTxtBx); addChild(fps); addChild(mb); this.addEventListener(Event.ADDED_TO_STAGE, added, false, 0, true); this.addEventListener(Event.REMOVED_FROM_STAGE, removed, false, 0, true); } private function added(_arg1:Event):void{ resize(); stage.addEventListener(Event.RESIZE, resize, false, 0, true); } private function removed(_arg1:Event):void{ stage.removeEventListener(Event.RESIZE, resize); } private function resize(_arg1:Event=null):void{ var _local2:Graphics = box.graphics; _local2.clear(); _local2.beginFill(0, 0.5); _local2.drawRect(0, 0, stage.stageWidth, 120); _local2.lineStyle(1, 0xFFFFFF, 0.2); _local2.moveTo(65, 45); _local2.lineTo(65, 10); _local2.moveTo(65, 45); _local2.lineTo((stage.stageWidth - 15), 45); _local2.moveTo(65, 90); _local2.lineTo(65, 55); _local2.moveTo(65, 90); _local2.lineTo((stage.stageWidth - 15), 90); _local2.endFill(); infoTxtBx.x = ((stage.stageWidth - infoTxtBx.width) - 20); } public function update(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Array, _arg10:Array, _arg11:int):void{ var _local19:Number; if (_arg1 >= 1){ minFpsTxtBx.text = (_arg2.toFixed(3) + " Fps"); maxFpsTxtBx.text = (_arg3.toFixed(3) + " Fps"); minMemTxtBx.text = (_arg4.toFixed(3) + " Mb"); maxMemTxtBx.text = (_arg5.toFixed(3) + " Mb"); }; infoTxtBx.text = (((((("Current Fps " + _arg6.toFixed(3)) + " | Average Fps ") + _arg8.toFixed(3)) + " | Memory Used ") + _arg7.toFixed(3)) + " Mb"); infoTxtBx.x = ((stage.stageWidth - infoTxtBx.width) - 20); var _local12:Graphics = fps.graphics; _local12.clear(); _local12.lineStyle(1, 0x33FF00, 0.7); var _local13:int; var _local14:int = _arg9.length; var _local15 = 35; var _local16:int = (stage.stageWidth - 80); var _local17:Number = (_local16 / (_arg11 - 1)); var _local18:Number = (_arg3 - _arg2); _local13 = 0; while (_local13 < _local14) { _local19 = ((_arg9[_local13] - _arg2) / _local18); if (_local13 == 0){ _local12.moveTo(0, (-(_local19) * _local15)); } else { _local12.lineTo((_local13 * _local17), (-(_local19) * _local15)); }; _local13++; }; _local12 = mb.graphics; _local12.clear(); _local12.lineStyle(1, 26367, 0.7); _local13 = 0; _local14 = _arg10.length; _local18 = (_arg5 - _arg4); _local13 = 0; while (_local13 < _local14) { _local19 = ((_arg10[_local13] - _arg4) / _local18); if (_local13 == 0){ _local12.moveTo(0, (-(_local19) * _local15)); } else { _local12.lineTo((_local13 * _local17), (-(_local19) * _local15)); }; _local13++; }; } }
Section 44
//GameMochiAdsAPIHandler (Game.APIHandler.GameMochiAdsAPIHandler) package Game.APIHandler { import Cavalcade.APIHandler.*; public class GameMochiAdsAPIHandler extends MochiAdsAPIHandler { private static var _instance:GameMochiAdsAPIHandler; public function GameMochiAdsAPIHandler(){ _active = true; _gameId = "ac196e425df107cf"; _defaultBoardId = "c2dfc48565f35080"; } public static function get instance():GameMochiAdsAPIHandler{ if (_instance == null){ _instance = new (GameMochiAdsAPIHandler); }; return (_instance); } } }//package Game.APIHandler
Section 45
//CursorSpeakController (Game.Controller.CursorSpeakController) package Game.Controller { import flash.geom.*; import Game.Model.*; import flash.events.*; import Cavalcade.Interface.*; import Cavalcade.Controller.*; public class CursorSpeakController extends Controller implements IDisposable { private var _limits:Array; private var _mouseEventSource:EventDispatcher; public function CursorSpeakController(_arg1:CursorSpeakModel){ super(_arg1); } public function initialize(_arg1:EventDispatcher, _arg2:Array=null):void{ _mouseEventSource = _arg1; _mouseEventSource.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove, false, 0, true); _limits = _arg2; } public function dispose():void{ if (_mouseEventSource != null){ _mouseEventSource.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove); _mouseEventSource = null; }; } private function onMouseMove(_arg1:MouseEvent):void{ if (_limits == null){ cursorSpeakModel.setLocation(_arg1.stageX, _arg1.stageY); } else { if (_limits.containsPoint(new Point(_arg1.stageX, _arg1.stageY))){ cursorSpeakModel.visible = false; } else { cursorSpeakModel.setLocation(_arg1.stageX, _arg1.stageY); cursorSpeakModel.visible = true; }; }; } private function get cursorSpeakModel():CursorSpeakModel{ return (CursorSpeakModel(_model)); } } }//package Game.Controller
Section 46
//PointerForceController (Game.Controller.PointerForceController) package Game.Controller { import flash.display.*; import flash.geom.*; import Game.Model.*; import flash.events.*; import Cavalcade.Interface.*; import Cavalcade.Controller.*; public class PointerForceController extends StepController implements IDestructor, IPause { private var _limits:Rectangle; private var _paused:Boolean;// = false private var _stage:Stage; public function PointerForceController(_arg1:PointerForceModel, _arg2:Stage, _arg3:Rectangle=null){ super(_arg1); _arg2.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove, false, 0, true); _arg2.addEventListener(MouseEvent.MOUSE_DOWN, onMouseClick, false, 0, true); _stage = _arg2; _limits = _arg3; pointerForceModel.visible = true; } public function destroy():void{ _stage.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove); _stage.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseClick); _stage = null; } private function onMouseClick(_arg1:MouseEvent):void{ if (_paused){ return; }; pointerForceModel.shoot(new Point(_arg1.stageX, _arg1.stageY)); } public function resume():Boolean{ if (!_paused){ return (false); }; _paused = false; pointerForceModel.visible = true; return (true); } public function get paused():Boolean{ return (_paused); } private function onMouseMove(_arg1:MouseEvent):void{ if (_paused){ return; }; if (_limits.containsPoint(new Point(_arg1.stageX, _arg1.stageY))){ pointerForceModel.visible = false; } else { pointerForceModel.location = new Point(_arg1.stageX, _arg1.stageY); pointerForceModel.visible = true; }; } private function get pointerForceModel():PointerForceModel{ return (PointerForceModel(_model)); } public function pause():Boolean{ if (_paused){ return (false); }; _paused = true; pointerForceModel.visible = false; return (true); } } }//package Game.Controller
Section 47
//EntityManagerEvent (Game.Event.EntityManagerEvent) package Game.Event { import Game.Model.*; import Game.Model.Entities.*; import flash.events.*; public class EntityManagerEvent extends Event { private var _entity:EntityModel; private var _vacuum:IVacuum; public static const BALLOON_HIT:String = "balloon_hit"; public static const ENTITY_ABSORBED:String = "entity_absorbed"; public static const NEW_ENTITY:String = "new_entity"; public static const ENTITY_QUEUE_EMPTY:String = "entity_queue_empty"; public static const BIRD_HIT:String = "bird_hit"; public function EntityManagerEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } public function get entity():EntityModel{ return (_entity); } public function get vacuum():IVacuum{ return (_vacuum); } public function set entity(_arg1:EntityModel):void{ _entity = _arg1; } public function set vacuum(_arg1:IVacuum):void{ _vacuum = _arg1; } override public function toString():String{ return (formatToString("EntityManagerEvent", "type", "bubbles", "cancelable", "eventPhase")); } override public function clone():Event{ return (new EntityManagerEvent(type, bubbles, cancelable)); } } }//package Game.Event
Section 48
//GameEngineEvent (Game.Event.GameEngineEvent) package Game.Event { import flash.events.*; public class GameEngineEvent extends Event { private var _christmasSpirit:Number;// = 0 private var _totalScore:Number;// = 0 public static const FINISHED:String = "finished"; public function GameEngineEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } public function get christmasSpirit():Number{ return (_christmasSpirit); } public function set christmasSpirit(_arg1:Number):void{ _christmasSpirit = _arg1; } public function set totalScore(_arg1:Number):void{ _totalScore = _arg1; } override public function toString():String{ return (formatToString("GameEngineEvent", "type", "bubbles", "cancelable", "eventPhase")); } override public function clone():Event{ return (new GameEngineEvent(type, bubbles, cancelable)); } public function get totalScore():Number{ return (_totalScore); } } }//package Game.Event
Section 49
//PersonEvent (Game.Event.PersonEvent) package Game.Event { import flash.events.*; public class PersonEvent extends Event { private var _balloonLocationX:Number; private var _balloonColor:String; private var _balloonLocationY:Number; public static const ADMIRE:String = "admire"; public static const BALLOON_RELEASED:String = "balloon_release"; public function PersonEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } public function get balloonColor():String{ return (_balloonColor); } public function set balloonLocationY(_arg1:Number):void{ _balloonLocationY = _arg1; } override public function toString():String{ return (formatToString("PersonEvent", "type", "bubbles", "cancelable", "eventPhase")); } public function set balloonLocationX(_arg1:Number):void{ _balloonLocationX = _arg1; } public function get balloonLocationX():Number{ return (_balloonLocationX); } public function get balloonLocationY():Number{ return (_balloonLocationY); } public function set balloonColor(_arg1:String):void{ _balloonColor = _arg1; } override public function clone():Event{ var _local1:PersonEvent = new PersonEvent(type, bubbles, cancelable); _local1.balloonLocationX = _balloonLocationX; _local1.balloonLocationY = _balloonLocationY; _local1.balloonColor = _balloonColor; return (_local1); } } }//package Game.Event
Section 50
//PointerActionEvent (Game.Event.PointerActionEvent) package Game.Event { import flash.events.*; public class PointerActionEvent extends Event { public static const CHANGE:String = "change"; public function PointerActionEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function toString():String{ return (formatToString("PointerActionEvent", "type", "bubbles", "cancelable", "eventPhase")); } override public function clone():Event{ return (new PointerActionEvent(type, bubbles, cancelable)); } } }//package Game.Event
Section 51
//PointerForceEvent (Game.Event.PointerForceEvent) package Game.Event { import flash.geom.*; import flash.events.*; public class PointerForceEvent extends Event { private var _shootEffectiveDistance:Number; private var _location:Point; private var _shootExplosionDistance:Number; private var _shootForce:Number; private var _force:Point; private var _effectiveDistance:Number; public static const FORCE:String = "force"; public static const SHOOT:String = "shoot"; public function PointerForceEvent(_arg1:String, _arg2:Point){ super(_arg1, false, false); _location = _arg2; } public function get shootExplosionDistance():Number{ return (_shootExplosionDistance); } public function get shootForce():Number{ return (_shootForce); } public function set force(_arg1:Point):void{ _force = _arg1; } public function set shootForce(_arg1:Number):void{ _shootForce = _arg1; } public function get shootEffectiveDistance():Number{ return (_shootEffectiveDistance); } public function set shootExplosionDistance(_arg1:Number):void{ _shootExplosionDistance = _arg1; } public function set location(_arg1:Point):void{ _location = _arg1; } public function get force():Point{ return (_force); } public function get location():Point{ return (_location); } public function set effectiveDistance(_arg1:Number):void{ _effectiveDistance = _arg1; } public function set shootEffectiveDistance(_arg1:Number):void{ _shootEffectiveDistance = _arg1; } public function get effectiveDistance():Number{ return (_effectiveDistance); } } }//package Game.Event
Section 52
//TreeDecorContainerEvent (Game.Event.TreeDecorContainerEvent) package Game.Event { import Game.Model.*; import flash.events.*; public class TreeDecorContainerEvent extends Event { private var _treeLevel:int; private var _decorModel:TreeDecorModel; public static const NEW_DECOR:String = "new_decor"; public function TreeDecorContainerEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } public function get decorModel():TreeDecorModel{ return (_decorModel); } public function get treeLevel():int{ return (_treeLevel); } public function set decorModel(_arg1:TreeDecorModel):void{ _decorModel = _arg1; } public function set treeLevel(_arg1:int):void{ _treeLevel = _arg1; } override public function toString():String{ return (formatToString("TreeDecorContainerEvent", "type", "bubbles", "cancelable", "eventPhase")); } override public function clone():Event{ return (new TreeDecorContainerEvent(type, bubbles, cancelable)); } } }//package Game.Event
Section 53
//TreeEvent (Game.Event.TreeEvent) package Game.Event { import Game.Model.Entities.*; import flash.events.*; public class TreeEvent extends Event { private var _entity:EntityModel; public static const ABSORBED_ENTITY:String = "absorbed_entity"; public function TreeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } public function get entity():EntityModel{ return (_entity); } public function set entity(_arg1:EntityModel):void{ _entity = _arg1; } override public function toString():String{ return (formatToString("TreeEvent", "type", "bubbles", "cancelable", "eventPhase")); } override public function clone():Event{ return (new TreeEvent(type, bubbles, cancelable)); } } }//package Game.Event
Section 54
//EntityFactory (Game.Factory.EntityFactory) package Game.Factory { import flash.display.*; import flash.geom.*; import Game.View.Entities.*; import Game.Model.Entities.*; import Cavalcade.Utilities.*; public class EntityFactory { private var _birdBounds:Rectangle; private var _bounds:Rectangle; public static const ENTITY_DRUM:String = "drum"; public static const ENTITY_XMAS_LIGHT_10:String = "xmas_light_10"; public static const ENTITY_XMAS_LIGHT_11:String = "xmas_light_11"; public static const ENTITY_XMAS_LIGHT_12:String = "xmas_light_12"; public static const ENTITY_BIRD_1:String = "bird_1"; public static const CATEGORY_STARS:String = "category_stars"; public static const CATEGORY_WATER:String = "category_water"; public static const ENTITY_WATER:String = "water"; public static const ENTITY_FERTILIZER:String = "fertilizer"; public static const CATEGORY_FERTILIZER:String = "category_fertilizer"; public static const CATEGORY_GIFTS:String = "category_gifts"; public static const ENTITY_CANDY_CANE:String = "candy_cane"; public static const ENTITY_XMAS_LIGHT_1:String = "xmas_light_1"; public static const ENTITY_XMAS_LIGHT_2:String = "xmas_light_2"; public static const ENTITY_XMAS_LIGHT_3:String = "xmas_light_3"; public static const ENTITY_XMAS_LIGHT_4:String = "xmas_light_4"; public static const ENTITY_XMAS_LIGHT_5:String = "xmas_light_5"; public static const ENTITY_XMAS_LIGHT_6:String = "xmas_light_6"; public static const ENTITY_XMAS_LIGHT_7:String = "xmas_light_7"; public static const ENTITY_XMAS_LIGHT_8:String = "xmas_light_8"; public static const ENTITY_XMAS_LIGHT_9:String = "xmas_light_9"; public static const ENTITY_STAR:String = "star"; public static const CATEGORY_BALLS:String = "category_balls"; public static const CATEGORY_XMAS_LIGHTS:String = "category_xmas_light"; public static const ENTITY_BALLOON_1:String = "balloon_1"; public static const ENTITY_GIFT_1:String = "gift_1"; public static const ENTITY_GIFT_2:String = "gift_2"; public static const ENTITY_GIFT_3:String = "gift_3"; public static const ENTITY_GIFT_4:String = "gift_4"; public static const ENTITY_GIFT_5:String = "gift_5"; public static const ENTITY_GIFT_6:String = "gift_6"; public static const ENTITY_SKATE:String = "skate"; public static const CATEGORY_SUNSHINE:String = "category_sunshine"; public static const ENTITY_BALL_1:String = "ball_1"; public static const ENTITY_BALL_2:String = "ball_2"; public static const ENTITY_BALL_3:String = "ball_3"; public static const ENTITY_MITTENS:String = "mittens"; public static const CATEGORY_TOYS:String = "categroy_toys"; public static const ENTITY_GINGER:String = "ginger"; public static const CATEGORY_CANDIES:String = "category_candies"; public static const ENTITY_XMAS_LIGHT_STRING:String = "xmas_light_string"; public static const ENTITY_STUFF_TOY:String = "stuff_toy"; public static const ENTITY_FLAKE:String = "flake"; public static const ENTITY_SUNSHINE:String = "sunshine"; private static var _instance:EntityFactory; public function createEntityDisplay(_arg1:String):MovieClip{ switch (_arg1){ case ENTITY_FLAKE: return (new objectFlake()); case ENTITY_BALL_1: return (new objectBall1()); case ENTITY_BALLOON_1: return (new balloonRight()); case ENTITY_BIRD_1: return (new enemyBird()); case ENTITY_WATER: return (new objectWater()); case ENTITY_FERTILIZER: return (new objectFertilizer()); case ENTITY_SUNSHINE: return (new objectSun()); case ENTITY_XMAS_LIGHT_1: return (new objectLight1()); case ENTITY_XMAS_LIGHT_2: return (new objectLight2()); case ENTITY_XMAS_LIGHT_3: return (new objectLight3()); case ENTITY_XMAS_LIGHT_4: return (new objectLight4()); case ENTITY_XMAS_LIGHT_5: return (new objectLight5()); case ENTITY_XMAS_LIGHT_6: return (new objectLight6()); case ENTITY_XMAS_LIGHT_7: return (new objectLight7()); case ENTITY_XMAS_LIGHT_8: return (new objectLight8()); case ENTITY_XMAS_LIGHT_9: return (new objectLight9()); case ENTITY_XMAS_LIGHT_10: return (new objectLight10()); case ENTITY_XMAS_LIGHT_11: return (new objectLight11()); case ENTITY_XMAS_LIGHT_12: return (new objectLight12()); case ENTITY_CANDY_CANE: return (new objectCane()); case ENTITY_DRUM: return (new objectDrum()); case ENTITY_STUFF_TOY: return (new objectBear()); case ENTITY_SKATE: return (new objectSkate()); case ENTITY_GINGER: return (new objectGinger()); case ENTITY_MITTENS: return (new objectMittens()); case ENTITY_GIFT_1: return (new objectGift1()); case ENTITY_GIFT_2: return (new objectGift2()); case ENTITY_GIFT_3: return (new objectGift3()); case ENTITY_GIFT_4: return (new objectGift4()); case ENTITY_GIFT_5: return (new objectGift5()); case ENTITY_GIFT_6: return (new objectGift6()); case ENTITY_BALL_1: return (new objectBall1()); case ENTITY_BALL_2: return (new objectBall2()); case ENTITY_BALL_3: return (new objectBall3()); case ENTITY_STAR: return (new objectStar()); case ENTITY_XMAS_LIGHT_STRING: return (new xmaslight1()); default: throw (new Error("Unknown entity type")); }; } private function createEntityView(_arg1:String, _arg2:EntityModel):EntityView{ switch (_arg1){ case ENTITY_BALLOON_1: return (new BalloonView(_arg2)); case ENTITY_BIRD_1: return (new BirdView(_arg2)); default: return (new EntityView(_arg2)); }; } public function createRandomDecor():EntityView{ if (Math.random() < 0.5){ return (createEntity(ENTITY_FLAKE)); }; return (createEntity(ENTITY_BALL_1)); } private function createEntityModel(_arg1:String, _arg2:Point=null):EntityModel{ var _local3:EntityModel; var _local4:Number; switch (_arg1){ case ENTITY_BALLOON_1: _local3 = new BalloonModel(); BalloonModel(_local3).bouyancy = 60; break; case ENTITY_BIRD_1: _local3 = new BirdModel(); if (Math.random() < 0.5){ BirdModel(_local3).direction = BirdModel.DIRECTION_LEFT; }; break; default: _local3 = new EntityModel(); break; }; _local3.gravity = new Point(0, 7.8); _local3.friction = (MathEx.random(1, 40) / 100); _local3.mass = 5; _local3.bounds = _bounds; _local3.entityType = _arg1; _local3.canBePulledbyMagnet = true; if ((((_arg1 == ENTITY_BALLOON_1)) || ((_arg1 == ENTITY_BIRD_1)))){ _local3.shootable = true; _local3.pushable = false; _local3.absorbable = false; _local3.canBePulledbyMagnet = false; }; if (_arg1 == ENTITY_BIRD_1){ _local3.bounds = _birdBounds; if (_arg2 == null){ _local4 = 0; if (BirdModel(_local3).direction == BirdModel.DIRECTION_LEFT){ _local4 = _birdBounds.right; } else { _local4 = _birdBounds.left; }; _arg2 = new Point(_local4, MathEx.random(int(_birdBounds.top), int(_birdBounds.bottom))); _local3.setLocation(_arg2); }; }; return (_local3); } public function createRandomEntityTypeFromCategory(_arg1:String):String{ var _local2:Array; switch (_arg1){ case CATEGORY_WATER: _local2 = [ENTITY_WATER]; break; case CATEGORY_FERTILIZER: _local2 = [ENTITY_FERTILIZER]; break; case CATEGORY_SUNSHINE: _local2 = [ENTITY_SUNSHINE]; break; case CATEGORY_CANDIES: _local2 = [ENTITY_CANDY_CANE]; break; case CATEGORY_XMAS_LIGHTS: _local2 = [ENTITY_XMAS_LIGHT_1]; break; case CATEGORY_TOYS: _local2 = [ENTITY_STUFF_TOY]; break; case CATEGORY_GIFTS: _local2 = [ENTITY_GIFT_1]; break; case CATEGORY_BALLS: _local2 = [ENTITY_BALL_1, ENTITY_BALL_2, ENTITY_BALL_3]; break; case CATEGORY_STARS: _local2 = [ENTITY_STAR]; break; }; if (_local2 == null){ return (""); }; var _local3:int = _local2.length; if (_local3 == 1){ return (_local2[0]); }; var _local4:int = MathEx.random(1, (_local3 + 1)); return (_local2[(_local4 - 1)]); } public function initialize(_arg1:DisplayObjectContainer):void{ var _local2 = 30; _bounds = new Rectangle((0 - _local2), (0 - (_local2 * 2)), (_arg1.width + (_local2 * 2)), (_arg1.height + (_local2 * 2))); _bounds = new Rectangle(0, 0, _arg1.stage.stageWidth, _arg1.stage.stageHeight); _birdBounds = _bounds.clone(); _birdBounds.x = (_birdBounds.x - _local2); _birdBounds.y = (_arg1.stage.stageHeight * 0.1); _birdBounds.width = (_birdBounds.width + (_local2 * 2)); _birdBounds.height = (_arg1.stage.stageHeight * 0.5); } public function createBalloon(_arg1:String):BalloonView{ var _local2:BalloonModel = BalloonModel(createEntityModel(ENTITY_BALLOON_1)); _local2.color = _arg1; var _local3:BalloonView = new BalloonView(_local2); return (_local3); } public function createRandomBird():BirdView{ return (BirdView(createEntity(ENTITY_BIRD_1))); } public function getCategoryFromEntityType(_arg1:String):String{ switch (_arg1){ case ENTITY_WATER: return (CATEGORY_WATER); case ENTITY_FERTILIZER: return (CATEGORY_FERTILIZER); case ENTITY_SUNSHINE: return (CATEGORY_SUNSHINE); case ENTITY_CANDY_CANE: return (CATEGORY_CANDIES); case ENTITY_XMAS_LIGHT_1: case ENTITY_XMAS_LIGHT_2: case ENTITY_XMAS_LIGHT_3: case ENTITY_XMAS_LIGHT_4: case ENTITY_XMAS_LIGHT_5: case ENTITY_XMAS_LIGHT_6: case ENTITY_XMAS_LIGHT_7: case ENTITY_XMAS_LIGHT_8: case ENTITY_XMAS_LIGHT_9: case ENTITY_XMAS_LIGHT_10: case ENTITY_XMAS_LIGHT_11: case ENTITY_XMAS_LIGHT_12: case ENTITY_XMAS_LIGHT_STRING: return (CATEGORY_XMAS_LIGHTS); case ENTITY_STUFF_TOY: case ENTITY_DRUM: case ENTITY_SKATE: case ENTITY_GINGER: case ENTITY_MITTENS: return (CATEGORY_TOYS); case ENTITY_GIFT_1: case ENTITY_GIFT_2: case ENTITY_GIFT_3: case ENTITY_GIFT_4: case ENTITY_GIFT_5: case ENTITY_GIFT_6: return (CATEGORY_GIFTS); case ENTITY_BALL_1: case ENTITY_BALL_2: case ENTITY_BALL_3: return (CATEGORY_BALLS); case ENTITY_STAR: return (CATEGORY_STARS); default: throw (new Error("Unknown entity type")); }; } public function createEntity(_arg1:String, _arg2:Point=null):EntityView{ var _local3:EntityModel = createEntityModel(_arg1, _arg2); var _local4:MovieClip = createEntityDisplay(_arg1); var _local5:EntityView = createEntityView(_arg1, _local3); _local5.display = _local4; return (_local5); } public static function get instance():EntityFactory{ if (_instance == null){ _instance = new (EntityFactory); }; return (_instance); } public static function destroyInstance():void{ _instance = null; } } }//package Game.Factory
Section 55
//GameLevelFactory (Game.Factory.GameLevelFactory) package Game.Factory { import Game.Model.*; import Cavalcade.Model.*; import Cavalcade.Utilities.*; public class GameLevelFactory { private function addEntityToQueue(_arg1:Array, _arg2:String, _arg3:int=1):void{ var _local4:int; while (_local4 < _arg3) { _arg1.push(EntityFactory.instance.createRandomEntityTypeFromCategory(_arg2)); _local4++; }; } public static function createLevel(_arg1:int):GameLevelModel{ var _local2:GameLevelModel = new GameLevelModel(); _local2.difficulty = _arg1; switch (_arg1){ case LevelModel.DIFFICULTY_EASY: _local2.numberOfDecorsPerBatch = 3; _local2.showXmasLine = true; _local2.entityBatchGroup = createBatchGroup(_local2.numberOfDecorsPerBatch, 3); _local2.birdInterval = (Time.SECOND * 27); _local2.balloonsInterval = (Time.SECOND * 23); break; case LevelModel.DIFFICULTY_NORMAL: _local2.numberOfDecorsPerBatch = 9; _local2.showXmasLine = true; _local2.entityBatchGroup = createBatchGroup(_local2.numberOfDecorsPerBatch, 12); _local2.birdInterval = (Time.SECOND * 22); _local2.balloonsInterval = (Time.SECOND * 18); break; case LevelModel.DIFFICULTY_HARD: _local2.numberOfDecorsPerBatch = 9; _local2.showXmasLine = false; _local2.birdInterval = (Time.SECOND * 17); _local2.balloonsInterval = (Time.SECOND * 13); _local2.entityBatchGroup = createBatchGroup(_local2.numberOfDecorsPerBatch, 12); break; }; return (_local2); } private static function createBatchGroup(_arg1:int, _arg2:int):Array{ var _local3:Array = []; addToBatchGroup(_local3, EntityFactory.CATEGORY_STARS, 3, 3); addToBatchGroup(_local3, EntityFactory.CATEGORY_BALLS, 9, _arg1); addToBatchGroup(_local3, EntityFactory.CATEGORY_GIFTS, 9, _arg1); addToBatchGroup(_local3, EntityFactory.CATEGORY_TOYS, 9, _arg1); addToBatchGroup(_local3, EntityFactory.CATEGORY_CANDIES, 9, _arg1); addToBatchGroup(_local3, EntityFactory.CATEGORY_XMAS_LIGHTS, 12, _arg2); addToBatchGroup(_local3, EntityFactory.CATEGORY_SUNSHINE, 9, _arg1); addToBatchGroup(_local3, EntityFactory.CATEGORY_FERTILIZER, 9, _arg1); addToBatchGroup(_local3, EntityFactory.CATEGORY_WATER, 9, _arg1); return (_local3); } private static function addToBatchGroup(_arg1:Array, _arg2:String, _arg3:int, _arg4:int):void{ var _local5:Array; while (_arg3 > 0) { if (_local5 == null){ _local5 = []; }; _local5.push(EntityFactory.instance.createRandomEntityTypeFromCategory(_arg2)); _arg3--; if ((((_local5.length == _arg4)) || ((_arg3 == 0)))){ _arg1.push(_local5); trace(_local5); _local5 = null; }; }; } } }//package Game.Factory
Section 56
//IMagnet (Game.Interface.IMagnet) package Game.Interface { import Game.Model.Entities.*; public interface IMagnet { function set x(_arg1:Number):void; function get effectiveRangeX():Number; function set y(_arg1:Number):void; function set effectiveRangeX(_arg1:Number):void; function canPull(_arg1:EntityModel):Boolean; function get x():Number; function get y():Number; function get pullForceX():Number; function set pullForceX(_arg1:Number):void; function pull(_arg1:EntityModel):void; } }//package Game.Interface
Section 57
//IMenuParams (Game.Interface.IMenuParams) package Game.Interface { public interface IMenuParams { function setMenuParams(_arg1:Object):void; } }//package Game.Interface
Section 58
//IPointerActionEventHandler (Game.Interface.IPointerActionEventHandler) package Game.Interface { public interface IPointerActionEventHandler { function setPointerActionEventSource(_arg1:IPointerActionEventSource):void; } }//package Game.Interface
Section 59
//IPointerActionEventSource (Game.Interface.IPointerActionEventSource) package Game.Interface { public interface IPointerActionEventSource { function get pushing():Boolean; function get readyToShoot():Boolean; function addPointerActionEventHandler(_arg1:Function, _arg2:Boolean=false, _arg3:int=0, _arg4:Boolean=true):void; function removePointerActionEventHandler(_arg1:Function, _arg2:Boolean=false):void; } }//package Game.Interface
Section 60
//IPointerForceEventSource (Game.Interface.IPointerForceEventSource) package Game.Interface { import flash.events.*; public interface IPointerForceEventSource extends IEventDispatcher { } }//package Game.Interface
Section 61
//BalloonModel (Game.Model.Entities.BalloonModel) package Game.Model.Entities { import flash.geom.*; import flash.events.*; import Game.Interface.*; import Game.Event.*; import Cavalcade.Utilities.*; public class BalloonModel extends EntityModel implements IPointerForceEventSource { private var _popping:Boolean;// = false private var _popDuration:int;// = 1000 private var _color:String; private var _force:Number;// = 30 private var _popCurrentTime:int;// = 0 private var _bouyancy:Number;// = 30 private var _shootEffectiveDistance:Number;// = 15 private var _effectiveDistance:Number;// = 30 public static const COLOR_YELLOW:String = "yellow"; public static const COLOR_RED:String = "red"; public static const COLOR_PURPLE:String = "purple"; public function get popping():Boolean{ return (_popping); } public function get popDuration():int{ return (_popDuration); } public function set popDuration(_arg1:int):void{ _popDuration = _arg1; } override public function step(_arg1:int):void{ var _local2:Number; var _local3:Number; var _local4:Point; var _local5:PointerForceEvent; checkBounds(); if (((_absorbed) || (_finished))){ return; }; if (_absorbing){ _location = Point.interpolate(_location, _targetAbsorbLocation, ABSORB_SPEED); if ((((Math.abs((_location.x - _targetAbsorbLocation.x)) < 1)) && ((Math.abs((_location.y - targetAbsorbLocation.y)) < 1)))){ _location = _targetAbsorbLocation; _absorbed = true; _absorbing = false; }; dispatchEvent(new Event(Event.CHANGE)); } else { if (_popping){ _popCurrentTime = (_popCurrentTime + _arg1); if (_popCurrentTime >= _popDuration){ _finished = true; _popping = false; }; dispatchEvent(new Event(Event.CHANGE)); } else { if (_activeImpulse != null){ stepActiveImpulse(_arg1); } else { if (_activeForce != null){ stepActiveForce(_arg1); }; }; _rotation = 0; _local2 = (_arg1 / Time.SECOND); _local3 = ((-1 * (_bouyancy * _local2)) + (_friction * _local2)); _local3 = ((_local3 + (_gravity.y * _local2)) - (_friction * _local2)); _location.x = (_location.x + _gravity.x); _location.y = (_location.y + _local3); dispatchEvent(new Event(Event.CHANGE)); _local4 = new Point(_force, 1); _local5 = new PointerForceEvent(PointerForceEvent.FORCE, _location); _local5.force = _local4; _local5.effectiveDistance = _effectiveDistance; _local5.shootEffectiveDistance = _shootEffectiveDistance; dispatchEvent(_local5); }; }; } public function set color(_arg1:String):void{ _color = _arg1; } public function get bouyancy():Number{ return (_bouyancy); } public function set popping(_arg1:Boolean):void{ _popping = _arg1; } override public function forceAbsorbed():void{ _absorbed = false; _finished = false; _absorbing = false; _popCurrentTime = 0; _popping = true; } public function get popCurrentTime():int{ return (_popCurrentTime); } override protected function checkBounds():void{ if (_bounds == null){ return; }; if ((_bounds.top - 100) >= _location.y){ _finished = true; }; } public function get color():String{ return (_color); } public function set bouyancy(_arg1:Number):void{ _bouyancy = _arg1; } public function set popCurrentTime(_arg1:int):void{ _popCurrentTime = _arg1; } } }//package Game.Model.Entities
Section 62
//BirdModel (Game.Model.Entities.BirdModel) package Game.Model.Entities { import flash.geom.*; import flash.events.*; import Game.Interface.*; import Game.Event.*; import Cavalcade.Utilities.*; public class BirdModel extends EntityModel implements IPointerForceEventSource { private var _flyingSpeedY:Number;// = 50 private var _stunnedTime:int;// = 0 private var _dead:Boolean;// = false private var _hovering:Boolean;// = false private var _fallSpeed:Number;// = 80 private var _flyingSpeedX:Number;// = 50 private var _direction:int;// = 1 private var _stunned:Boolean;// = false private var _force:Number;// = 30 private var _timeSinceLastHover:Number;// = 0 private var _shootEffectiveDistance:Number;// = 15 private var _effectiveDistance:Number;// = 30 public static const DIRECTION_LEFT:int = 0; public static const DIRECTION_RIGHT:int = 1; public static const HIT_STUN_DURATION:int = 400; override public function step(_arg1:int):void{ var _local6:Point; var _local7:PointerForceEvent; if (_finished){ return; }; checkBounds(); if (_finished){ return; }; var _local2 = (_direction == DIRECTION_LEFT); var _local3:Number = (_arg1 / Time.SECOND); if (((_stunned) && ((_stunnedTime == 0)))){ _stunnedTime = _arg1; } else { if (((_stunned) && ((_stunnedTime < HIT_STUN_DURATION)))){ _stunnedTime = (_stunnedTime + _arg1); } else { if (((_stunned) && ((_stunnedTime >= HIT_STUN_DURATION)))){ _stunned = false; }; }; }; if (_stunned){ dispatchEvent(new Event(Event.CHANGE)); return; }; var _local4:Number = 0; if (_local2){ _local4 = (((_flyingSpeedX * _local3) * -1) + (_friction * _local3)); } else { _local4 = ((_flyingSpeedX * _local3) - (_friction * _local3)); }; _local4 = (_local4 + (_gravity.x * _local3)); var _local5:Number = 0; if (!_dead){ if (_timeSinceLastHover > (Time.SECOND * 2)){ _timeSinceLastHover = 0; } else { if (_timeSinceLastHover > Time.SECOND){ _timeSinceLastHover = (_timeSinceLastHover + _arg1); _local5 = ((_flyingSpeedY * _local3) * -1); } else { _timeSinceLastHover = (_timeSinceLastHover + _arg1); _local5 = (_flyingSpeedY * _local3); }; }; _local5 = (_local5 + (_gravity.x * _local3)); _local5 = (_local5 - (_friction * _local3)); }; if (_dead){ _local4 = (_local4 * 5); }; _location.x = (_location.x + _local4); _location.y = (_location.y + _local5); dispatchEvent(new Event(Event.CHANGE)); if (!_dead){ _local6 = new Point(_force, 1); _local7 = new PointerForceEvent(PointerForceEvent.FORCE, _location); _local7.force = _local6; _local7.effectiveDistance = _effectiveDistance; _local7.shootEffectiveDistance = _shootEffectiveDistance; dispatchEvent(_local7); }; } public function set direction(_arg1:int):void{ _direction = _arg1; } public function get direction():int{ return (_direction); } override protected function checkBounds():void{ if ((((_location.x > _bounds.right)) || ((_location.x < _bounds.left)))){ _finished = true; }; } override public function forceAbsorbed():void{ if (_dead){ return; }; _absorbed = false; _absorbing = false; _dead = true; _stunned = true; } public function get dead():Boolean{ return (_dead); } public function get stunned():Boolean{ return (_stunned); } public function get stunnedTime():int{ return (_stunnedTime); } } }//package Game.Model.Entities
Section 63
//EntityModel (Game.Model.Entities.EntityModel) package Game.Model.Entities { import flash.geom.*; import flash.events.*; import Cavalcade.Interface.*; import Game.*; import Cavalcade.Model.*; public class EntityModel extends ParticleModel implements IFinished { protected var _upperEdge:Number;// = -50 protected var _absorbing:Boolean;// = false private var _canBePulledbyMagnet:Boolean;// = true private var _absorbable:Boolean;// = true protected var _offUpperEdge:Boolean;// = false protected var _id:String; protected var _finished:Boolean;// = false protected var _targetAbsorbLocation:Point; private var _pushable:Boolean;// = true protected var _bounds:Rectangle; private var _entityType:String; protected var _absorbed:Boolean;// = false private var _shootable:Boolean;// = false protected static const ABSORB_SPEED:Number = 0.7; public static const EVENT_ABSORBED:String = "absorbed"; public static const EVENT_BACK_UPPER_EDGE:String = "on_screen"; public static const EVENT_OFF_UPPER_EDGE:String = "off_screen"; public function EntityModel(){ _id = SimpleIDGenerator.instance.generate(); } public function set entityType(_arg1:String):void{ _entityType = _arg1; } public function set shootable(_arg1:Boolean):void{ _shootable = _arg1; } public function get absorbed():Boolean{ return (_absorbed); } public function get absorbable():Boolean{ return (_absorbable); } public function get finished():Boolean{ return (_finished); } public function get absorbing():Boolean{ return (_absorbing); } public function forceAbsorbed():void{ _absorbed = true; _finished = true; _absorbing = false; dispatchEvent(new Event(EVENT_ABSORBED)); } public function get id():String{ return (_id); } public function set absorbable(_arg1:Boolean):void{ _absorbable = _arg1; } public function set canBePulledbyMagnet(_arg1:Boolean):void{ _canBePulledbyMagnet = _arg1; } public function get bounds():Rectangle{ return (_bounds); } public function startAbsorb():void{ if (((_absorbing) || (_absorbed))){ return; }; _absorbing = true; } public function get entityType():String{ return (_entityType); } public function set id(_arg1:String):void{ _id = _arg1; } public function get canBePulledbyMagnet():Boolean{ return (_canBePulledbyMagnet); } override public function step(_arg1:int):void{ if (((_absorbed) || ((_bounds == null)))){ return; }; _dispatchChangeEvent = false; if (_absorbing){ _location = Point.interpolate(_location, _targetAbsorbLocation, ABSORB_SPEED); if ((((Math.abs((_location.x - _targetAbsorbLocation.x)) < 1)) && ((Math.abs((_location.y - targetAbsorbLocation.y)) < 1)))){ _location = _targetAbsorbLocation; _absorbed = true; _absorbing = false; dispatchEvent(new Event(EVENT_ABSORBED)); }; dispatchEvent(new Event(Event.CHANGE)); } else { super.step(_arg1); }; if (((!(_absorbing)) && (!(_absorbed)))){ checkBounds(); }; dispatchEvent(new Event(Event.CHANGE)); _dispatchChangeEvent = true; } protected function checkBounds():void{ var _local1:Number; if (_location.x < _bounds.x){ _local1 = Math.abs((_bounds.x - _location.x)); _location.x = ((_bounds.x + _bounds.width) - _local1); }; if (_location.x > (_bounds.x + _bounds.width)){ _local1 = Math.abs((_location.x - (_bounds.x + _bounds.width))); _location.x = (_bounds.x + _local1); }; if (_location.y <= _upperEdge){ if (_offUpperEdge){ return; }; _offUpperEdge = true; dispatchEvent(new Event(EVENT_OFF_UPPER_EDGE)); } else { if (!_offUpperEdge){ return; }; _offUpperEdge = false; dispatchEvent(new Event(EVENT_BACK_UPPER_EDGE)); }; } public function set targetAbsorbLocation(_arg1:Point):void{ _targetAbsorbLocation = _arg1; } public function set pushable(_arg1:Boolean):void{ _pushable = _arg1; } public function set bounds(_arg1:Rectangle):void{ _bounds = _arg1; } public function get targetAbsorbLocation():Point{ return (_targetAbsorbLocation); } public function get pushable():Boolean{ return (_pushable); } public function get shootable():Boolean{ return (_shootable); } } }//package Game.Model.Entities
Section 64
//MenuGameEndModel (Game.Model.Menus.MenuGameEndModel) package Game.Model.Menus { import flash.events.*; import Game.Interface.*; public class MenuGameEndModel extends EventDispatcher implements IMenuParams { private var _christmasSpirit:Number;// = 0 private var _totalScore:Number;// = 0 public static const PARAM_TOTAL_SCORE:String = "totalScore"; public static const PARAM_XMAS_SPIRIT:String = "christmasSpirit"; public function get christmasSpirit():Number{ return (_christmasSpirit); } public function get totalScore():Number{ return (_totalScore); } public function set christmasSpirit(_arg1:Number):void{ _christmasSpirit = _arg1; } public function setMenuParams(_arg1:Object):void{ _totalScore = int(_arg1[PARAM_TOTAL_SCORE]); _christmasSpirit = int(_arg1[PARAM_XMAS_SPIRIT]); dispatchEvent(new Event(Event.CHANGE)); } public function set totalScore(_arg1:Number):void{ _totalScore = _arg1; } } }//package Game.Model.Menus
Section 65
//CursorSpeakModel (Game.Model.CursorSpeakModel) package Game.Model { import flash.events.*; import Cavalcade.Event.*; import Cavalcade.Interface.*; import Game.*; import Cavalcade.Controller.*; public class CursorSpeakModel extends EventDispatcher implements IStepEventHandler { private var _x:Number;// = 0 private var _y:Number;// = 0 private var _visible:Boolean;// = false private var _activeEntityCategory:String; private var _activeEntityCount:int; private var _entityManager:EntityManager; private var _trees:Array; private var _stepProvider:IStepEventDispatcher; public function get y():Number{ return (_y); } public function get activeEntityCount():int{ return (_activeEntityCount); } public function onStepEvent(_arg1:StepEvent):void{ var _local2:TreeModel; var _local3:TreeModel; for each (_local3 in _trees) { if (_local3.hitTestPoint(_x, _y)){ _local2 = _local3; break; }; }; if (_local2 == null){ _visible = false; } else { _visible = true; _activeEntityCategory = _entityManager.lastBatchEntityCategory; _activeEntityCount = _local2.getAbsorbedEntityCount(_activeEntityCategory); }; dispatchChangeEvent(); } public function initialize(_arg1:EntityManager, _arg2:Array):void{ _entityManager = _arg1; _trees = _arg2; } public function setStepEventDispatcher(_arg1:IStepEventDispatcher):void{ _stepProvider = _arg1; _stepProvider.addStepEventHandler(onStepEvent); } public function set visible(_arg1:Boolean):void{ if (_visible == _arg1){ return; }; _visible = _arg1; } public function get activeEntityCategory():String{ return (_activeEntityCategory); } private function dispatchChangeEvent():void{ dispatchEvent(new Event(Event.CHANGE)); } public function get visible():Boolean{ return (_visible); } public function setLocation(_arg1:Number, _arg2:Number):void{ _x = _arg1; _y = _arg2; } public function get x():Number{ return (_x); } } }//package Game.Model
Section 66
//GameLevelModel (Game.Model.GameLevelModel) package Game.Model { import Cavalcade.Model.*; public class GameLevelModel extends LevelModel { private var _entityBatchGroup:Array; private var _balloonsInterval:int;// = 30000 private var _numberOfDecorsPerBatch:int;// = 9 private var _showXmasLine:Boolean;// = true private var _birdInterval:int;// = 40000 public function GameLevelModel(){ _entityBatchGroup = []; super(); } public function set entityBatchGroup(_arg1:Array):void{ _entityBatchGroup = _arg1; } public function get balloonsInterval():int{ return (_balloonsInterval); } public function get numberOfDecorsPerBatch():int{ return (_numberOfDecorsPerBatch); } public function get entityBatchGroup():Array{ return (_entityBatchGroup); } public function set balloonsInterval(_arg1:int):void{ _balloonsInterval = _arg1; } public function set numberOfDecorsPerBatch(_arg1:int):void{ _numberOfDecorsPerBatch = _arg1; } public function get showXmasLine():Boolean{ return (_showXmasLine); } public function set birdInterval(_arg1:int):void{ _birdInterval = _arg1; } public function get birdInterval():int{ return (_birdInterval); } public function set showXmasLine(_arg1:Boolean):void{ _showXmasLine = _arg1; } } }//package Game.Model
Section 67
//IVacuum (Game.Model.IVacuum) package Game.Model { import flash.geom.*; import Game.Model.Entities.*; public interface IVacuum { function getAbsorbLocation(_arg1:EntityModel):Point; function absorb(_arg1:EntityModel):Boolean; } }//package Game.Model
Section 68
//PersonModel (Game.Model.PersonModel) package Game.Model { import flash.geom.*; import flash.events.*; import Cavalcade.Interface.*; import Game.Event.*; import Cavalcade.*; import Cavalcade.Utilities.*; public class PersonModel extends EventDispatcher { private var _direction:int;// = 2 private var _y:Number; private var _admiring:Boolean;// = false private var _type:String;// = "type_1" private var _admireTimeElapsed:int;// = 0 private var _balloonLocationLocal:SimplePoint; private var _walking:Boolean;// = true private var _balloonReleaseX:Number;// = 0 private var _stepProvider:IStepEventDispatcher; private var _obstacles:Array; private var _admireLocations:Array; private var _balloonColor:String; private var _bounds:Rectangle; private var _hasBalloon:Boolean;// = false private var _admireDuration:int;// = 5000 private var _moveSpeed:Number;// = 5 private var _x:Number; private var _stopLocations:Array; public static const DIRECTION_RIGHT:int = 2; public static const DIRECTION_LEFT:int = 1; public static const TYPE_1:String = "type_1"; public function PersonModel(_arg1:String="type_1"){ _stopLocations = []; _obstacles = []; super(); } public function get balloonColor():String{ return (_balloonColor); } public function get y():Number{ return (_y); } public function get admireLocations():Array{ return (_admireLocations); } public function set obstacles(_arg1:Array):void{ _obstacles = _arg1; } private function withinXRange(_arg1:Rectangle){ if ((((_x >= _arg1.left)) && ((_x <= _arg1.right)))){ return (true); }; return (false); } public function set balloonLocationLocal(_arg1:SimplePoint):void{ _balloonLocationLocal = _arg1; } private function withinYRange(_arg1:Rectangle){ if ((((_y >= _arg1.top)) && ((_y <= _arg1.bottom)))){ return (true); }; return (false); } public function get balloonReleaseX():Number{ return (_balloonReleaseX); } public function get walking():Boolean{ return (_walking); } public function get admireTimeElapsed():int{ return (_admireTimeElapsed); } public function set admireLocations(_arg1:Array):void{ _admireLocations = _arg1; } public function set balloonReleaseX(_arg1:Number):void{ _balloonReleaseX = _arg1; } public function get x():Number{ return (_x); } public function get bounds():Rectangle{ return (_bounds); } public function get admiring():Boolean{ return (_admiring); } public function get admireDuration():int{ return (_admireDuration); } public function get obstacles():Array{ return (_obstacles); } public function get balloonLocationLocal():SimplePoint{ return (_balloonLocationLocal); } private function getAmireLocation():SimplePoint{ var _local4:SimplePoint; var _local5:SimplePoint; if (_admireLocations == null){ return (null); }; var _local1 = (_direction == DIRECTION_LEFT); var _local2 = -1; var _local3:int; while (_local3 < _admireLocations.length) { _local4 = _admireLocations[_local3]; if (_local1){ if (_local4.x >= _x){ _local2 = _local3; }; } else { if (_local4.x <= _x){ _local2 = _local3; }; }; _local3++; }; if (_local2 >= 0){ _local5 = SimplePoint(ArrayHelper.popItemAt(_admireLocations, _local2)); return (_local5); }; return (null); } public function get hasBalloon():Boolean{ return (_hasBalloon); } public function step(_arg1:int):void{ var _local4:SimplePoint; var _local5:Rectangle; var _local6:Number; var _local7:Number; var _local8:Boolean; var _local9:PersonEvent; if (_bounds == null){ return; }; var _local2:Number = (_moveSpeed * (_arg1 / 100)); var _local3 = (_direction == DIRECTION_LEFT); if (!_admiring){ _local4 = getAmireLocation(); if (_local4 != null){ _admiring = true; _admireTimeElapsed = 0; dispatchEvent(new PersonEvent(PersonEvent.ADMIRE)); }; }; if (_admiring){ if (_admireTimeElapsed >= _admireDuration){ _admiring = false; } else { _admireTimeElapsed = (_admireTimeElapsed + _arg1); dispatchEvent(new Event(Event.CHANGE)); return; }; }; if (_walking){ for each (_local5 in _obstacles) { if (!withinYRange(_local5)){ } else { if (_local3){ _local6 = Math.abs((_local5.right - _x)); } else { _local6 = Math.abs((_local5.left - _x)); }; _local7 = Math.abs((_local5.bottom - _y)); if (_local7 >= (_local6 * 0.1)){ _y = (_y + (_local2 * 0.3)); }; }; }; if (_local3){ _x = (_x - _local2); } else { _x = (_x + _local2); }; }; if (((_hasBalloon) && (!((_balloonReleaseX == 0))))){ _local8 = false; if (_local3){ if (_x <= _balloonReleaseX){ _local8 = true; }; } else { if (_x >= _balloonReleaseX){ _local8 = true; }; }; if (_local8){ _local9 = new PersonEvent(PersonEvent.BALLOON_RELEASED); _local9.balloonLocationX = (_x + _balloonLocationLocal.x); _local9.balloonLocationY = (_y + _balloonLocationLocal.y); _local9.balloonColor = _balloonColor; dispatchEvent(_local9); _hasBalloon = false; }; }; dispatchEvent(new Event(Event.CHANGE)); } public function set balloonColor(_arg1:String):void{ _balloonColor = _arg1; } public function set bounds(_arg1:Rectangle):void{ _bounds = _arg1; } public function set x(_arg1:Number):void{ _x = _arg1; } public function set hasBalloon(_arg1:Boolean):void{ _hasBalloon = _arg1; dispatchEvent(new Event(Event.CHANGE)); } public function set y(_arg1:Number):void{ _y = _arg1; } public function set stopLocations(_arg1:Array):void{ _stopLocations = _arg1; } public function get stopLocations():Array{ return (_stopLocations); } public function set direction(_arg1:int):void{ _direction = _arg1; if (_direction == DIRECTION_LEFT){ _balloonLocationLocal = new SimplePoint(-10, -40); } else { _balloonLocationLocal = new SimplePoint(10, -40); }; } public function get direction():int{ return (_direction); } } }//package Game.Model
Section 69
//PointerForceModel (Game.Model.PointerForceModel) package Game.Model { import flash.geom.*; import flash.events.*; import Cavalcade.Interface.*; import Game.Interface.*; import Game.Event.*; public class PointerForceModel extends EventDispatcher implements IStep, IPointerActionEventHandler, IPointerForceEventSource, IDestructor { private var _shootEffectiveDistance:Number;// = 15 private var _location:Point; private var _pointerAction:int;// = 0 private var _shoot:Boolean;// = false private var _pointerActionEventSource:IPointerActionEventSource; private var _force:Point; private var _visible:Boolean;// = true private var _lastLoggedLocation:Point; private var _shootLocation:Point; private var _effectiveDistance:Number;// = 40 public static const POINTER_ACTION_PUSHING:int = 1; public static const EVENT_POINTER_ACTION_CHANGE:String = "pointer_action_change"; public static const POINTER_ACTION_MOVING:int = 0; public static const POINTER_ACTION_READY_TO_SHOOT:int = 2; public function setPointerActionEventSource(_arg1:IPointerActionEventSource):void{ _pointerActionEventSource = _arg1; _pointerActionEventSource.addPointerActionEventHandler(onPointerActionEvent); } private function onPointerActionEvent(_arg1:PointerActionEvent):void{ if (_pointerActionEventSource.pushing){ _pointerAction = POINTER_ACTION_PUSHING; } else { if (_pointerActionEventSource.readyToShoot){ _pointerAction = POINTER_ACTION_READY_TO_SHOOT; } else { _pointerAction = POINTER_ACTION_MOVING; }; }; dispatchEvent(new Event(EVENT_POINTER_ACTION_CHANGE)); } private function getForceDirection():Point{ var _local1:Point = new Point(1, 1); if (_location.x < _lastLoggedLocation.x){ _local1.x = -1; }; if (_location.y < _lastLoggedLocation.y){ _local1.y = -1; }; return (_local1); } private function stepShoot():void{ if (_shootLocation == null){ return; }; var _local1:PointerForceEvent = new PointerForceEvent(PointerForceEvent.SHOOT, _shootLocation); _local1.shootForce = 50; _local1.shootEffectiveDistance = _shootEffectiveDistance; _local1.shootExplosionDistance = (_effectiveDistance * 2); dispatchEvent(_local1); _shoot = false; } public function step(_arg1:int):void{ if (_location == null){ return; }; if (_lastLoggedLocation == null){ _lastLoggedLocation = _location; }; if (_shoot){ stepShoot(); return; }; var _local2:Point = new Point(1, 1); _local2.x = (_local2.x * Math.abs((_location.x - _lastLoggedLocation.x))); _local2.y = (_local2.y * Math.abs((_location.y - _lastLoggedLocation.y))); if (_local2.x == 0){ _local2.x = 1; }; if (_local2.y == 0){ _local2.y = 1; }; _local2.x = Math.abs((_local2.x * _local2.y)); if (_local2.x < 1){ _local2.x = 1; }; _local2.x = (_local2.x * 0.5); var _local3:PointerForceEvent = new PointerForceEvent(PointerForceEvent.FORCE, _location); _local3.force = _local2; _local3.effectiveDistance = _effectiveDistance; _local3.shootEffectiveDistance = _shootEffectiveDistance; dispatchEvent(_local3); _lastLoggedLocation = _location; dispatchEvent(new Event(Event.CHANGE)); } public function get pointerAction():int{ return (_pointerAction); } public function shoot(_arg1:Point):void{ _shoot = true; _shootLocation = _arg1; } public function set visible(_arg1:Boolean):void{ if (_visible != _arg1){ _visible = _arg1; dispatchEvent(new Event(Event.CHANGE)); }; } public function set location(_arg1:Point):void{ _location = _arg1; } public function get visible():Boolean{ return (_visible); } public function get location():Point{ return (_location); } public function destroy():void{ } } }//package Game.Model
Section 70
//SpiritLevelMeterModel (Game.Model.SpiritLevelMeterModel) package Game.Model { import flash.events.*; import Cavalcade.Interface.*; import Game.*; import Game.Event.*; public class SpiritLevelMeterModel extends EventDispatcher implements IDestructor { private var _level:int;// = 0 private var _admiresCount:int;// = 0 private var _peopleManager:PeopleManager; public static const EVENT_LEVEL_CHANGE:String = "level_change"; public function destroy():void{ if (_peopleManager != null){ _peopleManager.removeEventListener(PersonEvent.ADMIRE, onPersonAdmire); _peopleManager = null; }; } public function get level():int{ return (_level); } private function onPersonAdmire(_arg1:PersonEvent):void{ _admiresCount++; var _local2:int = Math.floor((_admiresCount / 5)); if (_local2 != _level){ _level = _local2; dispatchEvent(new Event(EVENT_LEVEL_CHANGE)); }; } public function set level(_arg1:int):void{ _level = _arg1; } public function initialize(_arg1:PeopleManager):void{ _peopleManager = _arg1; _peopleManager.addEventListener(PersonEvent.ADMIRE, onPersonAdmire, false, 0, true); } } }//package Game.Model
Section 71
//TreeDecorContainerModel (Game.Model.TreeDecorContainerModel) package Game.Model { import Game.Factory.*; import flash.events.*; import Cavalcade.Interface.*; import Game.Event.*; import Cavalcade.Utilities.*; public class TreeDecorContainerModel extends EventDispatcher implements IDestructor { private var _treeModel:TreeModel; private var _decors:Array; private var _decorStock:Array; private var _decorsEntityCategoryCounts:Object; public function TreeDecorContainerModel(){ _decors = []; _decorsEntityCategoryCounts = new Object(); _decorStock = []; super(); } public function getDecorEntityCategoryCount(_arg1:String):int{ return (int(_decorsEntityCategoryCounts[_arg1])); } private function createDecorModel(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number=1, _arg5:Number=1, _arg6:Number=0):TreeDecorModel{ var _local7:TreeDecorModel = new TreeDecorModel(); _local7.entityType = _arg1; _local7.entityCategory = EntityFactory.instance.getCategoryFromEntityType(_arg1); _local7.x = _arg2; _local7.y = _arg3; _local7.scaleX = _arg4; _local7.scaleY = _arg5; _local7.rotation = _arg6; return (_local7); } public function initialize(_arg1:TreeModel):void{ _treeModel = _arg1; _treeModel.addEventListener(TreeEvent.ABSORBED_ENTITY, onTreeAbsorbedEntity, false, 0, true); _treeModel.addEventListener(TreeModel.EVENT_GROW, onTreeGrow, false, 0, true); updateDecorStock(); } private function canCreateDecor(_arg1:String):Boolean{ return (true); } public function destroy():void{ if (_treeModel != null){ _treeModel.removeEventListener(TreeEvent.ABSORBED_ENTITY, onTreeAbsorbedEntity); _treeModel = null; }; } private function onTreeAbsorbedEntity(_arg1:TreeEvent):void{ var _local2:String = EntityFactory.instance.getCategoryFromEntityType(_arg1.entity.entityType); if (!canCreateDecor(_local2)){ return; }; var _local3:TreeDecorModel = getDecorFromStock(_local2); if (_local3 == null){ return; }; _decors.push(_local3); var _local4:TreeDecorContainerEvent = new TreeDecorContainerEvent(TreeDecorContainerEvent.NEW_DECOR); _local4.decorModel = _local3; _local4.treeLevel = _treeModel.growthLevel; dispatchEvent(_local4); _decorsEntityCategoryCounts[_local2] = (int(_decorsEntityCategoryCounts[_local2]) + 1); } private function updateDecorStock():void{ _decorStock = []; _decorStock.push(createDecorModel(EntityFactory.ENTITY_XMAS_LIGHT_STRING, -8, -38.6, 9, 9)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_XMAS_LIGHT_STRING, -5, -85.6, 7, 7)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_XMAS_LIGHT_STRING, -5, -117.6, 6, 6)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_XMAS_LIGHT_STRING, -5, -117.6, 6, 6)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_CANDY_CANE, 24.3, -20.6, -1, 1)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_CANDY_CANE, -20, -90, 0.9, 0.9)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_CANDY_CANE, -10, -140, -0.8, 0.8)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_CANDY_CANE, 24.3, -20.6, -1, 1)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_CANDY_CANE, -20, -90, 0.9, 0.9)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_CANDY_CANE, -10, -140, -0.8, 0.8)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_CANDY_CANE, 24.3, -20.6, -1, 1)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_CANDY_CANE, -20, -90, 0.9, 0.9)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_CANDY_CANE, -10, -140, -0.8, 0.8)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_STUFF_TOY, 18.3, -80, 0.5, 0.5, -15)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_MITTENS, 3, -160, 0.35, 0.35)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_GINGER, -25, -45, 0.5, 0.5, 5)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_STUFF_TOY, 18.3, -80, 0.5, 0.5, -15)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_MITTENS, 3, -160, 0.35, 0.35)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_GINGER, -25, -45, 0.5, 0.5, 5)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_STUFF_TOY, 18.3, -80, 0.5, 0.5, -15)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_MITTENS, 3, -160, 0.35, 0.35)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_GINGER, -25, -45, 0.5, 0.5, 5)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_GIFT_5, 22.3, -50, 0.5, 0.5, 5)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_GIFT_4, 14.3, -108, 0.35, 0.35, -15)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_GIFT_1, -20, -115, 0.35, 0.35, 15)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_GIFT_5, 22.3, -50, 0.5, 0.5, 5)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_GIFT_4, 14.3, -108, 0.35, 0.35, -15)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_GIFT_1, -20, -115, 0.35, 0.35, 15)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_GIFT_5, 22.3, -50, 0.5, 0.5, 5)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_GIFT_4, 14.3, -108, 0.35, 0.35, -15)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_GIFT_1, -20, -115, 0.35, 0.35, 15)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_BALL_3, -34.3, -17.6, 0.6, 0.6, 15)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_BALL_2, -25.3, -67, 0.5, 0.5, 15)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_BALL_1, 12.3, -133, 0.5, 0.5, -25)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_BALL_3, -34.3, -17.6, 0.6, 0.6, 15)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_BALL_2, -25.3, -67, 0.5, 0.5, 15)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_BALL_1, 12.3, -133, 0.5, 0.5, -25)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_BALL_3, -34.3, -17.6, 0.6, 0.6, 15)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_BALL_2, -25.3, -67, 0.5, 0.5, 15)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_BALL_1, 12.3, -133, 0.5, 0.5, -25)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_STAR, 0, -203, 0.9, 0.8)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_STAR, 0, -203, 0.9, 0.8)); _decorStock.push(createDecorModel(EntityFactory.ENTITY_STAR, 0, -203, 0.9, 0.8)); } private function getDecorFromStock(_arg1:String):TreeDecorModel{ var _local4:TreeDecorModel; var _local2 = -1; var _local3:int; while (_local3 < _decorStock.length) { _local4 = _decorStock[_local3]; if (_local4.entityCategory == _arg1){ _local2 = _local3; break; }; _local3++; }; if (_local2 >= 0){ return (TreeDecorModel(ArrayHelper.popItemAt(_decorStock, _local2))); }; return (null); } private function onTreeGrow(_arg1:Event):void{ } } }//package Game.Model
Section 72
//TreeDecorModel (Game.Model.TreeDecorModel) package Game.Model { import flash.events.*; public class TreeDecorModel extends EventDispatcher { private var _x:Number;// = 0 private var _rotation:Number;// = 0 private var _entityCategory:String; private var _entityType:String; private var _lowQuality:Boolean;// = false private var _scaleX:Number;// = 1 private var _scaleY:Number;// = 1 private var _y:Number;// = 0 public static const EVENT_LEVEL_CHANGED:String = "level_changed"; public function set entityCategory(_arg1:String):void{ _entityCategory = _arg1; } public function get entityCategory():String{ return (_entityCategory); } public function set entityType(_arg1:String):void{ _entityType = _arg1; } public function get lowQuality():Boolean{ return (_lowQuality); } public function get scaleX():Number{ return (_scaleX); } public function get scaleY():Number{ return (_scaleY); } public function set lowQuality(_arg1:Boolean):void{ _lowQuality = _arg1; } public function set scaleY(_arg1:Number):void{ _scaleY = _arg1; } public function set scaleX(_arg1:Number):void{ _scaleX = _arg1; } public function set x(_arg1:Number):void{ _x = _arg1; } public function set y(_arg1:Number):void{ _y = _arg1; } public function get y():Number{ return (_y); } public function set rotation(_arg1:Number):void{ _rotation = _arg1; } public function get entityType():String{ return (_entityType); } public function get rotation():Number{ return (_rotation); } public function get x():Number{ return (_x); } } }//package Game.Model
Section 73
//TreeModel (Game.Model.TreeModel) package Game.Model { import flash.geom.*; import Game.Factory.*; import Game.Model.Entities.*; import flash.events.*; import Cavalcade.Interface.*; import Game.Event.*; import Cavalcade.Utilities.*; public class TreeModel extends EventDispatcher implements IVacuum, IHitTest { private var _quality:Number;// = 0 private var _height:Number; private var _width:Number; private var _absorbedEntities:Object; private var _hitAreas:Array; private var _location:Point;// = null private var _growthLevel:int;// = 0 public static const GROWTH_LEVEL_FULL:int = 3; public static const GROWTH_LEVEL_STAGE1:int = 1; public static const GROWTH_LEVEL_MEDIUM:int = 2; public static const EVENT_GROW:String = "grow"; public static const EVENT_INITIALIZED:String = "init"; public function TreeModel(){ _hitAreas = []; _absorbedEntities = new Object(); super(); _width = 186.1; _height = 186.1; } public function getAbsorbedEntityCount(_arg1:String):int{ return (int(_absorbedEntities[_arg1])); } public function hitTestPoint(_arg1:Number, _arg2:Number):Boolean{ var _local3:Rectangle; for each (_local3 in _hitAreas) { if (_local3.contains(_arg1, _arg2)){ return (true); }; }; return (false); } public function get width():Number{ return (_width); } public function initialize():void{ updateHitAreas(); dispatchEvent(new Event(TreeModel.EVENT_INITIALIZED)); } public function set height(_arg1:Number):void{ _height = _arg1; } private function passedGrowthLevelRequirement(_arg1:int):Boolean{ var _local2:Boolean; switch (_arg1){ case 0: if (((int(_absorbedEntities[EntityFactory.CATEGORY_WATER]) + int(_absorbedEntities[EntityFactory.CATEGORY_FERTILIZER])) + int(_absorbedEntities[EntityFactory.CATEGORY_SUNSHINE])) >= 3){ _local2 = true; }; break; case 1: if (((int(_absorbedEntities[EntityFactory.CATEGORY_WATER]) + int(_absorbedEntities[EntityFactory.CATEGORY_FERTILIZER])) + int(_absorbedEntities[EntityFactory.CATEGORY_SUNSHINE])) >= 6){ _local2 = true; }; break; case 2: if (((int(_absorbedEntities[EntityFactory.CATEGORY_WATER]) + int(_absorbedEntities[EntityFactory.CATEGORY_FERTILIZER])) + int(_absorbedEntities[EntityFactory.CATEGORY_SUNSHINE])) >= 9){ _local2 = true; }; break; case 3: if (((int(_absorbedEntities[EntityFactory.CATEGORY_WATER]) + int(_absorbedEntities[EntityFactory.CATEGORY_FERTILIZER])) + int(_absorbedEntities[EntityFactory.CATEGORY_SUNSHINE])) >= 12){ _local2 = true; }; break; case 4: if (((int(_absorbedEntities[EntityFactory.CATEGORY_WATER]) + int(_absorbedEntities[EntityFactory.CATEGORY_FERTILIZER])) + int(_absorbedEntities[EntityFactory.CATEGORY_SUNSHINE])) >= 15){ _local2 = true; }; break; case 5: if (((int(_absorbedEntities[EntityFactory.CATEGORY_WATER]) + int(_absorbedEntities[EntityFactory.CATEGORY_FERTILIZER])) + int(_absorbedEntities[EntityFactory.CATEGORY_SUNSHINE])) >= 18){ _local2 = true; }; break; }; return (_local2); } private function addAbsorbedEntity(_arg1:EntityModel):void{ var _local2:String = _arg1.entityType; var _local3:String = EntityFactory.instance.getCategoryFromEntityType(_local2); _absorbedEntities[_local3] = (int(_absorbedEntities[_local3]) + 1); } public function set width(_arg1:Number):void{ _width = _arg1; } private function checkGrowthLevel():void{ var _local1:int = _growthLevel; if (passedGrowthLevelRequirement(_growthLevel)){ _local1++; }; if (_local1 != _growthLevel){ _growthLevel = _local1; updateHitAreas(); dispatchEvent(new Event(TreeModel.EVENT_GROW)); }; } public function getAbsorbedEntitiesTotal():int{ var _local1:int; _local1 = (_local1 + int(_absorbedEntities[EntityFactory.CATEGORY_BALLS])); _local1 = (_local1 + int(_absorbedEntities[EntityFactory.CATEGORY_CANDIES])); _local1 = (_local1 + int(_absorbedEntities[EntityFactory.CATEGORY_FERTILIZER])); _local1 = (_local1 + int(_absorbedEntities[EntityFactory.CATEGORY_GIFTS])); _local1 = (_local1 + int(_absorbedEntities[EntityFactory.CATEGORY_STARS])); _local1 = (_local1 + int(_absorbedEntities[EntityFactory.CATEGORY_SUNSHINE])); _local1 = (_local1 + int(_absorbedEntities[EntityFactory.CATEGORY_TOYS])); _local1 = (_local1 + int(_absorbedEntities[EntityFactory.CATEGORY_WATER])); _local1 = (_local1 + int(_absorbedEntities[EntityFactory.CATEGORY_XMAS_LIGHTS])); return (_local1); } private function updateHitAreas():void{ var _local1:Rectangle; _hitAreas = []; if ((((((_width == 0)) || ((_height == 0)))) || ((_location == null)))){ return; }; switch (_growthLevel){ case 0: _local1 = new Rectangle((_location.x - (_width / 8)), (_location.y - (_height / 3)), (_width / 4), (_height / 2)); _hitAreas.push(_local1); break; case 1: _local1 = new Rectangle((_location.x - (_width / 6)), (_location.y - (_height / 2)), (_width / 3), (_height / 1.5)); _hitAreas.push(_local1); break; case 2: _local1 = new Rectangle((_location.x - (_width / 4)), _location.y, (_width / 2), (_height / 7)); _hitAreas.push(_local1); _local1 = new Rectangle((_location.x - (_width / 12)), (_location.y - (_height / 4)), (_width / 6), (_height / 4)); _hitAreas.push(_local1); _local1 = new Rectangle((_location.x - (_width / 3.5)), (_location.y - (_height / 1.5)), (_width / 1.75), (_height / 2.3)); _hitAreas.push(_local1); _local1 = new Rectangle((_location.x - (_width / 8)), (_location.y - (_height * 1.2)), (_width / 4), (_height / 1.5)); _hitAreas.push(_local1); break; case 3: case 4: case 5: case 6: _local1 = new Rectangle((_location.x - (_width / 4)), (_location.y - 10), (_width / 2), (_height / 4)); _hitAreas.push(_local1); _local1 = new Rectangle((_location.x - (_width / 2.5)), (_location.y - (_height / 4)), (_width / 1.25), (_height / 4)); _hitAreas.push(_local1); _local1 = new Rectangle((_location.x - (_width / 3)), (_location.y - (_height / 2)), (_width / 1.5), (_height / 4)); _hitAreas.push(_local1); _local1 = new Rectangle((_location.x - (_width / 4)), ((_location.y - _height) + 45), (_width / 2), (_height / 3.5)); _hitAreas.push(_local1); _local1 = new Rectangle((_location.x - (_width / 8)), (_location.y - _height), (_width / 4), (_height / 3.5)); _hitAreas.push(_local1); break; default: _local1 = new Rectangle((_location.x - (_width / 4)), (_location.y - _height), (_width / 2), _height); _hitAreas.push(_local1); _local1 = new Rectangle((_location.x - (_width / 2)), (_location.y - (_height / 1.8)), (_width / 4), (_height / 1.8)); _hitAreas.push(_local1); _local1 = new Rectangle((_location.x + (_width / 4)), (_location.y - (_height / 1.8)), (_width / 4), (_height / 1.8)); _hitAreas.push(_local1); break; }; } public function get height():Number{ return (_height); } public function set location(_arg1:Point):void{ _location = _arg1; } public function absorb(_arg1:EntityModel):Boolean{ var _local4:Rectangle; var _local5:Number; var _local6:Number; var _local7:TreeEvent; var _local2:Point = _arg1.location; var _local3:Boolean; for each (_local4 in _hitAreas) { _local5 = (_local4.x + _local4.width); _local6 = (_local4.y + _local4.height); if ((((((((_local4.x <= _local2.x)) && ((_local5 >= _local2.x)))) && ((_local4.y <= _local2.y)))) && ((_local6 >= _local2.y)))){ _local3 = true; break; }; }; if (_local3){ addAbsorbedEntity(_arg1); checkGrowthLevel(); updateQuality(); _local7 = new TreeEvent(TreeEvent.ABSORBED_ENTITY); _local7.entity = _arg1; dispatchEvent(_local7); }; return (_local3); } public function get hitAreas():Array{ return (_hitAreas); } public function get location():Point{ return (_location); } private function updateQuality():void{ var _local4:String; var _local1:Number = 5; if (_growthLevel > GROWTH_LEVEL_FULL){ _local1 = (_local1 - ((_growthLevel - GROWTH_LEVEL_FULL) * 5)); _local1 = (_local1 + (GROWTH_LEVEL_FULL * 5)); } else { _local1 = (_local1 + (_growthLevel * 5)); }; var _local2:Array = [EntityFactory.CATEGORY_BALLS, EntityFactory.CATEGORY_CANDIES, EntityFactory.CATEGORY_GIFTS, EntityFactory.CATEGORY_TOYS, EntityFactory.CATEGORY_XMAS_LIGHTS]; var _local3:int; for each (_local4 in _local2) { _local3 = getAbsorbedEntityCount(_local4); if (_local3 > 3){ _local1 = (_local1 - ((_local3 - 3) * 3)); _local1 = (_local1 + (3 * 4)); } else { _local1 = (_local1 + (_local3 * 4)); }; }; _local3 = getAbsorbedEntityCount(EntityFactory.CATEGORY_STARS); if (_local3 > 1){ _local1 = (_local1 - ((_local3 - 1) * 3)); _local1 = (_local1 + 15); } else { _local1 = (_local1 + (_local3 * 15)); }; if (_local1 > 100){ _local1 = 100; }; if (_local1 < 0){ _local1 = 0; }; _quality = _local1; } public function getAbsorbLocation(_arg1:EntityModel):Point{ var _local2:Rectangle = Rectangle(_hitAreas[0]); var _local3:Point = new Point(MathEx.random(int(_local2.x), int((_local2.x + _local2.width))), MathEx.random(int(_local2.y), int((_local2.y + _local2.height)))); return (_local3); } public function get growthLevel():int{ return (_growthLevel); } public function get quality():Number{ return (_quality); } } }//package Game.Model
Section 74
//XmasLineModel (Game.Model.XmasLineModel) package Game.Model { import flash.geom.*; import Game.Model.Entities.*; import flash.events.*; import Game.Interface.*; public class XmasLineModel extends EventDispatcher implements IMagnet { private var _nullRangeX:Number;// = 5 private var _effectiveRangeX:Number;// = 10 private var _height:Number;// = 421 private var _width:Number;// = 1 private var _x:Number;// = 0 private var _pullForceX:Number;// = 5 private var _y:Number;// = 0 public function set effectiveRangeX(_arg1:Number):void{ _effectiveRangeX = _arg1; } public function pull(_arg1:EntityModel):void{ if (!canPull(_arg1)){ return; }; var _local2:Number = (_x - _arg1.location.x); var _local3:Point = new Point(((_local2 / Math.abs(_local2)) * _pullForceX), 0); _arg1.applyForce(_local3); } public function get effectiveRangeX():Number{ return (_effectiveRangeX); } public function set y(_arg1:Number):void{ _y = _arg1; } public function set width(_arg1:Number):void{ _width = _arg1; } public function get width():Number{ return (_width); } public function set pullForceX(_arg1:Number):void{ _pullForceX = _arg1; } public function set height(_arg1:Number):void{ _height = _arg1; } public function get height():Number{ return (_height); } public function get pullForceX():Number{ return (_pullForceX); } public function set x(_arg1:Number):void{ _x = _arg1; } public function canPull(_arg1:EntityModel):Boolean{ var _local3:Number; var _local2:Boolean; if (_local2){ _local3 = Math.abs((_x - _arg1.location.x)); _local2 = (((_local3 <= _effectiveRangeX)) && ((_local3 >= _nullRangeX))); }; if (_local2){ _local2 = (_arg1.location.y >= (_y - (_height / 2))); }; if (_local2){ _local2 = (_arg1.location.y <= (_y + (_height / 2))); }; return (_local2); } public function get x():Number{ return (_x); } public function get y():Number{ return (_y); } } }//package Game.Model
Section 75
//ArrowNotifier (Game.Notifier.ArrowNotifier) package Game.Notifier { import flash.display.*; import flash.geom.*; import Game.Model.Entities.*; import flash.events.*; import Cavalcade.Interface.*; import Game.*; import Game.Event.*; import Cavalcade.Utilities.*; public class ArrowNotifier extends Sprite implements IDestructor { private var _arrowsYLocation:Number;// = 40 private var _activeNotifiers:Array; private var _entityManager:EntityManager; private var _bounds:Rectangle; private static const NOTIFIER_DISPLAY:String = "display"; private static const NOTIFIER_ID:String = "id"; public function ArrowNotifier(_arg1:EntityManager){ _activeNotifiers = []; super(); _entityManager = _arg1; _entityManager.addEventListener(EntityManagerEvent.NEW_ENTITY, onNewEntity, false, 0, true); } private function onEntityOffBounds(_arg1:Event):void{ var _local2:EntityModel = EntityModel(_arg1.target); DebugHelper.log(_local2.id, "entity.id", "onEntityOffBounds", "ArrowNotifier"); DebugHelper.log(_local2.location.x.toString(), "entity.location.x", "onEntityOffBounds", "ArrowNotifier"); createNotifier(_local2.id, _local2.location.x); _local2.addEventListener(Event.CHANGE, onEntityChange, false, 0, true); } private function onNewEntity(_arg1:EntityManagerEvent):void{ _arg1.entity.addEventListener(EntityModel.EVENT_OFF_UPPER_EDGE, onEntityOffBounds, false, 0, true); _arg1.entity.addEventListener(EntityModel.EVENT_BACK_UPPER_EDGE, onEntityReturnBounds, false, 0, true); _arg1.entity.addEventListener(EntityModel.EVENT_ABSORBED, onEntityAbsorbed, false, 0, true); } private function onEntityReturnBounds(_arg1:Event):void{ var _local2:EntityModel = EntityModel(_arg1.target); removeNotifier(_local2.id); _local2.removeEventListener(Event.CHANGE, onEntityChange); } private function getActiveNotifier(_arg1:String):Object{ var _local4:Object; var _local2:int; var _local3:int; while (_local3 < _activeNotifiers.length) { _local4 = _activeNotifiers[_local3]; if (_local4[NOTIFIER_ID] == _arg1){ return (_local4); }; _local3++; }; return (null); } public function set bounds(_arg1:Rectangle):void{ _bounds = _arg1; } private function onEntityAbsorbed(_arg1:Event):void{ var _local2:EntityModel = EntityModel(_arg1.target); _local2.removeEventListener(EntityModel.EVENT_OFF_UPPER_EDGE, onEntityOffBounds); _local2.removeEventListener(EntityModel.EVENT_BACK_UPPER_EDGE, onEntityReturnBounds); _local2.removeEventListener(EntityModel.EVENT_ABSORBED, onEntityAbsorbed); _local2.removeEventListener(Event.CHANGE, onEntityChange); removeNotifier(_local2.id); } private function createNotifier(_arg1:String, _arg2:Number):Object{ var _local3:Object = getActiveNotifier(_arg1); if (_local3 != null){ return (_local3); }; var _local4:Object = new Object(); _local4[NOTIFIER_ID] = _arg1; var _local5:MovieClip = new arrowUp(); _local5.y = _arrowsYLocation; _local5.x = getCorrectX(_arg2); _local5.scaleX = (_local5.scaleX / 1.5); _local5.scaleY = (_local5.scaleY / 1.5); _local4[NOTIFIER_DISPLAY] = _local5; addChild(_local5); _activeNotifiers.push(_local4); return (_local4); } private function onEntityChange(_arg1:Event):void{ var _local2:EntityModel = EntityModel(_arg1.target); updateNotifier(_local2.id, _local2.location.x); } public function get bounds():Rectangle{ return (_bounds); } public function removeNotifier(_arg1:String):void{ var _local2:Object = getActiveNotifier(_arg1); if (_local2 == null){ return; }; _local2 = ArrayHelper.popItem(_activeNotifiers, _local2); removeChild(_local2[NOTIFIER_DISPLAY]); _local2 = null; } public function destroy():void{ if (_entityManager != null){ _entityManager.removeEventListener(EntityManagerEvent.NEW_ENTITY, onNewEntity); _entityManager = null; }; } private function getCorrectX(_arg1:Number):Number{ if (_bounds == null){ return (_arg1); }; if (_arg1 < _bounds.left){ _arg1 = _bounds.left; } else { if (_arg1 > _bounds.right){ _arg1 = _bounds.right; }; }; DebugHelper.log(_arg1.toString(), "return x", "getCorrectX", "ArrowNotifier"); return (_arg1); } private function updateNotifier(_arg1:String, _arg2:Number):void{ var _local3:Object = getActiveNotifier(_arg1); if (_local3 == null){ return; }; DisplayObject(_local3[NOTIFIER_DISPLAY]).x = getCorrectX(_arg2); } } }//package Game.Notifier
Section 76
//GrowthNotifier (Game.Notifier.GrowthNotifier) package Game.Notifier { import flash.display.*; import flash.events.*; import Game.*; import Cavalcade.SoundManager.*; public class GrowthNotifier { private var _container:DisplayObjectContainer; private static var _instance:GrowthNotifier = null; public function initialize(_arg1:DisplayObjectContainer){ _container = _arg1; } public function notify(_arg1:Number, _arg2:Number):void{ if (_container == null){ return; }; var _local3:MovieClip = new xmasup(); _local3.x = _arg1; _local3.y = _arg2; _local3.addEventListener(Event.ENTER_FRAME, onNotificationEnterFrame, false, 0, true); _container.addChild(_local3); var _local4:SoundManagerItem = GameSoundManager.instance.play(GameSoundManager.SOUND_XMAS_SPIRIT_UP, "", 0, 1); _local4.increaseVolume(3); } private function onNotificationEnterFrame(_arg1:Event):void{ var _local2:MovieClip = MovieClip(_arg1.target); if (_local2.currentFrame == _local2.totalFrames){ _local2.removeEventListener(Event.ENTER_FRAME, onNotificationEnterFrame); _container.removeChild(_local2); }; } public static function get instance():GrowthNotifier{ if (_instance == null){ _instance = new (GrowthNotifier); }; return (_instance); } } }//package Game.Notifier
Section 77
//BalloonView (Game.View.Entities.BalloonView) package Game.View.Entities { import flash.display.*; import Game.Model.Entities.*; import flash.events.*; public class BalloonView extends EntityView { private var _displayMainBalloon:MovieClip; public function BalloonView(_arg1:EntityModel){ super(_arg1); _arg1.addEventListener(Event.CHANGE, update, false, 0, true); if (this.balloonModel.color == BalloonModel.COLOR_PURPLE){ _display = new balloonRight(); } else { if (this.balloonModel.color == BalloonModel.COLOR_RED){ _display = new balloonRightRed(); } else { _display = new balloonRightYellow(); }; }; addChild(_display); _display.gotoAndPlay(18); } override public function get display():MovieClip{ return (super.display); } override public function set display(_arg1:MovieClip):void{ super.display = _arg1; } private function onDisplayEnterFrame(_arg1:Event):void{ } override public function update(_arg1:Event=null):void{ super.update(_arg1); if (balloonModel.popping){ if (_display.currentFrame < 37){ _display.gotoAndPlay(37); }; }; } private function get balloonModel():BalloonModel{ return (BalloonModel(_model)); } } }//package Game.View.Entities
Section 78
//BirdView (Game.View.Entities.BirdView) package Game.View.Entities { import flash.display.*; import Game.Model.Entities.*; import flash.events.*; public class BirdView extends EntityView { public function BirdView(_arg1:EntityModel){ super(_arg1); } private function get birdModel():BirdModel{ return (BirdModel(_model)); } override public function update(_arg1:Event=null):void{ var _local2:Number; var _local3:int; this.x = this.model.location.x; this.y = this.model.location.y; if (_display == null){ return; }; if (this.birdModel.stunned){ _local2 = (this.birdModel.stunnedTime / BirdModel.HIT_STUN_DURATION); _local3 = (10 + Math.ceil((7 * _local2))); _display.gotoAndPlay(_local3); } else { if (_display.currentFrame > 10){ _display.gotoAndPlay("flying"); }; }; } override public function get display():MovieClip{ return (super.display); } override public function set display(_arg1:MovieClip):void{ super.display = _arg1; _display.scaleX = (_display.scaleX / 2); _display.scaleY = (_display.scaleY / 2); if (this.birdModel.direction == BirdModel.DIRECTION_RIGHT){ _display.scaleX = (_display.scaleX * -1); }; update(null); } } }//package Game.View.Entities
Section 79
//EntityView (Game.View.Entities.EntityView) package Game.View.Entities { import flash.display.*; import Cavalcade.View.*; import Game.Factory.*; import Game.Model.Entities.*; import flash.events.*; import Cavalcade.Interface.*; import Cavalcade.Model.*; public class EntityView extends ComponentView { protected var _display:MovieClip; public function EntityView(_arg1:ParticleModel){ super(_arg1, null); _arg1.addEventListener(Event.CHANGE, update, false, 0, true); update(null); } public function get display():MovieClip{ return (_display); } public function set display(_arg1:MovieClip):void{ _display = _arg1; var _local2:Number = _display.scaleX; var _local3:Number = _display.scaleY; if ((((((((((((((((((((((((_display is objectBear)) || ((_display is objectDrum)))) || ((_display is objectFertilizer)))) || ((_display is objectGift1)))) || ((_display is objectGift2)))) || ((_display is objectGift3)))) || ((_display is objectGift4)))) || ((_display is objectGift5)))) || ((_display is objectGift6)))) || ((_display is objectSkate)))) || ((_display is objectMittens)))) || ((_display is objectGinger)))){ _local2 = (_local2 / 1.4); _local3 = (_local3 / 1.4); } else { _local2 = (_local2 * 1.1); _local3 = (_local3 * 1.1); }; _display.scaleX = _local2; _display.scaleY = _local3; addChild(_display); } override public function destruct():void{ super.destruct(); } public function get entityModel():EntityModel{ return (EntityModel(_model)); } override public function update(_arg1:Event=null):void{ super.update(_arg1); var _local2:Number = this.model.rotation; this.x = this.model.location.x; this.y = this.model.location.y; var _local3:EntityModel = EntityModel(_model); if (_local3.absorbed){ if (this.visible){ this.visible = false; }; } else { if (_local3.absorbing){ if (this.alpha != 0.6){ this.alpha = 0.6; }; _local2 = (_local2 + 10); }; }; if (((!((this.model.entityType == EntityFactory.ENTITY_WATER))) && (!((this.model.entityType == EntityFactory.ENTITY_SUNSHINE))))){ this.rotation = _local2; }; } override public function step(_arg1:int):void{ IStep(_model).step(_arg1); } } }//package Game.View.Entities
Section 80
//MenuGameEndView (Game.View.Menus.MenuGameEndView) package Game.View.Menus { import flash.display.*; import Cavalcade.View.*; import flash.events.*; import Game.Model.Menus.*; import flash.text.*; public class MenuGameEndView extends MenuView { private var _display:MovieClip; public static const MENUITEM_CLOSE:String = "end_close"; public function MenuGameEndView(_arg1:MenuGameEndModel){ super(_arg1); _arg1.addEventListener(Event.CHANGE, update, false, 0, true); addEventListener(Event.ADDED_TO_STAGE, onAddToStage, false, 0, true); } private function onAddToStage(_arg1:Event):void{ _display = new menuOver(); _display.gotoAndPlay("paused"); _display.x = (stage.stageWidth / 2); _display.y = (stage.stageHeight / 2); prepareMenuItem(_display, MENUITEM_CLOSE); _display.addEventListener(Event.ENTER_FRAME, onDisplayEnterFrame, false, 0, true); addChild(_display); } private function onDisplayEnterFrame(_arg1:Event):void{ if (_display.currentFrame == 9){ update(null); }; } override public function update(_arg1:Event=null):void{ var event = _arg1; super.update(event); if (_display == null){ return; }; try { TextField(_display.scoreTotal).text = this.menuGameEndModel.totalScore.toString(); TextField(_display.scoreChristmasSpirit).text = this.menuGameEndModel.christmasSpirit.toString(); } catch(e:Error) { }; } private function get menuGameEndModel():MenuGameEndModel{ return (MenuGameEndModel(_model)); } } }//package Game.View.Menus
Section 81
//MenuGameIntroView (Game.View.Menus.MenuGameIntroView) package Game.View.Menus { import flash.display.*; import Cavalcade.View.*; import flash.events.*; public class MenuGameIntroView extends MenuView { private var _display:MovieClip; public static const MENUITEM_CLOSE:String = "game_intro_close"; public function MenuGameIntroView(){ addEventListener(Event.ADDED_TO_STAGE, onAddToStage, false, 0, true); } private function onDisplayEnterFrame(_arg1:Event):void{ if (_display.currentFrame == 9){ _display.addEventListener(MouseEvent.MOUSE_DOWN, onCloseButtonClick, false, 0, true); _display.buttonMode = true; } else { if (_display.currentFrame == _display.totalFrames){ _display.removeEventListener(Event.ENTER_FRAME, onDisplayEnterFrame); dispatchMenuItemClickEvent(MENUITEM_CLOSE); }; }; } private function onAddToStage(_arg1:Event):void{ _display = new popupStart(); _display.gotoAndPlay("paused"); _display.x = (stage.stageWidth / 2); _display.y = (stage.stageHeight / 2); _display.addEventListener(Event.ENTER_FRAME, onDisplayEnterFrame, false, 0, true); addChild(_display); } private function onCloseButtonClick(_arg1:MouseEvent):void{ _display.gotoAndPlay("unpause"); } } }//package Game.View.Menus
Section 82
//MenuMainView (Game.View.Menus.MenuMainView) package Game.View.Menus { import flash.display.*; import Cavalcade.View.*; import flash.events.*; import Game.*; public class MenuMainView extends MenuView { private var _howToPlay:MovieClip; private var _menuItemStartGame:MovieClip; private var _display:MovieClip; public static const MENUITEM_HOW_TO_PLAY:String = "main_how_to_play"; public static const MENUITEM_MORE_GAMES:String = "main_more_games"; public static const MENUITEM_START_GAME_EASY:String = "main_start_game_easy"; public static const MENUITEM_START_GAME_HARD:String = "main_start_game_hard"; public static const MENUITEM_HIGHSCORES:String = "main_highscores"; public static const MENUITEM_TOGGLE_SOUND:String = "main_toggle_sound"; public static const MENUITEM_START_GAME_MEDIUM:String = "main_start_game_medium"; public static const MENUITEM_START_GAME:String = "main_start_game"; public function MenuMainView(){ _display = new menuStart(); prepareMenuItem(_display.menuMoreGames, MENUITEM_MORE_GAMES); prepareMenuItem(_display.mute, MENUITEM_TOGGLE_SOUND); if (_display.menuItemHighscores != null){ prepareMenuItem(_display.menuItemHighscores, MENUITEM_HIGHSCORES); }; updateMuteIcon(); _menuItemStartGame = _display.menuStartGame; _menuItemStartGame.addEventListener(MouseEvent.MOUSE_DOWN, onStartGameMouseDown, false, 0, true); _menuItemStartGame.addEventListener(Event.ENTER_FRAME, onStartGameEnterFrame, false, 0, true); _menuItemStartGame.buttonMode = true; _menuItemStartGame.gotoAndStop(1); _display.menuHowToPlay.addEventListener(MouseEvent.MOUSE_DOWN, onHowToPlayMouseDown, false, 0, true); _display.menuHowToPlay.buttonMode = true; addChild(_display); addEventListener(Event.ADDED_TO_STAGE, onAddToStage, false, 0, true); } private function onAddToStage(_arg1:Event):void{ _howToPlay = new howtoplay(); _howToPlay.y = 481; _howToPlay.x = (stage.stageWidth / 2); _howToPlay.visible = false; addChild(_howToPlay); GameSoundManager.instance.play(GameSoundManager.SOUND_JINGLE, "", 0, 1000); } private function updateMuteIcon():void{ if (GameSoundManager.instance.muted){ _display.mute.gotoAndStop(2); } else { _display.mute.gotoAndStop(1); }; } private function onStartGameEnterFrame(_arg1:Event):void{ if (_menuItemStartGame.currentFrame == _menuItemStartGame.totalFrames){ prepareMenuItem(_menuItemStartGame.menuItemStartGameEasy, MENUITEM_START_GAME_EASY); prepareMenuItem(_menuItemStartGame.menuItemStartGameMedium, MENUITEM_START_GAME_MEDIUM); prepareMenuItem(_menuItemStartGame.menuItemStartGameHard, MENUITEM_START_GAME_HARD); }; } private function onHowToPlayMouseDown(_arg1:MouseEvent):void{ if (_howToPlay == null){ return; }; if (_howToPlay.visible){ _howToPlay.visible = false; } else { _howToPlay.gotoAndPlay(1); _howToPlay.visible = true; }; } private function onStartGameMouseDown(_arg1:MouseEvent):void{ if (_menuItemStartGame.currentFrame == 1){ _menuItemStartGame.removeEventListener(MouseEvent.MOUSE_DOWN, onStartGameMouseDown); _menuItemStartGame.buttonMode = false; _menuItemStartGame.gotoAndPlay("next"); }; } override protected function dispatchMenuItemClickEvent(_arg1:String):void{ super.dispatchMenuItemClickEvent(_arg1); if (_arg1 == MENUITEM_TOGGLE_SOUND){ updateMuteIcon(); }; } } }//package Game.View.Menus
Section 83
//MenuPauseView (Game.View.Menus.MenuPauseView) package Game.View.Menus { import flash.display.*; import Cavalcade.View.*; import flash.events.*; import Game.*; import Cavalcade.Utilities.*; public class MenuPauseView extends MenuView { private var _display:MovieClip; public static const MENU_ITEM_CLOSE:String = "pause_close"; public static const MENU_ITEM_TOGGLE_SOUND:String = "pause_toggle_sound"; public static const MENU_ITEM_RESUME_GAME:String = "pause_resume"; public static const MENU_ITEM_MAIN_MENU:String = "pause_main_menu"; public static const MENU_ITEM_RESTART_GAME:String = "pause_restart"; public function MenuPauseView(){ addEventListener(Event.ADDED_TO_STAGE, onAddToStage, false, 0, true); } private function onAddToStage(_arg1:Event):void{ _display = new menuPause(); _display.gotoAndPlay("paused"); _display.x = (stage.stageWidth / 2); _display.y = (stage.stageHeight / 2); _display.addEventListener(Event.ENTER_FRAME, onDisplayEnterFrame, false, 0, true); addChild(_display); } private function onDisplayEnterFrame(_arg1:Event):void{ DebugHelper.log(_display.currentFrame.toString(), "onDisplayEnterFrame", "", "MenuPauseView"); if (_display.currentFrame == 9){ prepareMenuItem(_display.resume, MENU_ITEM_RESUME_GAME); prepareMenuItem(_display.restart, MENU_ITEM_RESTART_GAME); prepareMenuItem(_display.main, MENU_ITEM_MAIN_MENU); prepareMenuItem(_display.mute, MENU_ITEM_TOGGLE_SOUND); updateMuteIcon(); _display.removeEventListener(Event.ENTER_FRAME, onDisplayEnterFrame); } else { if (_display.currentFrame == _display.totalFrames){ dispatchMenuItemClickEvent(MenuPauseView.MENU_ITEM_CLOSE); }; }; } private function updateMuteIcon():void{ if (GameSoundManager.instance.muted){ _display.mute.gotoAndStop(2); } else { _display.mute.gotoAndStop(1); }; } private function onCloseButtonClick(_arg1:MouseEvent):void{ } override protected function dispatchMenuItemClickEvent(_arg1:String):void{ if ((((((_arg1 == MENU_ITEM_MAIN_MENU)) || ((_arg1 == MENU_ITEM_RESTART_GAME)))) || ((_arg1 == MENU_ITEM_RESUME_GAME)))){ _display.gotoAndPlay("unpause"); }; super.dispatchMenuItemClickEvent(_arg1); if (_arg1 == MENU_ITEM_TOGGLE_SOUND){ updateMuteIcon(); }; } } }//package Game.View.Menus
Section 84
//CursorSpeakView (Game.View.CursorSpeakView) package Game.View { import flash.display.*; import flash.geom.*; import Game.Model.*; import Cavalcade.View.*; import Game.Factory.*; import flash.events.*; import Game.Controller.*; public class CursorSpeakView extends ComponentView { private var _display:MovieClip; private var _xMargin:Number;// = 30 private var _displayWidth:Number; private var _activeEntityObjects:Array; private var _activeCategory:String; private var _bounds:Rectangle; private var _activeEntityCount:int;// = 0 private var _xOffset:Number;// = 60 private var _yOffset:Number;// = 60 public function CursorSpeakView(_arg1:CursorSpeakModel, _arg2:CursorSpeakController){ _activeEntityObjects = []; super(_arg1, _arg2); _display = new starSpeak(); _displayWidth = _display.width; addChild(_display); this.visible = false; hideAllEntityDisplays(); _arg1.addEventListener(Event.CHANGE, update); } private function setActiveEntityObjects(_arg1:String, _arg2:int):void{ var _local6:DisplayObject; var _local3:Boolean; if (_arg1 == null){ _activeCategory = _arg1; _activeEntityCount = _arg2; _local3 = true; } else { if (_activeCategory == _arg1){ if (_activeEntityCount != _arg2){ _activeEntityCount = _arg2; _local3 = true; }; } else { _activeCategory = _arg1; _activeEntityCount = _arg2; _local3 = true; }; }; if (!_local3){ return; }; hideActiveEntityObjects(); if (_activeCategory == null){ return; }; var _local4:String = getEntityDisplayPrefix(_activeCategory); if (_local4 == null){ return; }; var _local5 = 1; while (_local5 <= _activeEntityCount) { _local6 = _display.getChildByName((_local4 + _local5)); if (_local6 == null){ break; }; _local6.visible = true; _activeEntityObjects.push(_local6); _local5++; }; } override public function update(_arg1:Event=null):void{ super.update(_arg1); this.x = cursorSpeakModel.x; this.y = cursorSpeakModel.y; _display.y = (_yOffset * -1); if (((this.x + _xMargin) + _displayWidth) >= _bounds.right){ _display.scaleX = -1; _display.x = (_xOffset * -1); } else { _display.scaleX = 1; _display.x = _xOffset; }; if (this.visible != cursorSpeakModel.visible){ this.visible = cursorSpeakModel.visible; }; if (!this.visible){ return; }; setActiveEntityObjects(cursorSpeakModel.activeEntityCategory, cursorSpeakModel.activeEntityCount); } private function hideAllEntityDisplays():void{ var _local2:String; var _local3:int; var _local4:DisplayObject; var _local1:Array = [getEntityDisplayPrefix(EntityFactory.CATEGORY_BALLS), getEntityDisplayPrefix(EntityFactory.CATEGORY_CANDIES), getEntityDisplayPrefix(EntityFactory.CATEGORY_FERTILIZER), getEntityDisplayPrefix(EntityFactory.CATEGORY_GIFTS), getEntityDisplayPrefix(EntityFactory.CATEGORY_STARS), getEntityDisplayPrefix(EntityFactory.CATEGORY_SUNSHINE), getEntityDisplayPrefix(EntityFactory.CATEGORY_TOYS), getEntityDisplayPrefix(EntityFactory.CATEGORY_WATER), getEntityDisplayPrefix(EntityFactory.CATEGORY_XMAS_LIGHTS)]; for each (_local2 in _local1) { _local3 = 0; do { _local3++; _local4 = _display.getChildByName((_local2 + _local3)); if (_local4 != null){ _local4.visible = false; }; } while (_local4 != null); }; } public function initialize(_arg1:Rectangle):void{ _bounds = _arg1; } private function getEntityDisplayPrefix(_arg1:String):String{ switch (_arg1){ case EntityFactory.CATEGORY_BALLS: return ("ball_"); case EntityFactory.CATEGORY_CANDIES: return ("candy_"); case EntityFactory.CATEGORY_FERTILIZER: return ("fertilizer_"); case EntityFactory.CATEGORY_GIFTS: return ("gift_"); case EntityFactory.CATEGORY_STARS: return ("star_"); case EntityFactory.CATEGORY_SUNSHINE: return ("sun_"); case EntityFactory.CATEGORY_TOYS: return ("toy_"); case EntityFactory.CATEGORY_WATER: return ("water_"); case EntityFactory.CATEGORY_XMAS_LIGHTS: return ("light_"); }; return (null); } private function hideActiveEntityObjects():void{ var _local1:DisplayObject; while (_activeEntityObjects.length > 0) { _local1 = DisplayObject(_activeEntityObjects.pop()); _local1.visible = false; }; } private function get cursorSpeakModel():CursorSpeakModel{ return (CursorSpeakModel(_model)); } } }//package Game.View
Section 85
//GamePreloaderView (Game.View.GamePreloaderView) package Game.View { import flash.display.*; import Game.Model.*; import Cavalcade.View.*; import Game.Factory.*; import flash.events.*; import Cavalcade.Event.*; import Cavalcade.Interface.*; import Game.*; import Cavalcade.Model.*; import Game.Controller.*; import flash.text.*; import flash.utils.*; public class GamePreloaderView extends PreloaderView implements IStepEventDispatcher, IDestructor { private var _lastTimeLog:int;// = 0 private var _display:Sprite; private var _entityManager:EntityManager; private var _barDisplay:Sprite; private var _pointerForceView:PointerForceView; private var _textDisplay:TextField; public function GamePreloaderView(_arg1:PreloaderModel){ super(_arg1); onModelChange(null); addEventListener(Event.ADDED_TO_STAGE, onAddToStage, false, 0, true); } public function destroy():void{ removeEventListener(Event.ENTER_FRAME, onEnterFrame); EntityFactory.destroyInstance(); if (_entityManager != null){ removeChild(_entityManager); _entityManager.destroy(); _entityManager = null; }; if (_pointerForceView != null){ removeChild(_pointerForceView); _pointerForceView.destroy(); _pointerForceView = null; }; } override public function step(_arg1:int):void{ super.step(_arg1); dispatchStepEvent(_arg1); } public function dispatchStepEvent(_arg1:int):void{ dispatchEvent(new StepEvent(StepEvent.STEP, _arg1)); } private function getElapsedTime():int{ var _local1:int; if (_lastTimeLog == 0){ _local1 = 0; } else { _local1 = (getTimer() - _lastTimeLog); }; _lastTimeLog = getTimer(); return (_local1); } override protected function onModelChange(_arg1:Event):void{ super.onModelChange(_arg1); if (stage == null){ return; }; if (_barDisplay == null){ _barDisplay = new Sprite(); addChild(_barDisplay); }; _barDisplay.graphics.clear(); var _local2:Number = (stage.stageWidth * (PreloaderModel(_model).percentComplete / 100)); var _local3:Number = (stage.stageHeight - 10); _barDisplay.graphics.beginFill(0xFFFFFF, 0.6); _barDisplay.graphics.drawRect(0, _local3, _local2, 10); } public function removeStepEventHandler(_arg1:Function, _arg2:Boolean=false):void{ removeEventListener(StepEvent.STEP, _arg1, _arg2); } private function onAddToStage(_arg1:Event):void{ removeEventListener(Event.ADDED_TO_STAGE, onAddToStage); initializeElapsedTime(); EntityFactory.instance.initialize(this); addChild(new preloader()); var _local2:EntityManager = new EntityManager(this); _local2.groundLocation = 600; var _local3:int; while (_local3 < 20) { _local2.entityQueue.push(EntityFactory.ENTITY_FLAKE); _local3++; }; addChild(_local2); var _local4:PointerForceModel = new PointerForceModel(); _local2.addPointerForceSource(_local4); var _local5:PointerForceController = new PointerForceController(_local4, this.stage); _local5.setStepEventDispatcher(this); var _local6:PointerForceView = new PointerForceView(_local4, _local5, false); addChild(_local6); _entityManager = _local2; _pointerForceView = _local6; addEventListener(Event.ENTER_FRAME, onEnterFrame, false, 0, true); } private function onEnterFrame(_arg1:Event):void{ var _local2:int = getElapsedTime(); step(_local2); } private function initializeElapsedTime():void{ _lastTimeLog = getTimer(); } public function addStepEventHandler(_arg1:Function, _arg2:Boolean=false, _arg3:int=0, _arg4:Boolean=true):void{ addEventListener(StepEvent.STEP, _arg1, _arg2, _arg3, _arg4); } } }//package Game.View
Section 86
//GameScoreView (Game.View.GameScoreView) package Game.View { import flash.display.*; import Cavalcade.View.*; import flash.events.*; import Cavalcade.Event.*; import Cavalcade.Interface.*; import Cavalcade.Model.*; import Cavalcade.Utilities.*; import Cavalcade.Controller.*; import flash.text.*; public class GameScoreView extends ScoreView implements IStepEventHandler { private var _displayedTotal:Number;// = -1 private var _display:MovieClip; private var _total:Number;// = 0 private var _stepEventSource:IStepEventDispatcher; private var _textDisplay:TextField; public function GameScoreView(_arg1:ScoreModel){ super(_arg1); _display = new UIScore(); _textDisplay = _display.score; addChild(_display); update(null); } override public function update(_arg1:Event=null):void{ super.update(_arg1); _total = ScoreModel(_model).total; } public function onStepEvent(_arg1:StepEvent):void{ if (_displayedTotal < _total){ _displayedTotal = (_displayedTotal + Math.ceil((1000 * (_arg1.elapsedTime / Time.SECOND)))); if (_displayedTotal > _total){ _displayedTotal = _total; }; _textDisplay.text = _displayedTotal.toString(); }; } public function setStepEventDispatcher(_arg1:IStepEventDispatcher):void{ _stepEventSource = _arg1; _stepEventSource.addStepEventHandler(onStepEvent); } } }//package Game.View
Section 87
//PersonView (Game.View.PersonView) package Game.View { import flash.display.*; import Game.Model.*; import Cavalcade.View.*; import Game.Model.Entities.*; import flash.events.*; import Cavalcade.Interface.*; import Game.Event.*; public class PersonView extends ComponentView implements IDestructor { private var _balloon:MovieClip; private var _display:MovieClip; private var _displayType:String; public static const DISPLAY_TYPE_1:String = "display_1"; public static const DISPLAY_TYPE_2:String = "display_2"; public function PersonView(_arg1:PersonModel, _arg2:String){ super(_arg1); _arg1.addEventListener(Event.CHANGE, update, false, 0, true); _displayType = _arg2; if (_arg2 == DISPLAY_TYPE_1){ _display = new people1(); } else { _display = new people2(); }; _display.scaleX = (_display.scaleX / 3); _display.scaleY = (_display.scaleY / 3); _display.y = -29; _display.cacheAsBitmap = true; this.cacheAsBitmap = true; if (_arg1.direction == PersonModel.DIRECTION_LEFT){ _display.scaleX = (_display.scaleX * -1); }; addChild(_display); if (_arg1.hasBalloon){ if (_arg1.balloonColor == BalloonModel.COLOR_PURPLE){ _balloon = new balloonRight(); } else { if (_arg1.balloonColor == BalloonModel.COLOR_RED){ _balloon = new balloonRightRed(); } else { _balloon = new balloonRightYellow(); }; }; _balloon.scaleX = (_balloon.scaleX / 2.5); _balloon.scaleY = (_balloon.scaleY / 2.5); if (personModel.direction == PersonModel.DIRECTION_LEFT){ _balloon.scaleX = (_balloon.scaleX * -1); }; _balloon.x = _arg1.balloonLocationLocal.x; _balloon.y = _arg1.balloonLocationLocal.y; _balloon.gotoAndPlay("held"); addChild(_balloon); _arg1.addEventListener(PersonEvent.BALLOON_RELEASED, onBalloonRelease, false, 0, true); }; update(null); } public function destroy():void{ this.personModel.removeEventListener(Event.CHANGE, update); this.personModel.removeEventListener(PersonEvent.BALLOON_RELEASED, onBalloonRelease); if (_balloon != null){ removeChild(_balloon); _balloon = null; }; if (_display != null){ removeChild(_display); _display = null; }; } public function get personModel():PersonModel{ return (PersonModel(_model)); } override public function update(_arg1:Event=null):void{ super.update(_arg1); this.x = this.personModel.x; this.y = this.personModel.y; if (_display == null){ return; }; if (this.personModel.admiring){ if (_display.currentFrame < 24){ _display.gotoAndPlay("looking"); }; } else { if (_display.currentFrame > 23){ _display.gotoAndPlay("skating"); }; }; } private function onBalloonRelease(_arg1:PersonEvent):void{ if (_balloon != null){ removeChild(_balloon); _balloon = null; }; } } }//package Game.View
Section 88
//PointerForceView (Game.View.PointerForceView) package Game.View { import flash.display.*; import flash.geom.*; import Game.Model.*; import Cavalcade.View.*; import flash.events.*; import Cavalcade.Interface.*; import Game.Controller.*; import flash.ui.*; public class PointerForceView extends ComponentView implements IDestructor { private var _display:MovieClip; private var _displayCursorStar:MovieClip; private var _displayCursorFace:MovieClip; public function PointerForceView(_arg1:PointerForceModel, _arg2:PointerForceController, _arg3:Boolean=true){ super(_arg1, _arg2); _arg1.addEventListener(Event.CHANGE, update, false, 0, true); _arg1.addEventListener(PointerForceModel.EVENT_POINTER_ACTION_CHANGE, onPointerActionChange, false, 0, true); if (_arg3){ _display = new cursorStar(); _display.scaleX = (_display.scaleX * 2); _display.scaleY = (_display.scaleY * 2); _display.visible = false; addChild(_display); _displayCursorStar = MovieClip(_display.getChildByName("mainStar")); _displayCursorStar.gotoAndStop(1); _displayCursorFace = MovieClip(_display.getChildByName("cursorFace")); _displayCursorFace.addEventListener(Event.ENTER_FRAME, onDisplayCursorFaceEnterFrame, false, 0, true); }; } private function onPointerActionChange(_arg1:Event):void{ var _local2:int = this.pointerForceModel.pointerAction; var _local3:int = _displayCursorStar.currentFrame; if (_local2 == PointerForceModel.POINTER_ACTION_READY_TO_SHOOT){ if (_local3 != 2){ _displayCursorStar.gotoAndStop(2); }; } else { if (_local3 != 1){ _displayCursorStar.gotoAndStop(1); }; }; } override public function update(_arg1:Event=null):void{ super.update(_arg1); if (_display != null){ if (_display.visible != pointerForceModel.visible){ _display.visible = pointerForceModel.visible; if (_display.visible){ Mouse.hide(); } else { Mouse.show(); }; }; }; var _local2:Point = PointerForceModel(_model).location; this.x = _local2.x; this.y = _local2.y; } private function onDisplayCursorFaceEnterFrame(_arg1:Event):void{ var _local2:int = this.pointerForceModel.pointerAction; var _local3:int = _displayCursorFace.currentFrame; if ((((_local2 == PointerForceModel.POINTER_ACTION_READY_TO_SHOOT)) || ((_local2 == PointerForceModel.POINTER_ACTION_PUSHING)))){ if ((((_local3 < 98)) || ((_local3 >= 118)))){ _displayCursorFace.gotoAndPlay(98); }; } else { if (_local3 >= 97){ _displayCursorFace.gotoAndPlay(1); }; }; } public function destroy():void{ IDestructor(_controller).destroy(); } private function get pointerForceModel():PointerForceModel{ return (PointerForceModel(_model)); } } }//package Game.View
Section 89
//SpiritLevelMeterView (Game.View.SpiritLevelMeterView) package Game.View { import flash.display.*; import Game.Model.*; import Cavalcade.View.*; import flash.events.*; import Cavalcade.Event.*; import Cavalcade.Interface.*; public class SpiritLevelMeterView extends ComponentView implements IDestructor { private var _display:MovieClip; private var _playingUpAnimation:Boolean;// = false private var _playingDownAnimation:Boolean;// = false private var _stepSource:IStepEventDispatcher; private var _displayLevelBar:MovieClip; private var _playingToCorrectLevel:Boolean;// = true private static const LEVEL_BAR_PER_SECOND:int = 1; public function SpiritLevelMeterView(_arg1:SpiritLevelMeterModel){ super(_arg1); this.spiritLevelMeterModel.addEventListener(SpiritLevelMeterModel.EVENT_LEVEL_CHANGE, onSpiritLevelChange, false, 0, true); _display = new UIXmaslevel(); _displayLevelBar = MovieClip(_display.getChildByName("levelBar")); addChild(_display); update(null); } public function get spiritLevelMeterModel():SpiritLevelMeterModel{ return (SpiritLevelMeterModel(_model)); } private function onStepEvent(_arg1:StepEvent):void{ step(_arg1.elapsedTime); } public function initialize(_arg1:IStepEventDispatcher):void{ _stepSource = _arg1; _stepSource.addStepEventHandler(onStepEvent, false, 0, true); } private function onSpiritLevelChange(_arg1:Event):void{ _playingUpAnimation = true; _playingDownAnimation = false; _playingToCorrectLevel = false; } public function addPauseMenuClickHandler(_arg1:Function):void{ if (_display == null){ return; }; _display.menuItemPause.addEventListener(MouseEvent.MOUSE_DOWN, _arg1, false, 0, true); _display.menuItemPause.buttonMode = true; } public function destroy():void{ if (_stepSource != null){ _stepSource.removeStepEventHandler(onStepEvent); _stepSource = null; }; this.spiritLevelMeterModel.removeEventListener(SpiritLevelMeterModel.EVENT_LEVEL_CHANGE, onSpiritLevelChange); } override public function step(_arg1:int):void{ super.step(_arg1); var _local2:int = _displayLevelBar.currentFrame; var _local3:int = _local2; var _local4:int = (this.spiritLevelMeterModel.level + 1); if (_playingUpAnimation){ _local3 = (_local3 + 1); if (_local3 >= 9){ _local3 = 9; _playingUpAnimation = false; _playingToCorrectLevel = true; } else { if (_local3 >= (_local4 + 2)){ _local3 = (_local4 + 2); _playingUpAnimation = false; _playingToCorrectLevel = true; }; }; } else { if (_playingToCorrectLevel){ if (_local4 > _local2){ _local3 = (_local3 + 1); } else { if (_local4 < _local2){ _local3--; }; }; }; }; if (_local3 != _local2){ _displayLevelBar.gotoAndStop(_local3); }; } public function get menuItemPauseDisplay():MovieClip{ if (_display == null){ return (null); }; return (_display.menuItemPause); } } }//package Game.View
Section 90
//TreeDecorContainerView (Game.View.TreeDecorContainerView) package Game.View { import flash.display.*; import flash.geom.*; import Game.Model.*; import Cavalcade.View.*; import Game.Factory.*; import flash.events.*; import Cavalcade.Event.*; import Cavalcade.Interface.*; import Game.Event.*; import Cavalcade.Utilities.*; public class TreeDecorContainerView extends CompositeView implements IDestructor { private var _treeViewDisplay:MovieClip; private var _stepSource:IStepEventDispatcher; private var _decors:Array; private var _decorShowQueue:Array; private var _decorCurrentFrameRef:int;// = 0 private var _groundLocation:Number;// = 0 private static const BAD_LEVEL_1:int = 1; private static const BAD_LEVEL_3:int = 3; private static const DECOR_ITEM_FALL_TO_FLOOR:String = "fall_to_floor"; private static const DECOR_ITEM_BAD_LEVEL:String = "bad_level"; private static const DECOR_ITEM_SHOW_ANIMATION_DONE:String = "show_anim_done"; private static const DECOR_ITEM_FALL_ANIMATION_DONE:String = "fall_anim_done"; private static const DECOR_ITEM_CATEGORY:String = "category"; private static const DECOR_ITEM_ALLOWED_LEVELS:String = "allowed_levels"; private static const DECOR_ITEM_DISPLAY:String = "display"; private static const DECOR_ITEM_FALL_TO_FLOOR_LEVELS:String = "fall_to_floor_levels"; private static const BAD_LEVEL_2:int = 2; private static const BAD_LEVEL_4:int = 4; public function TreeDecorContainerView(_arg1:TreeDecorContainerModel, _arg2:IStepEventDispatcher, _arg3:TreeView){ _decorShowQueue = []; super(_arg1); _arg1.addEventListener(TreeDecorContainerEvent.NEW_DECOR, onNewDecor, false, 0, true); _stepSource = _arg2; _stepSource.addStepEventHandler(onStepEvent); _treeViewDisplay = _arg3.display; _groundLocation = 10; initializeDecors(); } public function destroy():void{ removeAllViews(); IEventDispatcher(_model).removeEventListener(TreeDecorContainerEvent.NEW_DECOR, onNewDecor); if (_stepSource != null){ _stepSource.removeStepEventHandler(onStepEvent); _stepSource = null; }; if (_treeViewDisplay != null){ _treeViewDisplay = null; }; } private function onNewDecor(_arg1:TreeDecorContainerEvent):void{ showDecor(_arg1.decorModel.entityCategory, _arg1.treeLevel); } private function initializeDecors():void{ _decors = []; var _local1:Array = [3, 4, 5, 6]; var _local2:Array = [2]; var _local3:Array = [1]; var _local4:Array = [1, 2]; _decors.push(prepareDecorItem(EntityFactory.CATEGORY_XMAS_LIGHTS, "decorLightStage1", _local3)); _decors.push(prepareDecorItem(EntityFactory.CATEGORY_XMAS_LIGHTS, "decorLightMedBad", _local2)); _decors.push(prepareDecorItem(EntityFactory.CATEGORY_XMAS_LIGHTS, "decorLight1", _local1)); _decors.push(prepareDecorItem(EntityFactory.CATEGORY_XMAS_LIGHTS, "decorLight2", _local1)); _decors.push(prepareDecorItem(EntityFactory.CATEGORY_XMAS_LIGHTS, "decorLight3", _local1)); _decors.push(prepareDecorItem(EntityFactory.CATEGORY_XMAS_LIGHTS, "decorLight4", _local1)); _decors.push(prepareDecorItem(EntityFactory.CATEGORY_CANDIES, "decorCane1", _local1, _local4)); _decors.push(prepareDecorItem(EntityFactory.CATEGORY_CANDIES, "decorCane2", _local1, _local4)); _decors.push(prepareDecorItem(EntityFactory.CATEGORY_CANDIES, "decorCane3", _local1, _local4)); _decors.push(prepareDecorItem(EntityFactory.CATEGORY_TOYS, "decorGinger", _local1, _local4)); _decors.push(prepareDecorItem(EntityFactory.CATEGORY_TOYS, "decorBear", _local1, _local4)); _decors.push(prepareDecorItem(EntityFactory.CATEGORY_TOYS, "decorMittens", _local1, _local4)); _decors.push(prepareDecorItem(EntityFactory.CATEGORY_GIFTS, "decorGift1", _local1, _local4)); _decors.push(prepareDecorItem(EntityFactory.CATEGORY_GIFTS, "decorGift2", _local1, _local4)); _decors.push(prepareDecorItem(EntityFactory.CATEGORY_GIFTS, "decorGift3", _local1, _local4)); _decors.push(prepareDecorItem(EntityFactory.CATEGORY_BALLS, "decorBall1", _local1, _local4)); _decors.push(prepareDecorItem(EntityFactory.CATEGORY_BALLS, "decorBall2", _local1, _local4)); _decors.push(prepareDecorItem(EntityFactory.CATEGORY_BALLS, "decorBall3", _local1, _local4)); _decors.push(prepareDecorItem(EntityFactory.CATEGORY_STARS, "decorStar", _local1, _local4)); } private function showDecor(_arg1:String, _arg2:int):void{ var _local3:Object; var _local4:MovieClip; var _local5:int; var _local6:Object; var _local7:ColorTransform; DebugHelper.log(_arg1, "category", "showDecor", "TreeDecorContainerView"); if (_arg2 >= TreeModel.GROWTH_LEVEL_FULL){ _local3 = getDecorItemByCategory(_arg1, _arg2); } else { if (_arg2 >= TreeModel.GROWTH_LEVEL_MEDIUM){ _local3 = getDecorItemByCategory(_arg1, _arg2); } else { if (_arg2 >= TreeModel.GROWTH_LEVEL_STAGE1){ if (_arg1 == EntityFactory.CATEGORY_XMAS_LIGHTS){ _local5 = treeDecorContainerModel.getDecorEntityCategoryCount(_arg1); if (_local5 == 2){ _local3 = getDecorItemByCategory(_arg1, _arg2); }; } else { _local3 = getDecorItemByCategory(_arg1, _arg2); }; }; }; }; if (_local3 == null){ if (_arg1 != EntityFactory.CATEGORY_XMAS_LIGHTS){ for each (_local6 in _decorShowQueue) { if ((((_local6[DECOR_ITEM_CATEGORY] == _arg1)) && ((_local6[DECOR_ITEM_BAD_LEVEL] < BAD_LEVEL_4)))){ _local6[DECOR_ITEM_BAD_LEVEL] = (_local6[DECOR_ITEM_BAD_LEVEL] + 1); _local4 = MovieClip(_local6[DECOR_ITEM_DISPLAY]); MovieClip(_local6[DECOR_ITEM_DISPLAY]).scaleX = (_local4.scaleX * 1.2); _local4.scaleY = (_local4.scaleY * 1.2); if ((((_arg1 == EntityFactory.CATEGORY_STARS)) && ((_local6[DECOR_ITEM_BAD_LEVEL] >= BAD_LEVEL_2)))){ _local6[DECOR_ITEM_BAD_LEVEL] = BAD_LEVEL_4; }; if (_local6[DECOR_ITEM_BAD_LEVEL] == BAD_LEVEL_4){ _local6[DECOR_ITEM_FALL_TO_FLOOR] = true; _local6[DECOR_ITEM_FALL_ANIMATION_DONE] = false; }; }; }; }; } else { _local4 = MovieClip(_local3[DECOR_ITEM_DISPLAY]); _local7 = _local4.transform.colorTransform; _local7.blueOffset = 0xFF; _local7.redOffset = 0xFF; _local7.greenOffset = 0xFF; _local4.transform.colorTransform = _local7; _local4.visible = true; if (_arg1 == EntityFactory.CATEGORY_XMAS_LIGHTS){ _local4.gotoAndPlay(1); }; if (_local3[DECOR_ITEM_FALL_TO_FLOOR]){ _local3[DECOR_ITEM_FALL_ANIMATION_DONE] = false; } else { _local3[DECOR_ITEM_FALL_ANIMATION_DONE] = true; }; _decorShowQueue.push(_local3); }; } override public function update(_arg1:Event=null):void{ super.update(_arg1); } private function onStepEvent(_arg1:StepEvent):void{ stepShowQueue(_arg1.elapsedTime); } private function getDecorItemByCategory(_arg1:String, _arg2:int):Object{ var _local3:Object; var _local7:Array; var _local8:Array; if (_decors == null){ return (null); }; var _local4 = -1; var _local5:Boolean; var _local6:int; while (_local6 < _decors.length) { _local3 = _decors[_local6]; if (_local3[DECOR_ITEM_CATEGORY] == _arg1){ _local7 = (_local3[DECOR_ITEM_ALLOWED_LEVELS] as Array); if (_local7.indexOf(_arg2) >= 0){ _local4 = _local6; break; }; if (_local3[DECOR_ITEM_FALL_TO_FLOOR_LEVELS] != null){ _local8 = (_local3[DECOR_ITEM_FALL_TO_FLOOR_LEVELS] as Array); if (_local8.indexOf(_arg2) >= 0){ _local4 = _local6; _local5 = true; break; }; }; }; _local6++; }; if (_local4 >= 0){ _local3 = ArrayHelper.popItemAt(_decors, _local4); _local3[DECOR_ITEM_FALL_TO_FLOOR] = _local5; if (_local5){ _local3[DECOR_ITEM_BAD_LEVEL] = BAD_LEVEL_4; }; return (_local3); }; return (null); } private function prepareDecorItem(_arg1:String, _arg2:String, _arg3:Array, _arg4:Array=null):Object{ var _local5:Object = new Object(); var _local6:DisplayObject = _treeViewDisplay.getChildByName(_arg2); _local6.visible = false; _local5[DECOR_ITEM_DISPLAY] = _local6; _local5[DECOR_ITEM_CATEGORY] = _arg1; _local5[DECOR_ITEM_SHOW_ANIMATION_DONE] = false; _local5[DECOR_ITEM_ALLOWED_LEVELS] = _arg3; _local5[DECOR_ITEM_FALL_TO_FLOOR] = false; _local5[DECOR_ITEM_FALL_TO_FLOOR_LEVELS] = _arg4; _local5[DECOR_ITEM_BAD_LEVEL] = 0; return (_local5); } private function stepShowQueue(_arg1:int):void{ var _local3:Object; var _local4:MovieClip; var _local5:ColorTransform; var _local6:int; var _local2:Number = (50 * (_arg1 / Time.SECOND)); for each (_local3 in _decorShowQueue) { _local4 = MovieClip(_local3[DECOR_ITEM_DISPLAY]); if (_local3[DECOR_ITEM_SHOW_ANIMATION_DONE] == false){ _local5 = _local4.transform.colorTransform; _local5.blueOffset = decreaseColorOffset(_local5.blueOffset); _local5.redOffset = decreaseColorOffset(_local5.redOffset); _local5.greenOffset = decreaseColorOffset(_local5.greenOffset); _local4.transform.colorTransform = _local5; if (_local5.blueOffset == 0){ _local3[DECOR_ITEM_SHOW_ANIMATION_DONE] = true; }; } else { if (_local3[DECOR_ITEM_FALL_ANIMATION_DONE] == false){ if (_local4.y < _groundLocation){ _local6 = MathEx.random(10, 20); _local4.y = (_local4.y + _local2); _local4.rotation = (_local4.rotation + _local6); if (_local4.y >= _groundLocation){ _local4.y = _groundLocation; _local3[DECOR_ITEM_FALL_ANIMATION_DONE] = true; }; }; }; }; }; } private function decreaseColorOffset(_arg1:Number):Number{ _arg1 = (_arg1 - 10); if (_arg1 < 0){ _arg1 = 0; }; return (_arg1); } private function get treeDecorContainerModel():TreeDecorContainerModel{ return (TreeDecorContainerModel(_model)); } } }//package Game.View
Section 91
//TreeView (Game.View.TreeView) package Game.View { import flash.display.*; import flash.geom.*; import Game.Model.*; import Cavalcade.View.*; import flash.events.*; import Game.Notifier.*; import Cavalcade.Event.*; import Cavalcade.Interface.*; import Game.*; import Game.Event.*; import Cavalcade.Utilities.*; import Cavalcade.Controller.*; public class TreeView extends ComponentView implements IStepEventHandler { private var _display:MovieClip; private var _absorbFlashCount:int;// = 0 private var _hitAreas:Array; private var _decorContainer:TreeDecorContainerView; private var _stepProvider:IStepEventDispatcher; public function TreeView(_arg1:TreeModel){ _hitAreas = []; super(_arg1); _display = new treeMiddle(); _display.scaleX = (_display.scaleX * 4); _display.scaleY = (_display.scaleY * 4); addChild(_display); _arg1.addEventListener(TreeModel.EVENT_INITIALIZED, onModelInitialize, false, 0, true); _arg1.addEventListener(TreeModel.EVENT_GROW, onModelGrow, false, 0, true); _arg1.addEventListener(TreeEvent.ABSORBED_ENTITY, onAbsorbEntity, false, 0, true); addEventListener(Event.ADDED_TO_STAGE, onAddToStage, false, 0, true); } private function onAddToStage(_arg1:Event):void{ removeEventListener(Event.ADDED_TO_STAGE, onAddToStage); } public function setStepEventDispatcher(_arg1:IStepEventDispatcher):void{ _stepProvider = _arg1; _stepProvider.addStepEventHandler(onStepEvent); } public function get display():MovieClip{ return (_display); } private function onAbsorbEntity(_arg1:TreeEvent):void{ _absorbFlashCount = 8; } public function get decorContainer():TreeDecorContainerView{ return (_decorContainer); } private function onModelInitialize(_arg1:Event):void{ removeEventListener(TreeModel.EVENT_INITIALIZED, onModelInitialize); var _local2:TreeModel = TreeModel(_model); this.x = _local2.location.x; this.y = _local2.location.y; onModelGrow(null); } private function onModelGrow(_arg1:Event):void{ var _local3:Sprite; var _local4:Rectangle; var _local2:TreeModel = TreeModel(_model); switch (_local2.growthLevel){ case 0: _display.gotoAndPlay("stage0"); break; case 1: _display.gotoAndPlay("stage1"); break; case 2: _display.gotoAndPlay("stage2"); break; case 3: _display.gotoAndPlay("stage3"); break; case 4: _display.gotoAndPlay("stage4"); break; case 5: _display.gotoAndPlay("stage5"); break; case 6: _display.gotoAndPlay("stage6"); break; }; if (Settings.DEBUG_TREE_HIT_AREA){ while (_hitAreas.length > 0) { _local3 = _hitAreas.pop(); _local3.parent.removeChild(_local3); _local3 = null; }; for each (_local4 in _local2.hitAreas) { _local3 = DebugHelper.createRectangle(this.parent, _local4); _hitAreas.push(_local3); }; }; if (_arg1 != null){ GrowthNotifier.instance.notify(_local2.location.x, (_local2.location.y - 100)); }; } public function onStepEvent(_arg1:StepEvent):void{ var _local2:ColorTransform; if (_absorbFlashCount == 0){ return; }; if ((_absorbFlashCount % 2) == 0){ _local2 = _display.transform.colorTransform; if (_local2.blueOffset == 0){ _local2.blueOffset = 0xFF; _local2.redOffset = 0xFF; _local2.greenOffset = 0xFF; } else { _local2.blueOffset = 0; _local2.redOffset = 0; _local2.greenOffset = 0; }; _display.transform.colorTransform = _local2; }; _absorbFlashCount--; if (_absorbFlashCount == 1){ if (_local2.blueOffset == 0xFF){ _absorbFlashCount = 2; }; }; } public function set decorContainer(_arg1:TreeDecorContainerView):void{ if (_decorContainer != null){ removeChild(_decorContainer); _decorContainer = null; }; _decorContainer = _arg1; addChildAt(_decorContainer, this.numChildren); } } }//package Game.View
Section 92
//XmasLineView (Game.View.XmasLineView) package Game.View { import flash.display.*; import Game.Model.*; import Cavalcade.View.*; import flash.events.*; public class XmasLineView extends ComponentView { private var _display:MovieClip; public function XmasLineView(_arg1:XmasLineModel){ super(_arg1); _display = new xmasLine(); _display.cacheAsBitmap = true; addChild(_display); update(); } override public function update(_arg1:Event=null):void{ super.update(_arg1); this.x = this.xmasLineModel.x; this.y = this.xmasLineModel.y; } public function get xmasLineModel():XmasLineModel{ return (XmasLineModel(_model)); } } }//package Game.View
Section 93
//EntityManager (Game.EntityManager) package Game { import flash.geom.*; import Game.Model.*; import Cavalcade.View.*; import Game.Factory.*; import Game.View.Entities.*; import Game.Model.Entities.*; import Cavalcade.Interface.*; import Game.Interface.*; import Game.Event.*; import Cavalcade.Utilities.*; import flash.utils.*; public class EntityManager extends ParticleManagerView implements IDestructor, IPointerActionEventSource { private var _entityBatchGroup:Array; private var _maxCountBirds:int;// = 1 private var _peopleManager:PeopleManager; private var _lastBatchEntityCategory:String; private var _entityCountBirds:int;// = 0 private var _vacuums:Array; private var _entityQueue:Array; private var _lastBirdTimeCreated:int;// = 0 private var _maxCountBalloons:int;// = 10 private var _maxCountDecors:int;// = 9 private var _entityCountDecors:int;// = 0 private var _readyToShoot:Boolean;// = false private var _pushing:Boolean;// = false private var _birdChanceOnInterval:Number;// = 0.5 private var _dispatchedEmptyQueueEvent:Boolean;// = false private var _pointerForceSources:Array; private var _magnetSources:Array; private var _entityCountBalloons:int;// = 0 private var _useQueueOnly:Boolean;// = true private var _groundLocation:int;// = 0 private var _birdInterval:int;// = 40000 public function EntityManager(_arg1:IStepEventDispatcher){ _vacuums = []; _entityQueue = []; _entityBatchGroup = []; _pointerForceSources = []; _magnetSources = []; super(_arg1); } public function get pushing():Boolean{ return (_pushing); } public function removePointerForceSource(_arg1:IPointerForceEventSource):void{ var _local2:int = _pointerForceSources.indexOf(_arg1); _arg1 = ArrayHelper.popItemAt(_pointerForceSources, _local2); _arg1.removeEventListener(PointerForceEvent.FORCE, onPointerForceEvent); _arg1.removeEventListener(PointerForceEvent.SHOOT, onPointerForceShoot); } private function getDirectionalForce(_arg1:Point, _arg2:Point, _arg3:Number):Point{ var _local4:Point = getForceDirection(_arg1, _arg2); getForceDirection(_arg1, _arg2).x = (_local4.x * (Math.abs((_arg2.x - _arg1.x)) * Math.sqrt(_arg3))); _local4.y = (_local4.y * (Math.abs((_arg2.y - _arg1.y)) * Math.sqrt(_arg3))); return (_local4); } public function get maxCountDecors():int{ return (_maxCountDecors); } public function get birdInterval():int{ return (_birdInterval); } public function addPointerActionEventHandler(_arg1:Function, _arg2:Boolean=false, _arg3:int=0, _arg4:Boolean=true):void{ addEventListener(PointerActionEvent.CHANGE, _arg1, _arg2, _arg3, _arg4); } public function get vacuums():Array{ return (_vacuums); } public function get entityBatchGroup():Array{ return (_entityBatchGroup); } public function setMagnetSources(_arg1:Array):void{ _magnetSources = _arg1; } public function set maxCountDecors(_arg1:int):void{ _maxCountDecors = _arg1; } private function checkVacuums():void{ var _local1:EntityView; var _local2:EntityModel; var _local3:IVacuum; for each (_local1 in _views) { _local2 = EntityModel(_local1.model); if (!_local2.absorbable){ } else { for each (_local3 in _vacuums) { if (((_local2.absorbed) || (_local2.absorbing))){ } else { if (_local3.absorb(_local2)){ _local2.forceAbsorbed(); GameSoundManager.instance.play(GameSoundManager.SOUND_ABSORB); dispatchEvent(new EntityManagerEvent(EntityManagerEvent.ENTITY_ABSORBED)); break; }; }; }; }; }; } public function removePointerActionEventHandler(_arg1:Function, _arg2:Boolean=false):void{ removeEventListener(PointerActionEvent.CHANGE, _arg1, _arg2); } public function set groundLocation(_arg1:int):void{ _groundLocation = _arg1; } public function set vacuums(_arg1:Array):void{ _vacuums = _arg1; } private function cleanUp():void{ var _local2:EntityView; var _local3:EntityView; if (_views.length == 0){ return; }; var _local1:Array = []; for each (_local2 in _views) { if (_local2.model.finished){ _local1.push(_local2); } else { if (_local2.y >= _groundLocation){ _local1.push(_local2); } else { if (EntityModel(_local2.model).absorbed){ _local1.push(_local2); }; }; }; }; while (_local1.length > 0) { _local3 = _local1.pop(); if (_local3.model.entityType == EntityFactory.ENTITY_BIRD_1){ removePointerForceSource(IPointerForceEventSource(_local3.model)); _entityCountBirds--; } else { if (_local3.model.entityType == EntityFactory.ENTITY_BALLOON_1){ removePointerForceSource(IPointerForceEventSource(_local3.model)); _entityCountBalloons--; } else { _entityCountDecors--; }; }; removeView(_local3); }; } public function get readyToShoot():Boolean{ return (_readyToShoot); } private function getForceDirection(_arg1:Point, _arg2:Point):Point{ var _local3:Point = new Point(1, 1); if (_arg2.x < _arg1.x){ _local3.x = -1; }; if (_arg2.y < _arg1.y){ _local3.y = -1; }; return (_local3); } public function set birdInterval(_arg1:int):void{ _birdInterval = _arg1; } override public function step(_arg1:int):void{ var _local2:EntityView; var _local3:Point; var _local5:Array; var _local6:String; var _local7:EntityManagerEvent; super.step(_arg1); checkVacuums(); checkForMagnets(); cleanUp(); if (stage == null){ return; }; if (_entityBatchGroup != null){ if (_entityCountDecors == 0){ if ((((_entityBatchGroup.length == 0)) && (!(_dispatchedEmptyQueueEvent)))){ dispatchEvent(new EntityManagerEvent(EntityManagerEvent.ENTITY_QUEUE_EMPTY)); _dispatchedEmptyQueueEvent = true; } else { if (_entityBatchGroup.length > 0){ _local5 = (_entityBatchGroup.pop() as Array); for each (_local6 in _local5) { _local2 = EntityFactory.instance.createEntity(_local6); _local3 = new Point(MathEx.random((0 + 50), (stage.stageWidth - 50)), (-1 * MathEx.random(0, 50))); _local2.model.setLocation(_local3); addView(_local2); _lastBatchEntityCategory = EntityFactory.instance.getCategoryFromEntityType(_local6); _entityCountDecors++; _local7 = new EntityManagerEvent(EntityManagerEvent.NEW_ENTITY); _local7.entity = EntityModel(_local2.model); dispatchEvent(_local7); }; }; }; }; } else { if (_useQueueOnly){ if (_entityCountDecors == 0){ if ((((_entityQueue.length == 0)) && (!(_dispatchedEmptyQueueEvent)))){ dispatchEvent(new EntityManagerEvent(EntityManagerEvent.ENTITY_QUEUE_EMPTY)); _dispatchedEmptyQueueEvent = true; }; while ((((_entityCountDecors < _maxCountDecors)) && ((_entityQueue.length > 0)))) { _local2 = EntityFactory.instance.createEntity(_entityQueue.pop()); _local3 = new Point(MathEx.random((0 + 50), (stage.stageWidth - 50)), (-1 * MathEx.random(0, 50))); _local2.model.setLocation(_local3); addView(_local2); _entityCountDecors++; }; }; } else { if (_entityCountDecors == 0){ while (_entityCountDecors < _maxCountDecors) { if (_entityQueue.length > 0){ _local2 = EntityFactory.instance.createEntity(_entityQueue.pop()); } else { _local2 = EntityFactory.instance.createRandomDecor(); }; if (_local2 != null){ _local3 = new Point(MathEx.random(0, stage.stageWidth), (-1 * MathEx.random(0, 50))); _local2.model.setLocation(_local3); addView(_local2); _entityCountDecors++; }; }; }; }; }; var _local4:int = getTimer(); if ((((((_entityCountBirds < _maxCountBirds)) && (((_local4 - _lastBirdTimeCreated) >= _birdInterval)))) && ((Math.random() <= _birdChanceOnInterval)))){ _local2 = EntityFactory.instance.createRandomBird(); addView(_local2); addPointerForceSource(BirdModel(_local2.model)); _entityCountBirds++; _lastBirdTimeCreated = _local4; }; } public function set entityBatchGroup(_arg1:Array):void{ _entityBatchGroup = _arg1; } public function setPeopleManager(_arg1:PeopleManager):void{ _arg1.addEventListener(PersonEvent.BALLOON_RELEASED, onPeopleBalloonReleased, false, 0, true); _peopleManager = _arg1; } private function onPeopleBalloonReleased(_arg1:PersonEvent):void{ var _local2:EntityView = EntityFactory.instance.createBalloon(_arg1.balloonColor); var _local3:BalloonModel = BalloonModel(_local2.model); _local3.setLocation(new Point(_arg1.balloonLocationX, _arg1.balloonLocationY)); addView(_local2); addPointerForceSource(_local3); } public function addMagnetSource(_arg1:IMagnet):void{ if (_magnetSources.indexOf(_arg1) >= 0){ return; }; _magnetSources.push(_arg1); } private function checkForMagnets():void{ var _local1:EntityView; var _local2:EntityModel; var _local3:IMagnet; if (_magnetSources == null){ return; }; if (_magnetSources.length == 0){ return; }; for each (_local1 in _views) { _local2 = _local1.entityModel; if (((((((!(_local2.canBePulledbyMagnet)) || (_local2.finished))) || (_local2.absorbed))) || (_local2.absorbing))){ } else { for each (_local3 in _magnetSources) { _local3.pull(_local2); }; }; }; } public function get lastBatchEntityCategory():String{ return (_lastBatchEntityCategory); } private function onPointerForceEvent(_arg1:PointerForceEvent):void{ var _local5:EntityView; var _local6:Number; var _local7:Point; var _local2:Boolean; var _local3:Boolean; var _local4:Boolean; for each (_local5 in _views) { _local6 = Point.distance(_local5.model.location, _arg1.location); if (((_local5.model.shootable) && ((_local6 <= _arg1.shootEffectiveDistance)))){ _local4 = true; } else { if (((_local5.model.pushable) && ((_local6 <= _arg1.effectiveDistance)))){ _local7 = getDirectionalForce(_arg1.location, _local5.model.location, _arg1.force.x); _local5.model.applyForce(_local7); _local3 = true; }; }; }; if (((!((_local3 == _pushing))) || (!((_local4 == _readyToShoot))))){ _local2 = true; }; _pushing = _local3; _readyToShoot = _local4; if (_local2){ dispatchEvent(new PointerActionEvent(PointerActionEvent.CHANGE)); }; } public function get entityQueue():Array{ return (_entityQueue); } private function onPointerForceShoot(_arg1:PointerForceEvent):void{ var _local2:EntityView; var _local3:Number; var _local4:Point; for each (_local2 in _views) { _local3 = Point.distance(_local2.model.location, _arg1.location); if (((_local2.model.shootable) && ((_local3 <= _arg1.shootEffectiveDistance)))){ _local4 = getForceDirection(_arg1.location, _local2.model.location); getForceDirection(_arg1.location, _local2.model.location).x = (_local4.x * _arg1.shootForce); _local4.y = (_local4.y * _arg1.shootForce); if (_local2.model.entityType == EntityFactory.ENTITY_BALLOON_1){ _local2.model.forceAbsorbed(); GameSoundManager.instance.play(GameSoundManager.SOUND_BALLOON_POP); dispatchEvent(new EntityManagerEvent(EntityManagerEvent.BALLOON_HIT)); } else { if (_local2.model.entityType == EntityFactory.ENTITY_BIRD_1){ _local2.model.forceAbsorbed(); GameSoundManager.instance.play(GameSoundManager.SOUND_BIRD_OUCH); dispatchEvent(new EntityManagerEvent(EntityManagerEvent.BIRD_HIT)); }; }; }; }; } public function get groundLocation():int{ return (_groundLocation); } public function addPointerForceSource(_arg1:IPointerForceEventSource):void{ if (_pointerForceSources.indexOf(_arg1) >= 0){ return; }; _arg1.addEventListener(PointerForceEvent.FORCE, onPointerForceEvent, false, 0, true); _arg1.addEventListener(PointerForceEvent.SHOOT, onPointerForceShoot, false, 0, true); _pointerForceSources.push(_arg1); } override public function destroy():void{ var _local1:IPointerForceEventSource; super.destroy(); while (_pointerForceSources.length > 0) { _local1 = _pointerForceSources.pop(); _local1.removeEventListener(PointerForceEvent.FORCE, onPointerForceEvent); _local1.removeEventListener(PointerForceEvent.SHOOT, onPointerForceShoot); _local1 = null; }; if (_peopleManager != null){ _peopleManager.removeEventListener(PersonEvent.BALLOON_RELEASED, onPeopleBalloonReleased); _peopleManager = null; }; _vacuums = null; _entityQueue = null; } public function set entityQueue(_arg1:Array):void{ _entityQueue = _arg1; } } }//package Game
Section 94
//GameEngine (Game.GameEngine) package Game { import flash.display.*; import flash.geom.*; import Game.Model.*; import Game.Factory.*; import flash.events.*; import Game.Notifier.*; import Cavalcade.Event.*; import Cavalcade.Interface.*; import Game.Event.*; import Cavalcade.*; import Cavalcade.Model.*; import Game.Controller.*; import Game.View.*; import Cavalcade.Utilities.*; import com.flashdynamix.utils.*; import Game.View.Menus.*; import flash.ui.*; public class GameEngine extends Engine implements IDestructor { private var _level:GameLevelModel; private var _bgGround:MovieClip; private var _preparingEnding:Boolean;// = false private var _bgNight:MovieClip; private var _spiritLevelView:SpiritLevelMeterView; private var _endCountdownLeft:int;// = 0 private var _peopleManager:PeopleManager; private var _cursorSpeakView:CursorSpeakView; private var _vacuums:Array; private var _entityManager:EntityManager; private var _arrowNotifier:ArrowNotifier; private var _finished:Boolean;// = false private var _pointerForceView:PointerForceView; private var _scoreView:GameScoreView; private var _magnetSources:Array; public function GameEngine(){ _magnetSources = []; _vacuums = []; super(); } public function destroy():void{ GameSoundManager.instance.stop(GameSoundManager.SOUND_JINGLE); } override public function stop():Boolean{ if (!super.stop()){ return (false); }; Mouse.show(); ScoreManager.instance.stop(); if (_pointerForceView != null){ PointerForceController(_pointerForceView.controller).destroy(); }; if (_cursorSpeakView != null){ IDisposable(_cursorSpeakView.controller).dispose(); }; return (true); } public function get level():GameLevelModel{ return (_level); } public function set level(_arg1:GameLevelModel):void{ _level = _arg1; } override protected function initialize():void{ if (_level == null){ return; }; super.initialize(); SWFProfiler.init(this.stage, this); initBackground(); GrowthNotifier.instance.initialize(this); EntityFactory.instance.initialize(this); initializeXmasLine(); initializeVacuums(); initializePeopleManager(_vacuums); initScoreView(); initializeSpiritLevelMeter(_peopleManager); initializeEntityManager(_peopleManager, _vacuums, _magnetSources); initializeArrowNotifier(_entityManager); initializePointerForce(_entityManager); initializeCursorSpeak(_entityManager, _vacuums); ScoreManager.instance.initialize(_entityManager, _peopleManager); ScoreManager.instance.start(); GameSoundManager.instance.stop(GameSoundManager.SOUND_JINGLE); GameSoundManager.instance.play(GameSoundManager.SOUND_JINGLE, "", 0, 1000); MenuManager.instance.addMenuItemClickListener(onMenuItemClick); stage.focus = null; } private function initializeEntityManager(_arg1:PeopleManager, _arg2:Array, _arg3:Array):void{ _entityManager = new EntityManager(this); _entityManager.maxCountDecors = _level.numberOfDecorsPerBatch; _entityManager.birdInterval = _level.birdInterval; _entityManager.entityBatchGroup = _level.entityBatchGroup; _entityManager.groundLocation = 600; addChild(_entityManager); _entityManager.vacuums = _arg2; _entityManager.setPeopleManager(_arg1); _entityManager.setMagnetSources(_magnetSources); _entityManager.addEventListener(EntityManagerEvent.ENTITY_QUEUE_EMPTY, onEntityManagerQueueEmpty, false, 0, true); } private function initScoreView():void{ var _local1:ScoreModel = new ScoreModel(ScoreManager.instance); var _local2:GameScoreView = new GameScoreView(_local1); _local2.setStepEventDispatcher(this); _local2.x = 5; _local2.y = 0; _scoreView = _local2; addChild(_scoreView); } private function initializeXmasLine():void{ var _local1:XmasLineModel; var _local2:XmasLineView; if (!_level.showXmasLine){ return; }; _local1 = new XmasLineModel(); _local1.x = ((stage.stageWidth / 2) - 2); _local1.y = (_local1.height / 2); _local2 = new XmasLineView(_local1); addChild(_local2); _magnetSources.push(_local1); _local1 = new XmasLineModel(); _local1.x = (((stage.stageWidth / 4) - 15) - 2); _local1.y = (_local1.height / 2); _local2 = new XmasLineView(_local1); addChild(_local2); _magnetSources.push(_local1); _local1 = new XmasLineModel(); _local1.x = ((((stage.stageWidth / 4) * 3) + 15) - 2); _local1.y = (_local1.height / 2); _local2 = new XmasLineView(_local1); addChild(_local2); _magnetSources.push(_local1); } private function initializeVacuums():void{ var _local1:TreeModel; var _local2:TreeView; var _local3:TreeDecorContainerModel; var _local4:TreeDecorContainerView; _local1 = new TreeModel(); _local1.location = new Point(((stage.stageWidth / 4) - 15), 450); _local2 = new TreeView(_local1); _local3 = new TreeDecorContainerModel(); _local3.initialize(_local1); _local4 = new TreeDecorContainerView(_local3, this, _local2); _local2.decorContainer = _local4; _local2.setStepEventDispatcher(this); addChild(_local2); _local1.initialize(); _vacuums.push(_local1); _local1 = new TreeModel(); _local1.location = new Point((((stage.stageWidth / 4) * 3) + 15), 450); _local2 = new TreeView(_local1); _local3 = new TreeDecorContainerModel(); _local3.initialize(_local1); _local4 = new TreeDecorContainerView(_local3, this, _local2); _local2.decorContainer = _local4; _local2.setStepEventDispatcher(this); addChild(_local2); _local1.initialize(); _vacuums.push(_local1); _local1 = new TreeModel(); _local1.location = new Point((stage.stageWidth / 2), 500); _local2 = new TreeView(_local1); _local3 = new TreeDecorContainerModel(); _local3.initialize(_local1); _local4 = new TreeDecorContainerView(_local3, this, _local2); _local2.decorContainer = _local4; _local2.setStepEventDispatcher(this); addChild(_local2); _local1.initialize(); _vacuums.push(_local1); } private function initializeArrowNotifier(_arg1:EntityManager):void{ _arrowNotifier = new ArrowNotifier(_arg1); _arrowNotifier.bounds = new Rectangle(40, 0, (stage.stageWidth - 80), stage.stageHeight); addChild(_arrowNotifier); } private function onEntityManagerQueueEmpty(_arg1:EntityManagerEvent):void{ DebugHelper.log("onEntityManagerQueueEmpty", "", "onEntityManagerQueueEmpty", "GameEngine"); _endCountdownLeft = Settings.ENDING_DURATION; _preparingEnding = true; } override protected function step(_arg1:int):void{ var _local2:GameEngineEvent; super.step(_arg1); if (_preparingEnding){ DebugHelper.log(_endCountdownLeft.toString(), "_endCountdownLeft", "step", "GameEngine"); _endCountdownLeft = (_endCountdownLeft - _arg1); if (_endCountdownLeft <= 0){ _preparingEnding = false; _finished = true; stop(); _local2 = new GameEngineEvent(GameEngineEvent.FINISHED); _local2.totalScore = ScoreManager.instance.total; _local2.christmasSpirit = (_spiritLevelView.spiritLevelMeterModel.level * 100); dispatchEvent(_local2); }; }; } private function onPauseMenuClick(_arg1:MouseEvent):void{ if (this.pause()){ if (_pointerForceView != null){ IPause(_pointerForceView.controller).pause(); }; MenuManager.instance.showMenu(MenuManager.MENU_GAME_PAUSE); }; } override public function start():Boolean{ if (!super.start()){ return (false); }; return (true); } private function initBackground():void{ _bgNight = new bgNight(); _bgNight.x = 225; _bgNight.y = 300.2; addChild(_bgNight); _bgGround = new bgGround(); _bgGround.x = 223.9; _bgGround.y = 600.2; addChild(_bgGround); } private function initializeSpiritLevelMeter(_arg1:PeopleManager):void{ var _local2:SpiritLevelMeterModel = new SpiritLevelMeterModel(); _local2.initialize(_arg1); _spiritLevelView = new SpiritLevelMeterView(_local2); _spiritLevelView.initialize(this); _spiritLevelView.x = 17; _spiritLevelView.y = 170; _spiritLevelView.addPauseMenuClickHandler(onPauseMenuClick); addChild(_spiritLevelView); } private function initializeCursorSpeak(_arg1:EntityManager, _arg2:Array):void{ var _local3:CursorSpeakModel = new CursorSpeakModel(); _local3.initialize(_arg1, _arg2); _local3.setStepEventDispatcher(this); var _local4:CursorSpeakController = new CursorSpeakController(_local3); _local4.initialize(stage); var _local5:Rectangle = new Rectangle(0, 0, stage.stageWidth, stage.stageHeight); var _local6:CursorSpeakView = new CursorSpeakView(_local3, _local4); _local6.initialize(_local5); addChild(_local6); _cursorSpeakView = _local6; } private function initializePointerForce(_arg1:EntityManager):void{ var _local2:PointerForceModel = new PointerForceModel(); _arg1.addPointerForceSource(_local2); _local2.setPointerActionEventSource(_arg1); var _local3:Rectangle = new Rectangle(0, 200, 50, 20); var _local4:PointerForceController = new PointerForceController(_local2, this.stage, _local3); _local4.setStepEventDispatcher(this); var _local5:PointerForceView = new PointerForceView(_local2, _local4); _pointerForceView = _local5; addChild(_local5); } private function initializePeopleManager(_arg1:Array):void{ _peopleManager = new PeopleManager(); _peopleManager.balloonsInterval = _level.balloonsInterval; _peopleManager.initialize(_arg1); _peopleManager.setStepEventDispatcher(this); addChild(_peopleManager); } private function onMenuItemClick(_arg1:MenuEvent):void{ if (_arg1.menuItemName == MenuPauseView.MENU_ITEM_RESUME_GAME){ if (this.resume()){ if (_pointerForceView != null){ IPause(_pointerForceView.controller).resume(); }; }; }; } } }//package Game
Section 95
//GameSoundManager (Game.GameSoundManager) package Game { import Cavalcade.SoundManager.*; import flash.media.*; public class GameSoundManager extends SoundManager { public static const SOUND_BIRD_OUCH:String = "bird_ouch"; public static const SOUND_XMAS_SPIRIT_UP:String = "xmas_spirit_up"; public static const SOUND_JINGLE:String = "jingle"; public static const SOUND_BALLOON_POP:String = "balloon_pop"; public static const SOUND_ABSORB:String = "absorb"; private static var _instance:GameSoundManager; override public function createSound(_arg1:String):Sound{ switch (_arg1){ case SOUND_JINGLE: return (new soundJingle()); case SOUND_ABSORB: return (new soundAbsorb()); case SOUND_BALLOON_POP: return (new soundBalloonPop()); case SOUND_BIRD_OUCH: return (new soundBirdOuch()); case SOUND_XMAS_SPIRIT_UP: return (new soundXmasSpiritUp()); default: throw (new Error("Cannont create Sound object. Unknown soundName.")); }; } public static function get instance():GameSoundManager{ if (_instance == null){ _instance = new (GameSoundManager); }; return (_instance); } } }//package Game
Section 96
//MenuManager (Game.MenuManager) package Game { import flash.display.*; import Cavalcade.View.*; import Cavalcade.Event.*; import Game.Interface.*; import Game.Model.Menus.*; import Cavalcade.Utilities.*; import Game.View.Menus.*; public class MenuManager extends MenuView { private var _container:DisplayObjectContainer; private var _activeMenus:Array; private var _unusedMenus:Array; public static const MENU_GAME_PAUSE:String = "game_pause"; public static const MENU_GAME_END:String = "game_end"; public static const MENU_MAIN:String = "main"; public static const MENU_GAME_INTRO:String = "game_intro"; private static var _instance:MenuManager; public function MenuManager(){ _activeMenus = []; _unusedMenus = []; super(); } protected function removeFromActiveMenus(_arg1:String):MenuManagerItem{ var _local3:MenuManagerItem; var _local2 = -1; var _local4:int; while (_local4 < _activeMenus.length) { _local3 = _activeMenus[_local4]; if (_local3.menuName == _arg1){ _local2 = _local4; break; }; _local4++; }; if (_local2 >= 0){ _local3 = ArrayHelper.popItemAt(_activeMenus, _local2); return (_local3); }; return (null); } public function closeMenu(_arg1:String, _arg2:Boolean=false):void{ var _local3:MenuManagerItem; if (_arg2){ _local3 = removeFromActiveMenus(_arg1); } else { _local3 = setActiveMenuToUnused(_arg1); }; if (_local3 == null){ return; }; _local3.menuView.removeMenuItemClickListener(onMenuItemClick); removeChild(_local3.menuView); } protected function getUnusedMenu(_arg1:String):MenuManagerItem{ var _local3:MenuManagerItem; var _local2 = -1; var _local4:int; while (_local4 < _unusedMenus.length) { _local3 = _unusedMenus[_local4]; if (_local3.menuName == _arg1){ _local2 = _local4; break; }; _local4++; }; if (_local2 >= 0){ _unusedMenus.splice(_local2, 1); return (_local3); }; return (null); } public function initialize(_arg1:DisplayObjectContainer):void{ _container = _arg1; _container.addChild(this); } private function onMenuItemClick(_arg1:MenuEvent):void{ dispatchMenuItemClickEvent(_arg1.menuItemName); } protected function setActiveMenuToUnused(_arg1:String):MenuManagerItem{ var _local3:MenuManagerItem; var _local2 = -1; var _local4:int; while (_local4 < _activeMenus.length) { _local3 = _activeMenus[_local4]; if (_local3.menuName == _arg1){ _local2 = _local4; break; }; _local4++; }; if (_local2 >= 0){ _activeMenus.splice(_local2, 1); _unusedMenus.push(_local3); return (_local3); }; return (null); } protected function createMenu(_arg1:String):MenuManagerItem{ var _local2:MenuView; var _local3:MenuGameEndModel; var _local4:MenuManagerItem; switch (_arg1){ case MENU_MAIN: _local2 = new MenuMainView(); break; case MENU_GAME_END: _local3 = new MenuGameEndModel(); _local2 = new MenuGameEndView(_local3); break; case MENU_GAME_INTRO: _local2 = new MenuGameIntroView(); break; case MENU_GAME_PAUSE: _local2 = new MenuPauseView(); break; }; if (_local2 != null){ _local4 = new MenuManagerItem(); _local4.menuName = _arg1; _local4.menuView = _local2; return (_local4); }; return (null); } public function showMenu(_arg1:String, _arg2:Object=null):void{ if (_container == null){ return; }; var _local3:MenuManagerItem = getUnusedMenu(_arg1); if (_local3 == null){ _local3 = createMenu(_arg1); if (_local3 == null){ throw (new Error("Unknown menu name")); }; }; if (_arg2 != null){ IMenuParams(_local3.menuView.model).setMenuParams(_arg2); }; _local3.menuView.addMenuItemClickListener(onMenuItemClick); addChild(_local3.menuView); _activeMenus.push(_local3); } public static function get instance():MenuManager{ if (_instance == null){ _instance = new (MenuManager); }; return (_instance); } } }//package Game
Section 97
//MenuManagerItem (Game.MenuManagerItem) package Game { import Cavalcade.View.*; public class MenuManagerItem { private var _menuView:MenuView; private var _menuName:String; public function get menuName():String{ return (_menuName); } public function get menuView():MenuView{ return (_menuView); } public function set menuView(_arg1:MenuView):void{ _menuView = _arg1; } public function set menuName(_arg1:String):void{ _menuName = _arg1; } } }//package Game
Section 98
//PeopleManager (Game.PeopleManager) package Game { import flash.display.*; import flash.geom.*; import Game.Model.*; import Cavalcade.View.*; import Game.Model.Entities.*; import flash.events.*; import Cavalcade.Event.*; import Cavalcade.Interface.*; import Game.Event.*; import Cavalcade.*; import Game.View.*; import Cavalcade.Utilities.*; import Cavalcade.Controller.*; import flash.utils.*; public class PeopleManager extends CompositeView implements IDestructor, IStepEventHandler { private var _lastBalloonTimeCreated:int;// = 0 private var _treesToAdmire:Array; private var _obstacles:Array; private var _lastPersonTimeCreated:int;// = 0 private var _bounds:Rectangle; private var _maxPersons:int;// = 0 private var _balloonsInterval:int;// = 30000 private var _balloonsChanceOnInterval:Number;// = 0.5 private var _stepProvider:IStepEventDispatcher; public function PeopleManager(){ _obstacles = []; _treesToAdmire = []; super(); _bounds = new Rectangle(-20, 520, 490, 90); var _local1:Rectangle = new Rectangle(140, 490, 165, 48); _obstacles.push(_local1); addEventListener(Event.ADDED_TO_STAGE, onAddToStage, false, 0, true); } private function cleanUp():void{ var _local2:PersonView; var _local3:Number; var _local4:PersonView; var _local1:Array = []; for each (_local2 in _views) { _local3 = _local2.personModel.x; if ((((_local3 < _bounds.left)) || ((_local3 > _bounds.right)))){ _local1.push(_local2); }; }; while (_local1.length > 0) { _local4 = PersonView(_local1.pop()); _local4.personModel.removeEventListener(PersonEvent.ADMIRE, onPersonAdmire); _local4.personModel.removeEventListener(PersonEvent.BALLOON_RELEASED, onPersonBalloonReleased); removeView(_local4); _local4 = null; }; } public function destroy():void{ var _local1:TreeModel; if (_stepProvider != null){ _stepProvider.removeStepEventHandler(onStepEvent); _stepProvider = null; }; for each (_local1 in _treesToAdmire) { _local1.removeEventListener(TreeEvent.ABSORBED_ENTITY, onTreeAbsorbEntity); }; } public function setStepEventDispatcher(_arg1:IStepEventDispatcher):void{ _stepProvider = _arg1; _stepProvider.addStepEventHandler(onStepEvent); } public function onStepEvent(_arg1:StepEvent):void{ var _local2:PersonView; var _local3:int; var _local4:Number; var _local5:PersonModel; var _local6:Array; var _local7:TreeModel; var _local8:String; var _local9:PersonView; var _local10:int; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:SimplePoint; cleanUp(); for each (_local2 in _views) { _local2.personModel.step(_arg1.elapsedTime); }; if (_views.length < _maxPersons){ _local3 = getTimer(); if (_lastPersonTimeCreated == 0){ _lastPersonTimeCreated = getTimer(); return; }; if ((_local3 - _lastPersonTimeCreated) < Settings.PEOPLE_SHOW_INTERVAL){ return; }; _local4 = Math.random(); if (_local4 < 0.9){ return; }; _local5 = new PersonModel(); _local5.bounds = _bounds; _local5.obstacles = _obstacles; _local5.addEventListener(PersonEvent.ADMIRE, onPersonAdmire, false, 0, true); if (Math.random() < 0.5){ _local5.x = _bounds.right; _local5.direction = PersonModel.DIRECTION_LEFT; } else { _local5.x = _bounds.left; _local5.direction = PersonModel.DIRECTION_RIGHT; }; _local5.y = MathEx.random(int(_bounds.top), int(_bounds.bottom)); if ((_local3 - _lastBalloonTimeCreated) >= _balloonsInterval){ if (Math.random() <= _balloonsChanceOnInterval){ _local5.hasBalloon = true; _lastBalloonTimeCreated = _local3; }; }; if (_local5.hasBalloon){ _local11 = (_bounds.width * 0.1); _local5.balloonReleaseX = MathEx.random(int((_bounds.left + _local11)), int((_bounds.right - _local11))); _local12 = Math.random(); if (_local12 <= 0.33){ _local5.balloonColor = BalloonModel.COLOR_PURPLE; } else { if (_local12 <= 0.66){ _local5.balloonColor = BalloonModel.COLOR_RED; } else { _local5.balloonColor = BalloonModel.COLOR_YELLOW; }; }; _local5.addEventListener(PersonEvent.BALLOON_RELEASED, onPersonBalloonReleased, false, 0, true); }; _local6 = []; for each (_local7 in _treesToAdmire) { _local13 = (Math.random() * 100); if (_local13 <= _local7.quality){ _local14 = 50; _local15 = MathEx.random(int(((_local7.location.x - (_local7.width / 2)) + _local14)), int(((_local7.location.x + (_local7.width / 2)) - _local14))); _local16 = new SimplePoint(_local15, _local5.y); _local6.push(_local16); }; }; if (_local6.length > 0){ _local5.admireLocations = _local6; }; if (Math.random() < 0.5){ _local8 = PersonView.DISPLAY_TYPE_1; } else { _local8 = PersonView.DISPLAY_TYPE_2; }; _local9 = new PersonView(_local5, _local8); _local10 = getNewPersonDepth(_local5.y); addView(_local9, _local10); _lastPersonTimeCreated = getTimer(); }; } public function set balloonsInterval(_arg1:int):void{ _balloonsInterval = _arg1; } public function initialize(_arg1:Array):void{ var _local2:TreeModel; _treesToAdmire = _arg1; for each (_local2 in _treesToAdmire) { _local2.addEventListener(TreeEvent.ABSORBED_ENTITY, onTreeAbsorbEntity, false, 0, true); }; updateMaxPersons(); } private function onPersonBalloonReleased(_arg1:PersonEvent):void{ var _local2:PersonEvent = PersonEvent(_arg1.clone()); dispatchEvent(_local2); } private function onAddToStage(_arg1:Event):void{ removeEventListener(Event.ADDED_TO_STAGE, onAddToStage); } private function updateMaxPersons():void{ var _local2:TreeModel; var _local1 = 2; for each (_local2 in _treesToAdmire) { _local1 = (_local1 + Math.floor((_local2.getAbsorbedEntitiesTotal() / 5))); }; _maxPersons = _local1; } private function getNewPersonDepth(_arg1:Number):int{ var _local2:Number; var _local5:DisplayObject; var _local3 = -1; var _local4:int; while (_local4 < this.numChildren) { _local5 = this.getChildAt(_local4); if (_arg1 <= _local5.y){ if (((isNaN(_local2)) || ((_local5.y < _local2)))){ _local2 = _local5.y; _local3 = _local4; }; }; _local4++; }; return (_local3); } private function onPersonAdmire(_arg1:PersonEvent):void{ dispatchEvent(_arg1.clone()); } public function get balloonsInterval():int{ return (_balloonsInterval); } private function onTreeAbsorbEntity(_arg1:TreeEvent):void{ updateMaxPersons(); } } }//package Game
Section 99
//ScoreManager (Game.ScoreManager) package Game { import flash.events.*; import Cavalcade.Event.*; import Cavalcade.Interface.*; import Game.Event.*; public class ScoreManager extends EventDispatcher implements IScoreEventDispatcher, IStartStop, IDestructor { private var _started:Boolean;// = false private var _total:Number;// = 0 private var _entityManager:EntityManager; private var _peopleManager:PeopleManager; private static var _instance:ScoreManager; public function get started():Boolean{ return (_started); } private function onEntityAbsorbed(_arg1:EntityManagerEvent):void{ addScore(120); } public function initialize(_arg1:EntityManager, _arg2:PeopleManager):void{ _entityManager = _arg1; _entityManager.addEventListener(EntityManagerEvent.ENTITY_ABSORBED, onEntityAbsorbed, false, 0, true); _entityManager.addEventListener(EntityManagerEvent.BIRD_HIT, onBirdHit, false, 0, true); _entityManager.addEventListener(EntityManagerEvent.BALLOON_HIT, onBalloonHit, false, 0, true); _peopleManager = _arg2; _peopleManager.addEventListener(PersonEvent.ADMIRE, onPersonAdmire, false, 0, true); } public function stop():void{ if (!_started){ return; }; _started = false; } public function destroy():void{ if (_entityManager != null){ _entityManager.removeEventListener(EntityManagerEvent.ENTITY_ABSORBED, onEntityAbsorbed); _entityManager.removeEventListener(EntityManagerEvent.BALLOON_HIT, onBalloonHit); _entityManager.removeEventListener(EntityManagerEvent.BIRD_HIT, onBirdHit); _entityManager = null; }; if (_peopleManager != null){ _peopleManager.removeEventListener(PersonEvent.ADMIRE, onPersonAdmire); _peopleManager = null; }; } public function get total():Number{ return (_total); } private function onBalloonHit(_arg1:EntityManagerEvent):void{ addScore(75); } private function onPersonAdmire(_arg1:PersonEvent):void{ addScore(145); } public function addScoreEventHandler(_arg1:Function, _arg2:Boolean=false, _arg3:int=0, _arg4:Boolean=true):void{ addEventListener(ScoreEvent.DOWN, _arg1, _arg2, _arg3, _arg4); addEventListener(ScoreEvent.RESET, _arg1, _arg2, _arg3, _arg4); addEventListener(ScoreEvent.UP, _arg1, _arg2, _arg3, _arg4); } public function start():void{ if (_started){ return; }; _total = 0; _started = true; var _local1:ScoreEvent = new ScoreEvent(ScoreEvent.RESET); _local1.total = 0; _local1.score = 0; dispatchEvent(_local1); } private function addScore(_arg1:Number):void{ if (!_started){ return; }; _total = (_total + _arg1); var _local2:ScoreEvent = new ScoreEvent(ScoreEvent.UP); _local2.total = _total; _local2.score = _arg1; dispatchEvent(_local2); } private function onBirdHit(_arg1:EntityManagerEvent):void{ addScore(95); } public static function get instance():ScoreManager{ if (_instance == null){ _instance = new (ScoreManager); }; return (_instance); } } }//package Game
Section 100
//Settings (Game.Settings) package Game { public class Settings { public static const ENDING_DURATION:int = 7000; public static const SKIP_MENUS:Boolean = false; public static const DEBUG_TREE_HIT_AREA:Boolean = false; public static const PEOPLE_SHOW_INTERVAL:int = 100; public static const ALLOWED_DOMAINS:Array = ["cavalcadegames.com", "flashgamelicense.com", "maxgames.com", "newgrounds.com"]; public static const DOMAIN_LOCK_ACTIVE:Boolean = false; } }//package Game
Section 101
//SimpleIDGenerator (Game.SimpleIDGenerator) package Game { public class SimpleIDGenerator { private var _lastIdNum:Number;// = 0 private static var _instance:SimpleIDGenerator; public function generate():String{ _lastIdNum++; return (_lastIdNum.toString()); } public static function get instance():SimpleIDGenerator{ if (_instance == null){ _instance = new (SimpleIDGenerator); }; return (_instance); } } }//package Game
Section 102
//MochiScores (mochi.MochiScores) package mochi { import flash.display.*; import flash.text.*; public class MochiScores { private static var boardID:String; public static var onErrorHandler:Object; public static var onCloseHandler:Object; public static function showLeaderboard(_arg1:Object=null):void{ var options = _arg1; if (options != null){ if (options.clip != null){ if ((options.clip is Sprite)){ MochiServices.setContainer(options.clip); }; delete options.clip; } else { MochiServices.setContainer(); }; MochiServices.stayOnTop(); if (options.name != null){ if ((options.name is TextField)){ if (options.name.text.length > 0){ options.name = options.name.text; }; }; }; if (options.score != null){ if ((options.score is TextField)){ if (options.score.text.length > 0){ options.score = options.score.text; }; }; }; if (options.onDisplay != null){ options.onDisplay(); } else { if (MochiServices.clip != null){ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); } else { trace("Warning: Container is not a MovieClip, cannot call default onDisplay."); }; }; }; } else { options = {}; if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); } else { trace("Warning: Container is not a MovieClip, cannot call default onDisplay."); }; }; if (options.onClose != null){ onCloseHandler = options.onClose; } else { onCloseHandler = function ():void{ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.play(); } else { trace("Warning: Container is not a MovieClip, cannot call default onClose."); }; }; }; if (options.onError != null){ onErrorHandler = options.onError; } else { onErrorHandler = null; }; if (options.boardID == null){ if (MochiScores.boardID != null){ options.boardID = MochiScores.boardID; }; }; MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose); } public static function closeLeaderboard():void{ MochiServices.send("scores_closeLeaderboard"); } public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2); } public static function requestList(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_requestList", null, _arg1, _arg2); } public static function scoresArrayToObjects(_arg1:Object):Object{ var _local3:Number; var _local4:Number; var _local5:Object; var _local6:Object; var _local7:String; var _local8:String; var _local2:Object = {}; for (_local7 in _arg1) { if (typeof(_arg1[_local7]) == "object"){ if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){ _local2[_local7] = []; _local5 = _arg1[_local7]; _local4 = 0; while (_local4 < _local5.rows.length) { _local6 = {}; _local3 = 0; while (_local3 < _local5.cols.length) { _local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3]; _local3++; }; _local2[_local7].push(_local6); _local4++; }; } else { _local2[_local7] = {}; for (_local8 in _arg1[_local7]) { _local2[_local7][_local8] = _arg1[_local7][_local8]; }; }; } else { _local2[_local7] = _arg1[_local7]; }; }; return (_local2); } public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{ MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4); } public static function onClose(_arg1:Object=null):void{ if (_arg1 != null){ if (_arg1.error != null){ if (_arg1.error == true){ if (onErrorHandler != null){ if (_arg1.errorCode == null){ _arg1.errorCode = "IOError"; }; onErrorHandler(_arg1.errorCode); MochiServices.doClose(); return; }; }; }; }; onCloseHandler(); MochiServices.doClose(); } public static function setBoardID(_arg1:String):void{ MochiScores.boardID = _arg1; MochiServices.send("scores_setBoardID", {boardID:_arg1}); } } }//package mochi
Section 103
//MochiServices (mochi.MochiServices) package mochi { import flash.display.*; import flash.events.*; import flash.net.*; import flash.utils.*; import flash.system.*; public class MochiServices { private static var _container:Object; private static var _connected:Boolean = false; private static var _swfVersion:String; private static var _sendChannel:LocalConnection; private static var _rcvChannelName:String; private static var _gatewayURL:String = "http://www.mochiads.com/static/lib/services/services.swf"; private static var _clip:MovieClip; private static var _loader:Loader; private static var _id:String; private static var _listenChannel:LocalConnection; private static var _timer:Timer; private static var _sendChannelName:String; private static var _startTime:Number; private static var _connecting:Boolean = false; public static var onError:Object; private static var _listenChannelName:String = "__mochiservices"; private static var _rcvChannel:LocalConnection; public static function isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{ if (_connected){ _sendChannel.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); } else { if ((((_clip == null)) || (!(_connecting)))){ onError("NotConnected"); handleError(_arg2, _arg3, _arg4); flush(true); return; }; _clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); }; if (_clip != null){ if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){ _clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4}; _clip._nextcallbackID++; }; }; } public static function get connected():Boolean{ return (_connected); } private static function flush(_arg1:Boolean):void{ var _local2:Object; var _local3:Object; if (_clip != null){ if (_clip._queue != null){ while (_clip._queue.length > 0) { _local2 = _clip._queue.shift(); _local3 = null; if (_local2 != null){ if (_local2.callbackID != null){ _local3 = _clip._callbacks[_local2.callbackID]; }; delete _clip._callbacks[_local2.callbackID]; if (((_arg1) && (!((_local3 == null))))){ handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod); }; }; }; }; }; } private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{ var _local4:int; var _local14:Loader; var _local3:Array = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23]; var _local5:Array = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3]; var _local6:Array = [0, 64, 0, 0, 0]; var _local7:MovieClip = new MovieClip(); var _local8:LocalConnection = new LocalConnection(); var _local9:String = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().getTime())); _local8 = new LocalConnection(); _local7.lc = _local8; _local7.click = _arg2; _local8.client = _local7; _local8.connect(_local9); var _local10:ByteArray = new ByteArray(); var _local11:ByteArray = new ByteArray(); _local11.endian = Endian.LITTLE_ENDIAN; _local11.writeShort(1); _local11.writeUTFBytes(((_arg1 + " ") + _local9)); _local11.writeByte(0); var _local12:uint = ((_local3.length + _local11.length) + 4); var _local13:uint = (_local12 + 35); _local10.endian = Endian.LITTLE_ENDIAN; _local10.writeUTFBytes("FWS"); _local10.writeByte(8); _local10.writeUnsignedInt(_local13); for each (_local4 in _local5) { _local10.writeByte(_local4); }; _local10.writeUnsignedInt(_local12); _local10.writeByte(136); _local10.writeShort(_local11.length); _local10.writeBytes(_local11); for each (_local4 in _local3) { _local10.writeByte(_local4); }; for each (_local4 in _local6) { _local10.writeByte(_local4); }; _local14 = new Loader(); _local14.loadBytes(_local10); _local7.addChild(_local14); return (_local7); } private static function init(_arg1:String, _arg2:Object):void{ _id = _arg1; if (_arg2 != null){ _container = _arg2; loadCommunicator(_arg1, _container); }; } public static function get childClip():Object{ return (_clip); } public static function get id():String{ return (_id); } public static function stayOnTop():void{ _container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true); if (_clip != null){ _clip.visible = true; }; } public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{ var netup:Boolean; var s:String; var x:String; var req:URLRequest; var loader:Loader; var err:Function; var complete:Function; var setURL:Function; var url = _arg1; var burl = _arg2; var btn = _arg3; var onClick = _arg4; var vars:Object = new Object(); vars["mav"] = getVersion(); vars["swfv"] = "9"; vars["swfurl"] = btn.loaderInfo.loaderURL; vars["fv"] = Capabilities.version; vars["os"] = Capabilities.os; vars["lang"] = Capabilities.language; vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY); s = "?"; var i:Number = 0; for (x in vars) { if (i != 0){ s = (s + "&"); }; i = (i + 1); s = (((s + x) + "=") + escape(vars[x])); }; req = new URLRequest("http://x.mochiads.com/linkping.swf"); loader = new Loader(); err = function (_arg1:Object):void{ netup = false; _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; complete = function (_arg1:Object):void{ netup = true; _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete); loader.load(req); setURL = function ():void{ var _local1:String; if (netup){ _local1 = (url + s); } else { _local1 = burl; }; var _local2:DisplayObject = clickMovie(_local1, onClick); btn.addChild(_local2); _local2.scaleX = (0.01 * btn.width); _local2.scaleY = (0.01 * btn.height); }; setTimeout(setURL, 1500); } public static function getVersion():String{ return ("1.35"); } public static function disconnect():void{ if (((_connected) || (_connecting))){ if (_clip != null){ if (_clip.parent != null){ if ((_clip.parent is Sprite)){ Sprite(_clip.parent).removeChild(_clip); _clip = null; }; }; }; _connecting = (_connected = false); flush(true); try { _listenChannel.close(); _rcvChannel.close(); } catch(error:Error) { }; }; if (_timer != null){ try { _timer.stop(); } catch(error:Error) { }; }; } public static function allowDomains(_arg1:String):String{ var _local2:String; Security.allowDomain("*"); Security.allowInsecureDomain("*"); if (_arg1.indexOf("http://") != -1){ _local2 = _arg1.split("/")[2].split(":")[0]; Security.allowDomain(_local2); Security.allowInsecureDomain(_local2); }; return (_local2); } public static function doClose():void{ _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); if (_clip.parent != null){ Sprite(_clip.parent).removeChild(_clip); }; } public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{ if (_arg1 != null){ if ((_arg1 is Sprite)){ _container = _arg1; }; }; if (_arg2){ if ((_container is Sprite)){ Sprite(_container).addChild(_clip); }; }; } private static function onStatus(_arg1:StatusEvent):void{ switch (_arg1.level){ case "error": _connected = false; _listenChannel.connect(_listenChannelName); break; }; } private static function initComChannels():void{ if (!_connected){ _sendChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus); _sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"}); _sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion(), parentURL:_container.loaderInfo.loaderURL}); _rcvChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus); _clip.onReceive = function (_arg1:Object):void{ var methodName:String; var pkg = _arg1; var cb:String = pkg.callbackID; var cblst:Object = this.client._callbacks[cb]; if (!cblst){ return; }; var method:* = cblst.callbackMethod; methodName = ""; var obj:Object = cblst.callbackObject; if (((obj) && ((typeof(method) == "string")))){ methodName = method; if (obj[method] != null){ method = obj[method]; } else { trace((("Error: Method " + method) + " does not exist.")); }; }; if (method != undefined){ try { method.apply(obj, pkg.args); } catch(error:Error) { trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString())); }; } else { if (obj != null){ try { obj(pkg.args); } catch(error:Error) { trace(("Error invoking method on object: " + error.toString())); }; }; }; delete this.client._callbacks[cb]; }; _clip.onError = function ():void{ MochiServices.onError("IOError"); }; _rcvChannel.connect(_rcvChannelName); trace("connected!"); _connecting = false; _connected = true; _listenChannel.close(); while (_clip._queue.length > 0) { _sendChannel.send(_sendChannelName, "onReceive", _clip._queue.shift()); }; }; } private static function listen():void{ _listenChannel = new LocalConnection(); _listenChannel.client = _clip; _clip.handshake = function (_arg1:Object):void{ MochiServices.comChannelName = _arg1.newChannel; }; _listenChannel.allowDomain("*", "localhost"); _listenChannel.allowInsecureDomain("*", "localhost"); _listenChannel.connect(_listenChannelName); trace("Waiting for MochiAds services to connect..."); } private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{ var args = _arg1; var callbackObject = _arg2; var callbackMethod = _arg3; if (args != null){ if (args.onError != null){ args.onError.apply(null, ["NotConnected"]); }; if (((!((args.options == null))) && (!((args.options.onError == null))))){ args.options.onError.apply(null, ["NotConnected"]); }; }; if (callbackMethod != null){ args = {}; args.error = true; args.errorCode = "NotConnected"; if (((!((callbackObject == null))) && ((callbackMethod is String)))){ try { var _local5 = callbackObject; _local5[callbackMethod](args); } catch(error:Error) { }; } else { if (callbackMethod != null){ try { callbackMethod.apply(args); } catch(error:Error) { }; }; }; }; } public static function get clip():Object{ return (_container); } public static function set comChannelName(_arg1:String):void{ if (_arg1 != null){ if (_arg1.length > 3){ _sendChannelName = (_arg1 + "_fromgame"); _rcvChannelName = _arg1; initComChannels(); }; }; } private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{ var id = _arg1; var clip = _arg2; var clipname:String = ("_mochiservices_com_" + id); if (_clip != null){ return (_clip); }; if (!MochiServices.isNetworkAvailable()){ return (null); }; MochiServices.allowDomains(_gatewayURL); _clip = createEmptyMovieClip(clip, clipname, 10336, false); _loader = new Loader(); _timer = new Timer(1000, 0); _startTime = getTimer(); _timer.addEventListener(TimerEvent.TIMER, connectWait); _timer.start(); var f:Function = function (_arg1:Object):void{ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load."); MochiServices.disconnect(); MochiServices.onError("IOError"); }; _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f); var req:URLRequest = new URLRequest(_gatewayURL); _loader.load(req); _clip.addChild(_loader); _clip._mochiservices_com = _loader; _sendChannel = new LocalConnection(); _clip._queue = []; _rcvChannel = new LocalConnection(); _rcvChannel.allowDomain("*", "localhost"); _rcvChannel.allowInsecureDomain("*", "localhost"); _rcvChannel.client = _clip; _clip._nextcallbackID = 0; _clip._callbacks = {}; listen(); return (_clip); } public static function bringToTop(_arg1:Event):void{ var e = _arg1; if (MochiServices.clip != null){ if (MochiServices.childClip != null){ try { if (MochiServices.clip.numChildren > 1){ MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1)); }; } catch(errorObject:Error) { trace("Warning: Depth sort error."); _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); }; }; }; } public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{ var id = _arg1; var clip = _arg2; var onError = _arg3; if ((clip is DisplayObject)){ if (((!(_connected)) && ((_clip == null)))){ trace("MochiServices Connecting..."); _connecting = true; init(id, clip); }; } else { trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage."); }; if (onError != null){ MochiServices.onError = onError; } else { if (MochiServices.onError == null){ MochiServices.onError = function (_arg1:String):void{ trace(_arg1); }; }; }; } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Boolean=true):MovieClip{ var parent = _arg1; var name = _arg2; var depth = _arg3; var doAdd = _arg4; var mc:MovieClip = new MovieClip(); if (doAdd){ if (((false) && (depth))){ parent.addChildAt(mc, depth); } else { parent.addChild(mc); }; }; try { parent[name] = mc; } catch(e:Error) { throw (new Error("MochiServices requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); }; mc["_name"] = name; return (mc); } public static function connectWait(_arg1:TimerEvent):void{ if ((getTimer() - _startTime) > 10000){ if (!_connected){ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load."); MochiServices.disconnect(); MochiServices.onError("IOError"); }; _timer.stop(); }; } } }//package mochi
Section 104
//cursorStarEyes_4 (xmas3_fla.cursorStarEyes_4) package xmas3_fla { import flash.display.*; public dynamic class cursorStarEyes_4 extends MovieClip { public function cursorStarEyes_4(){ addFrameScript(96, frame97); } function frame97(){ gotoAndPlay(1); } } }//package xmas3_fla
Section 105
//menuStartGame_48 (xmas3_fla.menuStartGame_48) package xmas3_fla { import flash.display.*; public dynamic class menuStartGame_48 extends MovieClip { public var menuItemStartGameEasy:menuStartGameEasy; public var menuItemStartGameMedium:menuStartGameMed; public var menuItemStartGameHard:menuStartGameHard; public function menuStartGame_48(){ addFrameScript(0, frame1, 19, frame20); } function frame20(){ stop(); } function frame1(){ stop(); } } }//package xmas3_fla
Section 106
//mute_219 (xmas3_fla.mute_219) package xmas3_fla { import flash.display.*; public dynamic class mute_219 extends MovieClip { public function mute_219(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package xmas3_fla
Section 107
//treeLayer1_108 (xmas3_fla.treeLayer1_108) package xmas3_fla { import flash.display.*; public dynamic class treeLayer1_108 extends MovieClip { public function treeLayer1_108(){ addFrameScript(9, frame10); } function frame10(){ stop(); } } }//package xmas3_fla
Section 108
//treeLayer1a_109 (xmas3_fla.treeLayer1a_109) package xmas3_fla { import flash.display.*; public dynamic class treeLayer1a_109 extends MovieClip { public function treeLayer1a_109(){ addFrameScript(9, frame10); } function frame10(){ stop(); } } }//package xmas3_fla
Section 109
//treePot_8 (xmas3_fla.treePot_8) package xmas3_fla { import flash.display.*; public dynamic class treePot_8 extends MovieClip { public function treePot_8(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package xmas3_fla
Section 110
//arrowUp (arrowUp) package { import flash.display.*; public dynamic class arrowUp extends MovieClip { } }//package
Section 111
//balloonRight (balloonRight) package { import flash.display.*; public dynamic class balloonRight extends MovieClip { public function balloonRight(){ addFrameScript(16, frame17, 35, frame36, 38, frame39); } function frame36(){ stop(); } function frame39(){ stop(); } function frame17(){ gotoAndPlay("held"); } } }//package
Section 112
//balloonRightBalloon (balloonRightBalloon) package { import flash.display.*; public dynamic class balloonRightBalloon extends MovieClip { } }//package
Section 113
//balloonRightRed (balloonRightRed) package { import flash.display.*; public dynamic class balloonRightRed extends MovieClip { public function balloonRightRed(){ addFrameScript(16, frame17, 35, frame36, 38, frame39); } function frame36(){ stop(); } function frame39(){ stop(); } function frame17(){ gotoAndPlay("held"); } } }//package
Section 114
//balloonRightYellow (balloonRightYellow) package { import flash.display.*; public dynamic class balloonRightYellow extends MovieClip { public function balloonRightYellow(){ addFrameScript(16, frame17, 35, frame36, 38, frame39); } function frame36(){ stop(); } function frame39(){ stop(); } function frame17(){ gotoAndPlay("held"); } } }//package
Section 115
//bgGround (bgGround) package { import flash.display.*; public dynamic class bgGround extends MovieClip { } }//package
Section 116
//bgNight (bgNight) package { import flash.display.*; public dynamic class bgNight extends MovieClip { } }//package
Section 117
//cursorStar (cursorStar) package { import flash.display.*; public dynamic class cursorStar extends MovieClip { public var mainStar:cursorStarStar; public var cursorFace:MovieClip; } }//package
Section 118
//cursorStarStar (cursorStarStar) package { import flash.display.*; public dynamic class cursorStarStar extends MovieClip { public function cursorStarStar(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package
Section 119
//enemyBird (enemyBird) package { import flash.display.*; public dynamic class enemyBird extends MovieClip { public function enemyBird(){ addFrameScript(9, frame10, 16, frame17); } function frame17(){ stop(); } function frame10(){ gotoAndPlay("flying"); } } }//package
Section 120
//howtoNext (howtoNext) package { import flash.display.*; public dynamic class howtoNext extends MovieClip { } }//package
Section 121
//howtoplay (howtoplay) package { import flash.display.*; import flash.events.*; public dynamic class howtoplay extends MovieClip { public var _replayLink:String; public var _nextLink:String; public var replay:howtoReplay; public var prev:howtoPrevious; public var next:howtoNext; public var _prevLink:String; public function howtoplay(){ addFrameScript(12, frame13, 14, frame15, 31, frame32, 48, frame49, 65, frame66, 97, frame98, 123, frame124, 139, frame140, 140, frame141, 141, frame142); } public function onReplayClick(_arg1:MouseEvent):void{ playLink(_replayLink); } function frame32(){ stop(); initButtons("how3", "how2", "how4"); } function frame13(){ stop(); initButtons("how1", "how1", "how2"); } function frame15(){ stop(); initButtons("how2", "how1", "how3"); } function frame98(){ stop(); initButtons("how6", "how5", "how7"); } public function playLink(_arg1:String):void{ if ((((_arg1 == "how9")) || ((_arg1 == "how10")))){ gotoAndStop(_arg1); } else { gotoAndPlay(_arg1); }; } public function initButtons(_arg1:String, _arg2:String, _arg3:String):void{ var _local4:MovieClip = MovieClip(this.replay); _local4.addEventListener(MouseEvent.CLICK, onReplayClick, false, 0, true); _local4.buttonMode = true; var _local5:MovieClip = MovieClip(this.prev); _local5.addEventListener(MouseEvent.CLICK, onPrevClick, false, 0, true); _local5.buttonMode = true; var _local6:MovieClip = MovieClip(this.next); _local6.addEventListener(MouseEvent.CLICK, onNextClick, false, 0, true); _local6.buttonMode = true; _prevLink = _arg2; _replayLink = _arg1; _nextLink = _arg3; } function frame141(){ stop(); initButtons("how9", "how8", "how10"); } function frame142(){ stop(); initButtons("how10", "how9", "how10"); } function frame140(){ stop(); initButtons("how8", "how7", "how9"); } function frame124(){ stop(); initButtons("how7", "how6", "how8"); } function frame49(){ stop(); initButtons("how4", "how3", "how5"); } function frame66(){ stop(); initButtons("how5", "how4", "how6"); } public function onPrevClick(_arg1:MouseEvent):void{ playLink(_prevLink); } public function onNextClick(_arg1:MouseEvent):void{ playLink(_nextLink); } } }//package
Section 122
//howtoPrevious (howtoPrevious) package { import flash.display.*; public dynamic class howtoPrevious extends MovieClip { } }//package
Section 123
//howtoReplay (howtoReplay) package { import flash.display.*; public dynamic class howtoReplay extends MovieClip { } }//package
Section 124
//iconXmas3 (iconXmas3) package { import flash.display.*; public dynamic class iconXmas3 extends MovieClip { } }//package
Section 125
//LBoot (LBoot) package { import flash.display.*; public dynamic class LBoot extends MovieClip { } }//package
Section 126
//Main (Main) package { import Game.Model.*; import Cavalcade.View.*; import Game.Factory.*; import flash.events.*; import Cavalcade.Event.*; import Cavalcade.Interface.*; import Game.*; import Game.Event.*; import Cavalcade.*; import Game.APIHandler.*; import Cavalcade.Model.*; import Game.View.*; import Game.Model.Menus.*; import Cavalcade.Utilities.*; import flash.text.*; import Game.View.Menus.*; public class Main extends Bootstrap { private var _engine:GameEngine; public function Main(){ addFrameScript(0, frame1, 29, frame30, 30, frame31, 31, frame32); super(); this.domainLockActive = Settings.DOMAIN_LOCK_ACTIVE; this.allowedDomains = Settings.ALLOWED_DOMAINS; initAPIHandlers(); } private function startEngine():void{ _engine.start(); } private function onGameEngineFinished(_arg1:GameEngineEvent):void{ DebugHelper.log(_arg1.christmasSpirit.toString(), "christmasSpirit", "onGameEngineFinished", "Main"); var _local2:Object = new Object(); _local2[MenuGameEndModel.PARAM_TOTAL_SCORE] = _arg1.totalScore; _local2[MenuGameEndModel.PARAM_XMAS_SPIRIT] = _arg1.christmasSpirit; MenuManager.instance.showMenu(MenuManager.MENU_GAME_END, _local2); submitScoreToAPIHandlers(Math.ceil(_arg1.totalScore)); } function frame1(){ stop(); } private function prepareEngine(_arg1:int):void{ var _local2:GameLevelModel = GameLevelFactory.createLevel(_arg1); _engine = new GameEngine(); _engine.level = _local2; _engine.addEventListener(GameEngineEvent.FINISHED, onGameEngineFinished, false, 0, true); addChildAt(_engine, 0); MenuManager.instance.showMenu(MenuManager.MENU_GAME_INTRO); } function frame30(){ stop(); } private function stopEngine():void{ if (_engine != null){ _engine.stop(); _engine.destroy(); removeChild(_engine); _engine = null; }; } function frame32(){ stop(); } private function submitScoreToAPIHandlers(_arg1:int):void{ GameMochiAdsAPIHandler.instance.submitScore(_arg1); } override protected function onPreloaderComplete(_arg1:Event):void{ IDestructor(_arg1.target).destroy(); super.onPreloaderComplete(_arg1); gotoAndStop("game"); MenuManager.instance.initialize(this); MenuManager.instance.addMenuItemClickListener(onMenuItemClick); if (Settings.SKIP_MENUS){ prepareEngine(LevelModel.DIFFICULTY_NORMAL); return; }; MenuManager.instance.showMenu(MenuManager.MENU_MAIN); } private function restartEngine():void{ var _local1:GameLevelModel = _engine.level; _engine.stop(); _engine.destroy(); removeChild(_engine); prepareEngine(_local1.difficulty); } function frame31(){ stop(); } private function initAPIHandlers():void{ var _local1 = "ac196e425df107cf"; GameMochiAdsAPIHandler.instance.connect(this); } private function onMenuItemClick(_arg1:MenuEvent):void{ switch (_arg1.menuItemName){ case MenuMainView.MENUITEM_START_GAME: case MenuMainView.MENUITEM_START_GAME_EASY: case MenuMainView.MENUITEM_START_GAME_MEDIUM: case MenuMainView.MENUITEM_START_GAME_HARD: MenuManager.instance.closeMenu(MenuManager.MENU_MAIN, true); if (_arg1.menuItemName == MenuMainView.MENUITEM_START_GAME_EASY){ prepareEngine(LevelModel.DIFFICULTY_EASY); } else { if (_arg1.menuItemName == MenuMainView.MENUITEM_START_GAME_HARD){ prepareEngine(LevelModel.DIFFICULTY_HARD); } else { prepareEngine(LevelModel.DIFFICULTY_NORMAL); }; }; break; case MenuGameEndView.MENUITEM_CLOSE: case MenuPauseView.MENU_ITEM_MAIN_MENU: stopEngine(); MenuManager.instance.closeMenu(MenuManager.MENU_GAME_END); MenuManager.instance.showMenu(MenuManager.MENU_MAIN); break; case MenuGameIntroView.MENUITEM_CLOSE: startEngine(); break; case MenuPauseView.MENU_ITEM_RESTART_GAME: restartEngine(); break; case MenuPauseView.MENU_ITEM_CLOSE: MenuManager.instance.closeMenu(MenuManager.MENU_GAME_PAUSE); break; case MenuPauseView.MENU_ITEM_TOGGLE_SOUND: case MenuMainView.MENUITEM_TOGGLE_SOUND: GameSoundManager.instance.toggleMute(); break; case MenuMainView.MENUITEM_HIGHSCORES: showAPIHandlerLeaderboard(); break; }; trace(("<onMenuItemClick> " + _arg1.menuItemName)); } override protected function createPreloader():PreloaderView{ var _local1:PreloaderModel = new PreloaderModel(this); var _local2:PreloaderView = new GamePreloaderView(_local1); return (_local2); } override protected function showDomainLockError():void{ super.showDomainLockError(); var _local1:TextField = new TextField(); _local1.textColor = 0; _local1.selectable = false; addChild(_local1); _local1.appendText("Sorry, this website is not allowed to host this game."); _local1.width = this.stage.stageWidth; } private function showAPIHandlerLeaderboard():void{ GameMochiAdsAPIHandler.instance.showLeaderboard(); } } }//package
Section 127
//menuHighscores (menuHighscores) package { import flash.display.*; public dynamic class menuHighscores extends MovieClip { } }//package
Section 128
//menuOver (menuOver) package { import flash.display.*; import flash.text.*; public dynamic class menuOver extends MovieClip { public var scoreChristmasSpirit:TextField; public var scoreTotal:TextField; public function menuOver(){ addFrameScript(0, frame1, 8, frame9, 13, frame14); } function frame14(){ stop(); } function frame1(){ stop(); } function frame9(){ stop(); } } }//package
Section 129
//menuPause (menuPause) package { import flash.display.*; public dynamic class menuPause extends MovieClip { public var main:menuPauseResume; public var resume:menuPauseResume; public var restart:menuPauseResume; public var mute:MovieClip; public function menuPause(){ addFrameScript(0, frame1, 8, frame9, 13, frame14); } function frame1(){ stop(); } function frame9(){ stop(); } function frame14(){ stop(); } } }//package
Section 130
//menuPauseResume (menuPauseResume) package { import flash.display.*; public dynamic class menuPauseResume extends MovieClip { } }//package
Section 131
//menuStart (menuStart) package { import flash.display.*; import flash.events.*; import flash.net.*; public dynamic class menuStart extends MovieClip { public var menuHowToPlay:MovieClip; public var cavalcade:MovieClip; public var menuMoreGames:MovieClip; public var menuStartGame:MovieClip; public var mute:mute2; public var menuItemHighscores:menuHighscores; public function menuStart(){ addFrameScript(0, frame1); } public function callLink2(_arg1:MouseEvent):void{ var e = _arg1; var url = "http://www.cavalcadegames.com"; var request:URLRequest = new URLRequest(url); try { navigateToURL(request, "_blank"); } catch(e:Error) { trace("Error occurred!"); }; } function frame1(){ menuMoreGames.addEventListener(MouseEvent.CLICK, callLink); cavalcade.addEventListener(MouseEvent.CLICK, callLink2); } public function callLink(_arg1:MouseEvent):void{ var e = _arg1; var url = "http://www.kongregate.com/accounts/Cavalcade"; var request:URLRequest = new URLRequest(url); try { navigateToURL(request, "_blank"); } catch(e:Error) { trace("Error occurred!"); }; } } }//package
Section 132
//menuStartGameEasy (menuStartGameEasy) package { import flash.display.*; public dynamic class menuStartGameEasy extends MovieClip { } }//package
Section 133
//menuStartGameHard (menuStartGameHard) package { import flash.display.*; public dynamic class menuStartGameHard extends MovieClip { } }//package
Section 134
//menuStartGameMed (menuStartGameMed) package { import flash.display.*; public dynamic class menuStartGameMed extends MovieClip { } }//package
Section 135
//menuStartTitle (menuStartTitle) package { import flash.display.*; public dynamic class menuStartTitle extends MovieClip { } }//package
Section 136
//mute2 (mute2) package { import flash.display.*; public dynamic class mute2 extends MovieClip { public function mute2(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package
Section 137
//objectBall1 (objectBall1) package { import flash.display.*; public dynamic class objectBall1 extends MovieClip { } }//package
Section 138
//objectBall2 (objectBall2) package { import flash.display.*; public dynamic class objectBall2 extends MovieClip { } }//package
Section 139
//objectBall3 (objectBall3) package { import flash.display.*; public dynamic class objectBall3 extends MovieClip { } }//package
Section 140
//objectBear (objectBear) package { import flash.display.*; public dynamic class objectBear extends MovieClip { } }//package
Section 141
//objectCane (objectCane) package { import flash.display.*; public dynamic class objectCane extends MovieClip { } }//package
Section 142
//objectDrum (objectDrum) package { import flash.display.*; public dynamic class objectDrum extends MovieClip { } }//package
Section 143
//objectFertilizer (objectFertilizer) package { import flash.display.*; public dynamic class objectFertilizer extends MovieClip { } }//package
Section 144
//objectFlake (objectFlake) package { import flash.display.*; public dynamic class objectFlake extends MovieClip { } }//package
Section 145
//objectGift1 (objectGift1) package { import flash.display.*; public dynamic class objectGift1 extends MovieClip { } }//package
Section 146
//objectGift2 (objectGift2) package { import flash.display.*; public dynamic class objectGift2 extends MovieClip { } }//package
Section 147
//objectGift3 (objectGift3) package { import flash.display.*; public dynamic class objectGift3 extends MovieClip { } }//package
Section 148
//objectGift4 (objectGift4) package { import flash.display.*; public dynamic class objectGift4 extends MovieClip { } }//package
Section 149
//objectGift5 (objectGift5) package { import flash.display.*; public dynamic class objectGift5 extends MovieClip { } }//package
Section 150
//objectGift6 (objectGift6) package { import flash.display.*; public dynamic class objectGift6 extends MovieClip { } }//package
Section 151
//objectGinger (objectGinger) package { import flash.display.*; public dynamic class objectGinger extends MovieClip { } }//package
Section 152
//objectHat (objectHat) package { import flash.display.*; public dynamic class objectHat extends MovieClip { } }//package
Section 153
//objectLight1 (objectLight1) package { import flash.display.*; public dynamic class objectLight1 extends MovieClip { } }//package
Section 154
//objectLight10 (objectLight10) package { import flash.display.*; public dynamic class objectLight10 extends MovieClip { } }//package
Section 155
//objectLight11 (objectLight11) package { import flash.display.*; public dynamic class objectLight11 extends MovieClip { } }//package
Section 156
//objectLight12 (objectLight12) package { import flash.display.*; public dynamic class objectLight12 extends MovieClip { } }//package
Section 157
//objectLight2 (objectLight2) package { import flash.display.*; public dynamic class objectLight2 extends MovieClip { } }//package
Section 158
//objectLight3 (objectLight3) package { import flash.display.*; public dynamic class objectLight3 extends MovieClip { } }//package
Section 159
//objectLight4 (objectLight4) package { import flash.display.*; public dynamic class objectLight4 extends MovieClip { } }//package
Section 160
//objectLight5 (objectLight5) package { import flash.display.*; public dynamic class objectLight5 extends MovieClip { } }//package
Section 161
//objectLight6 (objectLight6) package { import flash.display.*; public dynamic class objectLight6 extends MovieClip { } }//package
Section 162
//objectLight7 (objectLight7) package { import flash.display.*; public dynamic class objectLight7 extends MovieClip { } }//package
Section 163
//objectLight8 (objectLight8) package { import flash.display.*; public dynamic class objectLight8 extends MovieClip { } }//package
Section 164
//objectLight9 (objectLight9) package { import flash.display.*; public dynamic class objectLight9 extends MovieClip { } }//package
Section 165
//objectMittens (objectMittens) package { import flash.display.*; public dynamic class objectMittens extends MovieClip { } }//package
Section 166
//objectRibbon (objectRibbon) package { import flash.display.*; public dynamic class objectRibbon extends MovieClip { } }//package
Section 167
//objectSkate (objectSkate) package { import flash.display.*; public dynamic class objectSkate extends MovieClip { } }//package
Section 168
//objectSnowman (objectSnowman) package { import flash.display.*; public dynamic class objectSnowman extends MovieClip { } }//package
Section 169
//objectSock (objectSock) package { import flash.display.*; public dynamic class objectSock extends MovieClip { } }//package
Section 170
//objectStar (objectStar) package { import flash.display.*; public dynamic class objectStar extends MovieClip { } }//package
Section 171
//objectSun (objectSun) package { import flash.display.*; public dynamic class objectSun extends MovieClip { } }//package
Section 172
//objectWater (objectWater) package { import flash.display.*; public dynamic class objectWater extends MovieClip { } }//package
Section 173
//objectWreath (objectWreath) package { import flash.display.*; public dynamic class objectWreath extends MovieClip { } }//package
Section 174
//peopl1Lleg (peopl1Lleg) package { import flash.display.*; public dynamic class peopl1Lleg extends MovieClip { } }//package
Section 175
//people1 (people1) package { import flash.display.*; public dynamic class people1 extends MovieClip { public function people1(){ addFrameScript(22, frame23, 43, frame44); } function frame44(){ stop(); } function frame23(){ gotoAndPlay("skating"); } } }//package
Section 176
//people1Body (people1Body) package { import flash.display.*; public dynamic class people1Body extends MovieClip { } }//package
Section 177
//people1Head (people1Head) package { import flash.display.*; public dynamic class people1Head extends MovieClip { } }//package
Section 178
//people1Rarm (people1Rarm) package { import flash.display.*; public dynamic class people1Rarm extends MovieClip { } }//package
Section 179
//people1RLeg (people1RLeg) package { import flash.display.*; public dynamic class people1RLeg extends MovieClip { } }//package
Section 180
//people2 (people2) package { import flash.display.*; public dynamic class people2 extends MovieClip { public function people2(){ addFrameScript(45, frame46); } function frame46(){ stop(); } } }//package
Section 181
//people2Head (people2Head) package { import flash.display.*; public dynamic class people2Head extends MovieClip { } }//package
Section 182
//popupStart (popupStart) package { import flash.display.*; public dynamic class popupStart extends MovieClip { public function popupStart(){ addFrameScript(0, frame1, 8, frame9, 13, frame14); } function frame14(){ stop(); } function frame9(){ stop(); } function frame1(){ stop(); } } }//package
Section 183
//popupStartclose (popupStartclose) package { import flash.display.*; public dynamic class popupStartclose extends MovieClip { } }//package
Section 184
//preloader (preloader) package { import flash.display.*; public dynamic class preloader extends MovieClip { } }//package
Section 185
//soundAbsorb (soundAbsorb) package { import flash.media.*; public dynamic class soundAbsorb extends Sound { } }//package
Section 186
//soundBalloonPop (soundBalloonPop) package { import flash.media.*; public dynamic class soundBalloonPop extends Sound { } }//package
Section 187
//soundBirdOuch (soundBirdOuch) package { import flash.media.*; public dynamic class soundBirdOuch extends Sound { } }//package
Section 188
//soundJingle (soundJingle) package { import flash.media.*; public dynamic class soundJingle extends Sound { } }//package
Section 189
//soundXmasSpiritUp (soundXmasSpiritUp) package { import flash.media.*; public dynamic class soundXmasSpiritUp extends Sound { } }//package
Section 190
//starSpeak (starSpeak) package { import flash.display.*; public dynamic class starSpeak extends MovieClip { public var fertilizer_6:objectFertilizer; public var fertilizer_1:objectFertilizer; public var sun_7:objectSun; public var sun_8:objectSun; public var sun_9:objectSun; public var fertilizer_5:objectFertilizer; public var water_1:objectWater; public var water_3:objectWater; public var water_5:objectWater; public var water_6:objectWater; public var water_7:objectWater; public var water_8:objectWater; public var water_2:objectWater; public var water_4:objectWater; public var gift_7:objectGift1; public var fertilizer_2:objectFertilizer; public var fertilizer_4:objectFertilizer; public var fertilizer_8:objectFertilizer; public var ball_2:objectBall3; public var sun_2:objectSun; public var sun_1:objectSun; public var sun_3:objectSun; public var water_9:objectWater; public var sun_4:objectSun; public var sun_5:objectSun; public var sun_6:objectSun; public var gift_8:objectGift1; public var light_12:objectLight1; public var fertilizer_9:objectFertilizer; public var ball_1:objectBall3; public var light_1:objectLight1; public var light_2:objectLight1; public var light_3:objectLight1; public var light_4:objectLight1; public var light_5:objectLight1; public var light_6:objectLight1; public var light_7:objectLight1; public var light_8:objectLight1; public var light_9:objectLight1; public var ball_3:objectBall3; public var candy_1:objectCane; public var star_1:objectStar; public var star_2:objectStar; public var star_3:objectStar; public var toy_1:objectBear; public var toy_2:objectBear; public var toy_4:objectBear; public var toy_6:objectBear; public var toy_8:objectBear; public var toy_3:objectBear; public var toy_5:objectBear; public var toy_7:objectBear; public var toy_9:objectBear; public var candy_2:objectCane; public var candy_3:objectCane; public var candy_4:objectCane; public var candy_5:objectCane; public var candy_6:objectCane; public var candy_7:objectCane; public var candy_8:objectCane; public var candy_9:objectCane; public var gift_1:objectGift1; public var gift_2:objectGift1; public var gift_3:objectGift1; public var gift_4:objectGift1; public var gift_5:objectGift1; public var gift_6:objectGift1; public var light_11:objectLight1; public var gift_9:objectGift1; public var fertilizer_3:objectFertilizer; public var light_10:objectLight1; public var ball_8:objectBall3; public var ball_9:objectBall3; public var fertilizer_7:objectFertilizer; public var ball_4:objectBall3; public var ball_5:objectBall3; public var ball_6:objectBall3; public var ball_7:objectBall3; } }//package
Section 191
//titleTree (titleTree) package { import flash.display.*; public dynamic class titleTree extends MovieClip { } }//package
Section 192
//treeLeaves2 (treeLeaves2) package { import flash.display.*; public dynamic class treeLeaves2 extends MovieClip { } }//package
Section 193
//treeMiddle (treeMiddle) package { import flash.display.*; public dynamic class treeMiddle extends MovieClip { public var decorLightStage1:xmaslight1bad; public var decorGinger:objectGinger; public var decorCane1:objectCane; public var decorCane2:objectCane; public var decorCane3:objectCane; public var decorGift1:objectGift5; public var decorGift2:objectGift4; public var decorLight1:xmaslight4; public var decorLight3:xmaslight2; public var decorLight4:xmaslight1; public var decorGift3:objectGift1; public var decorStar:objectStar; public var decorLight2:xmaslight3; public var decorMittens:objectMittens; public var decorLightMedBad:xmaslight2bad; public var decorBall1:objectBall3; public var decorBall3:objectBall1; public var decorBall2:objectBall2; public var decorBear:objectBear; public function treeMiddle(){ addFrameScript(9, frame10, 19, frame20, 37, frame38, 71, frame72, 72, frame73, 73, frame74, 74, frame75); } function frame20(){ stop(); } function frame73(){ stop(); } function frame74(){ stop(); } function frame10(){ stop(); } function frame72(){ stop(); } function frame75(){ stop(); } function frame38(){ gotoAndPlay("idle2"); } } }//package
Section 194
//UIMenu (UIMenu) package { import flash.display.*; public dynamic class UIMenu extends MovieClip { } }//package
Section 195
//UISanta (UISanta) package { import flash.display.*; public dynamic class UISanta extends MovieClip { } }//package
Section 196
//UIScore (UIScore) package { import flash.display.*; import flash.text.*; public dynamic class UIScore extends MovieClip { public var score:TextField; } }//package
Section 197
//UIXmaslevel (UIXmaslevel) package { import flash.display.*; public dynamic class UIXmaslevel extends MovieClip { public var menuItemPause:UIMenu; public var levelBar:UIXmaslevelbar; } }//package
Section 198
//UIXmaslevelbar (UIXmaslevelbar) package { import flash.display.*; public dynamic class UIXmaslevelbar extends MovieClip { public function UIXmaslevelbar(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9); } function frame1(){ stop(); } function frame2(){ stop(); } function frame3(){ stop(); } function frame4(){ stop(); } function frame5(){ stop(); } function frame6(){ stop(); } function frame7(){ stop(); } function frame8(){ stop(); } function frame9(){ stop(); } } }//package
Section 199
//xmaslight1 (xmaslight1) package { import flash.display.*; public dynamic class xmaslight1 extends MovieClip { public function xmaslight1(){ addFrameScript(17, frame18); } function frame18(){ stop(); } } }//package
Section 200
//xmaslight1bad (xmaslight1bad) package { import flash.display.*; public dynamic class xmaslight1bad extends MovieClip { public function xmaslight1bad(){ addFrameScript(46, frame47); } function frame47(){ stop(); } } }//package
Section 201
//xmaslight1bulb (xmaslight1bulb) package { import flash.display.*; public dynamic class xmaslight1bulb extends MovieClip { } }//package
Section 202
//xmaslight2 (xmaslight2) package { import flash.display.*; public dynamic class xmaslight2 extends MovieClip { public function xmaslight2(){ addFrameScript(20, frame21); } function frame21(){ stop(); } } }//package
Section 203
//xmaslight2bad (xmaslight2bad) package { import flash.display.*; public dynamic class xmaslight2bad extends MovieClip { public function xmaslight2bad(){ addFrameScript(33, frame34); } function frame34(){ stop(); } } }//package
Section 204
//xmaslight3 (xmaslight3) package { import flash.display.*; public dynamic class xmaslight3 extends MovieClip { public function xmaslight3(){ addFrameScript(30, frame31); } function frame31(){ stop(); } } }//package
Section 205
//xmaslight4 (xmaslight4) package { import flash.display.*; public dynamic class xmaslight4 extends MovieClip { public function xmaslight4(){ addFrameScript(31, frame32); } function frame32(){ stop(); } } }//package
Section 206
//xmasLights (xmasLights) package { import flash.display.*; public dynamic class xmasLights extends MovieClip { public function xmasLights(){ addFrameScript(17, frame18, 41, frame42, 104, frame105); } function frame105(){ stop(); } function frame42(){ stop(); } function frame18(){ stop(); } } }//package
Section 207
//xmasLine (xmasLine) package { import flash.display.*; public dynamic class xmasLine extends MovieClip { } }//package
Section 208
//xmasObjects (xmasObjects) package { import flash.display.*; public dynamic class xmasObjects extends MovieClip { } }//package
Section 209
//xmasup (xmasup) package { import flash.display.*; public dynamic class xmasup extends MovieClip { public function xmasup(){ addFrameScript(57, frame58); } function frame58(){ stop(); } } }//package

Library Items

Symbol 1 Sound {soundXmasSpiritUp}Used by:584
Symbol 2 Sound {soundBalloonPop}Used by:584
Symbol 3 Sound {soundJingle}Used by:584
Symbol 4 Sound {soundBirdOuch}Used by:584
Symbol 5 Sound {soundAbsorb}Used by:584
Symbol 6 GraphicUsed by:7
Symbol 7 MovieClip {objectFlake}Uses:6
Symbol 8 GraphicUsed by:12
Symbol 9 FontUsed by:10
Symbol 10 TextUses:9Used by:12
Symbol 11 GraphicUsed by:12
Symbol 12 MovieClip {xmasup}Uses:8 10 11Used by:Timeline
Symbol 13 GraphicUsed by:21
Symbol 14 GraphicUsed by:15 16 17 18 19
Symbol 15 MovieClipUses:14Used by:20
Symbol 16 MovieClipUses:14Used by:20
Symbol 17 MovieClipUses:14Used by:20
Symbol 18 MovieClipUses:14Used by:20
Symbol 19 MovieClipUses:14Used by:20
Symbol 20 MovieClipUses:15 16 17 18 19Used by:21 229
Symbol 21 MovieClip {bgNight}Uses:13 20Used by:24 229  Timeline
Symbol 22 FontUsed by:23 48 51 206 208 209 211 213 217 219 224 233 564 586 587 588 589 610 611 615 616 617
Symbol 23 TextUses:22Used by:24
Symbol 24 MovieClip {preloader}Uses:21 23Used by:Timeline
Symbol 25 BitmapUsed by:26
Symbol 26 GraphicUses:25Used by:27
Symbol 27 MovieClip {iconXmas3}Uses:26Used by:577
Symbol 28 GraphicUsed by:190
Symbol 29 GraphicUsed by:43
Symbol 30 GraphicUsed by:32
Symbol 31 GraphicUsed by:32
Symbol 32 MovieClip {cursorStarStar}Uses:30 31Used by:43
Symbol 33 GraphicUsed by:42
Symbol 34 GraphicUsed by:42
Symbol 35 GraphicUsed by:42
Symbol 36 GraphicUsed by:42
Symbol 37 ShapeTweeningUsed by:42
Symbol 38 GraphicUsed by:42
Symbol 39 GraphicUsed by:42
Symbol 40 ShapeTweeningUsed by:42
Symbol 41 GraphicUsed by:42
Symbol 42 MovieClip {xmas3_fla.cursorStarEyes_4}Uses:33 34 35 36 37 38 39 40 41Used by:43
Symbol 43 MovieClip {cursorStar}Uses:29 32 42Used by:190  Timeline
Symbol 44 FontUsed by:45 53 54 71 72 73 116 117 189
Symbol 45 TextUses:44Used by:190
Symbol 46 GraphicUsed by:47
Symbol 47 MovieClip {howtoReplay}Uses:46Used by:190
Symbol 48 TextUses:22Used by:50
Symbol 49 GraphicUsed by:50 52 565
Symbol 50 MovieClip {howtoPrevious}Uses:48 49Used by:190
Symbol 51 TextUses:22Used by:52
Symbol 52 MovieClip {howtoNext}Uses:51 49Used by:190
Symbol 53 TextUses:44Used by:190
Symbol 54 TextUses:44Used by:190
Symbol 55 GraphicUsed by:56
Symbol 56 MovieClip {xmas3_fla.treePot_8}Uses:55Used by:190 379
Symbol 57 GraphicUsed by:190 379
Symbol 58 GraphicUsed by:190 379
Symbol 59 GraphicUsed by:190 379
Symbol 60 GraphicUsed by:62
Symbol 61 GraphicUsed by:62 379
Symbol 62 MovieClipUses:60 61Used by:190
Symbol 63 GraphicUsed by:70
Symbol 64 ShapeTweeningUsed by:70
Symbol 65 ShapeTweeningUsed by:70
Symbol 66 ShapeTweeningUsed by:70
Symbol 67 ShapeTweeningUsed by:70
Symbol 68 ShapeTweeningUsed by:70
Symbol 69 ShapeTweeningUsed by:70
Symbol 70 MovieClip {objectWater}Uses:63 64 65 66 67 68 69Used by:190 583  Timeline
Symbol 71 TextUses:44Used by:190
Symbol 72 TextUses:44Used by:190
Symbol 73 TextUses:44Used by:190
Symbol 74 BitmapUsed by:75
Symbol 75 GraphicUses:74Used by:78
Symbol 76 BitmapUsed by:77
Symbol 77 GraphicUses:76Used by:78
Symbol 78 MovieClip {xmaslight1bulb}Uses:75 77Used by:190 249 252 255 258 342 345
Symbol 79 GraphicUsed by:92
Symbol 80 GraphicUsed by:81 296 307
Symbol 81 MovieClipUses:80Used by:92
Symbol 82 GraphicUsed by:92
Symbol 83 GraphicUsed by:84
Symbol 84 MovieClipUses:83Used by:87
Symbol 85 GraphicUsed by:86
Symbol 86 MovieClipUses:85Used by:87
Symbol 87 MovieClipUses:84 86Used by:92
Symbol 88 GraphicUsed by:89
Symbol 89 MovieClipUses:88Used by:92
Symbol 90 GraphicUsed by:91
Symbol 91 MovieClipUses:90Used by:92
Symbol 92 MovieClip {objectBall1}Uses:79 81 82 87 89 91Used by:190 324 379  Timeline
Symbol 93 GraphicUsed by:101
Symbol 94 GraphicUsed by:95 97
Symbol 95 MovieClipUses:94Used by:101
Symbol 96 GraphicUsed by:101
Symbol 97 MovieClipUses:94Used by:101
Symbol 98 GraphicUsed by:101 405
Symbol 99 GraphicUsed by:100 284
Symbol 100 MovieClipUses:99Used by:101
Symbol 101 MovieClip {objectGift5}Uses:93 95 96 97 98 100Used by:190 324 379  Timeline
Symbol 102 GraphicUsed by:115
Symbol 103 GraphicUsed by:115 246 340
Symbol 104 GraphicUsed by:105
Symbol 105 MovieClip {LBoot}Uses:104Used by:115 246 340
Symbol 106 GraphicUsed by:107
Symbol 107 MovieClip {people1Rarm}Uses:106Used by:115 246
Symbol 108 GraphicUsed by:109
Symbol 109 MovieClip {people1Body}Uses:108Used by:115 246
Symbol 110 GraphicUsed by:111
Symbol 111 MovieClip {people1RLeg}Uses:110Used by:115 246
Symbol 112 GraphicUsed by:113
Symbol 113 MovieClipUses:112Used by:115 246 340
Symbol 114 GraphicUsed by:115 246 340
Symbol 115 MovieClipUses:102 103 105 107 109 111 113 114Used by:190
Symbol 116 TextUses:44Used by:190
Symbol 117 TextUses:44Used by:190
Symbol 118 GraphicUsed by:132 179 188
Symbol 119 GraphicUsed by:121 132 172 179 181 188
Symbol 120 GraphicUsed by:121 132
Symbol 121 MovieClipUses:119 120Used by:132
Symbol 122 ShapeTweeningUsed by:132
Symbol 123 ShapeTweeningUsed by:132
Symbol 124 ShapeTweeningUsed by:132
Symbol 125 GraphicUsed by:132 179 188
Symbol 126 GraphicUsed by:132
Symbol 127 GraphicUsed by:132
Symbol 128 GraphicUsed by:132 179 188
Symbol 129 GraphicUsed by:132 179 188
Symbol 130 GraphicUsed by:132
Symbol 131 GraphicUsed by:132 179 188
Symbol 132 MovieClip {balloonRightRed}Uses:118 121 119 120 122 123 124 125 126 127 128 129 130 131Used by:190  Timeline
Symbol 133 ShapeTweeningUsed by:170
Symbol 134 GraphicUsed by:170
Symbol 135 GraphicUsed by:136
Symbol 136 MovieClipUses:135Used by:170
Symbol 137 GraphicUsed by:170
Symbol 138 GraphicUsed by:170
Symbol 139 ShapeTweeningUsed by:170
Symbol 140 ShapeTweeningUsed by:170
Symbol 141 ShapeTweeningUsed by:170
Symbol 142 ShapeTweeningUsed by:170
Symbol 143 ShapeTweeningUsed by:170
Symbol 144 GraphicUsed by:170
Symbol 145 GraphicUsed by:170
Symbol 146 GraphicUsed by:170
Symbol 147 GraphicUsed by:170
Symbol 148 GraphicUsed by:170
Symbol 149 GraphicUsed by:170
Symbol 150 GraphicUsed by:170
Symbol 151 GraphicUsed by:170
Symbol 152 GraphicUsed by:170
Symbol 153 GraphicUsed by:170
Symbol 154 GraphicUsed by:170
Symbol 155 GraphicUsed by:170
Symbol 156 GraphicUsed by:170
Symbol 157 GraphicUsed by:170
Symbol 158 GraphicUsed by:170
Symbol 159 GraphicUsed by:170
Symbol 160 GraphicUsed by:170
Symbol 161 GraphicUsed by:170
Symbol 162 GraphicUsed by:170
Symbol 163 GraphicUsed by:170
Symbol 164 GraphicUsed by:170
Symbol 165 GraphicUsed by:170
Symbol 166 GraphicUsed by:170
Symbol 167 GraphicUsed by:170
Symbol 168 GraphicUsed by:170
Symbol 169 GraphicUsed by:170
Symbol 170 MovieClip {enemyBird}Uses:133 134 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169Used by:190  Timeline
Symbol 171 GraphicUsed by:172 179
Symbol 172 MovieClip {balloonRightBalloon}Uses:119 171Used by:179
Symbol 173 ShapeTweeningUsed by:179
Symbol 174 ShapeTweeningUsed by:179
Symbol 175 ShapeTweeningUsed by:179
Symbol 176 GraphicUsed by:179
Symbol 177 GraphicUsed by:179
Symbol 178 GraphicUsed by:179
Symbol 179 MovieClip {balloonRight}Uses:118 172 119 171 173 174 175 125 176 177 128 129 178 131Used by:190  Timeline
Symbol 180 GraphicUsed by:181 188
Symbol 181 MovieClipUses:119 180Used by:188
Symbol 182 ShapeTweeningUsed by:188
Symbol 183 ShapeTweeningUsed by:188
Symbol 184 ShapeTweeningUsed by:188
Symbol 185 GraphicUsed by:188
Symbol 186 GraphicUsed by:188
Symbol 187 GraphicUsed by:188
Symbol 188 MovieClip {balloonRightYellow}Uses:118 181 119 180 182 183 184 125 185 186 128 129 187 131Used by:190  Timeline
Symbol 189 TextUses:44Used by:190
Symbol 190 MovieClip {howtoplay}Uses:28 43 45 47 50 52 53 54 56 57 58 59 62 70 71 72 73 78 92 101 115 116 117 132 170 179 188 189Used by:Timeline
Symbol 191 GraphicUsed by:229
Symbol 192 FontUsed by:193 194 195 196 197 198 199 204
Symbol 193 TextUses:192Used by:205
Symbol 194 TextUses:192Used by:205
Symbol 195 TextUses:192Used by:205
Symbol 196 TextUses:192Used by:205
Symbol 197 TextUses:192Used by:205
Symbol 198 TextUses:192Used by:205
Symbol 199 TextUses:192Used by:205
Symbol 200 GraphicUsed by:203
Symbol 201 MovieClipUsed by:203
Symbol 202 GraphicUsed by:203
Symbol 203 MovieClip {titleTree}Uses:200 201 202Used by:205 609
Symbol 204 TextUses:192Used by:205
Symbol 205 MovieClip {menuStartTitle}Uses:193 194 195 196 197 198 199 203 204Used by:229
Symbol 206 TextUses:22Used by:216
Symbol 207 GraphicUsed by:216 218 220 225
Symbol 208 TextUses:22Used by:216
Symbol 209 TextUses:22Used by:212 216
Symbol 210 GraphicUsed by:212 214 215 216
Symbol 211 TextUses:22Used by:214 216
Symbol 212 MovieClip {menuStartGameEasy}Uses:209 210Used by:216
Symbol 213 TextUses:22Used by:215 216
Symbol 214 MovieClip {menuStartGameMed}Uses:211 210Used by:216
Symbol 215 MovieClip {menuStartGameHard}Uses:213 210Used by:216
Symbol 216 MovieClip {xmas3_fla.menuStartGame_48}Uses:206 207 208 209 210 211 212 213 214 215Used by:229
Symbol 217 TextUses:22Used by:218
Symbol 218 MovieClipUses:217 207Used by:229
Symbol 219 TextUses:22Used by:220
Symbol 220 MovieClipUses:219 207Used by:229
Symbol 221 GraphicUsed by:223
Symbol 222 GraphicUsed by:223
Symbol 223 MovieClip {mute2}Uses:221 222Used by:229
Symbol 224 TextUses:22Used by:225
Symbol 225 MovieClip {menuHighscores}Uses:224 207Used by:229
Symbol 226 BitmapUsed by:227
Symbol 227 GraphicUses:226Used by:228
Symbol 228 MovieClipUses:227Used by:229
Symbol 229 MovieClip {menuStart}Uses:21 191 20 205 216 218 220 223 225 228Used by:Timeline
Symbol 230 BitmapUsed by:231
Symbol 231 GraphicUses:230Used by:232
Symbol 232 MovieClip {bgGround}Uses:231Used by:Timeline
Symbol 233 EditableTextUses:22Used by:234
Symbol 234 MovieClip {UIScore}Uses:233Used by:Timeline
Symbol 235 GraphicUsed by:236
Symbol 236 MovieClip {peopl1Lleg}Uses:235Used by:246
Symbol 237 GraphicUsed by:238
Symbol 238 MovieClipUses:237Used by:246 340
Symbol 239 GraphicUsed by:240
Symbol 240 MovieClip {people1Head}Uses:239Used by:246
Symbol 241 GraphicUsed by:246
Symbol 242 GraphicUsed by:246
Symbol 243 GraphicUsed by:246
Symbol 244 GraphicUsed by:246
Symbol 245 GraphicUsed by:246
Symbol 246 MovieClip {people1}Uses:103 105 236 107 109 238 111 240 241 242 243 113 244 114 245Used by:Timeline
Symbol 247 ShapeTweeningUsed by:249
Symbol 248 GraphicUsed by:249
Symbol 249 MovieClip {xmaslight1}Uses:247 248 78Used by:259 379  Timeline
Symbol 250 ShapeTweeningUsed by:252
Symbol 251 GraphicUsed by:252
Symbol 252 MovieClip {xmaslight2}Uses:250 251 78Used by:259 379
Symbol 253 ShapeTweeningUsed by:255
Symbol 254 GraphicUsed by:255
Symbol 255 MovieClip {xmaslight3}Uses:253 254 78Used by:259 379
Symbol 256 ShapeTweeningUsed by:258
Symbol 257 GraphicUsed by:258
Symbol 258 MovieClip {xmaslight4}Uses:256 257 78Used by:259 379
Symbol 259 MovieClip {xmasLights}Uses:249 252 255 258Used by:Timeline
Symbol 260 BitmapUsed by:261
Symbol 261 GraphicUses:260Used by:262
Symbol 262 MovieClip {objectCane}Uses:261Used by:324 379 583  Timeline
Symbol 263 GraphicUsed by:269
Symbol 264 GraphicUsed by:265
Symbol 265 MovieClipUses:264Used by:269
Symbol 266 GraphicUsed by:269
Symbol 267 GraphicUsed by:268
Symbol 268 MovieClipUses:267Used by:269
Symbol 269 MovieClip {objectMittens}Uses:263 265 266 268Used by:324 379  Timeline
Symbol 270 BitmapUsed by:271
Symbol 271 GraphicUses:270Used by:272
Symbol 272 MovieClip {objectBear}Uses:271Used by:324 379 583  Timeline
Symbol 273 GraphicUsed by:277
Symbol 274 GraphicUsed by:275
Symbol 275 MovieClipUses:274Used by:277
Symbol 276 GraphicUsed by:277
Symbol 277 MovieClip {objectGinger}Uses:273 275 276Used by:324 379  Timeline
Symbol 278 GraphicUsed by:285
Symbol 279 GraphicUsed by:280 282
Symbol 280 MovieClipUses:279Used by:285
Symbol 281 GraphicUsed by:285
Symbol 282 MovieClipUses:279Used by:285
Symbol 283 GraphicUsed by:285
Symbol 284 MovieClipUses:99Used by:285
Symbol 285 MovieClip {objectGift1}Uses:278 280 281 282 283 284Used by:324 379 583  Timeline
Symbol 286 GraphicUsed by:294
Symbol 287 GraphicUsed by:288 290
Symbol 288 MovieClipUses:287Used by:294
Symbol 289 GraphicUsed by:294
Symbol 290 MovieClipUses:287Used by:294
Symbol 291 GraphicUsed by:294
Symbol 292 GraphicUsed by:293
Symbol 293 MovieClipUses:292Used by:294
Symbol 294 MovieClip {objectGift4}Uses:286 288 289 290 291 293Used by:324 379  Timeline
Symbol 295 GraphicUsed by:306 318
Symbol 296 MovieClipUses:80Used by:306
Symbol 297 GraphicUsed by:306
Symbol 298 GraphicUsed by:299
Symbol 299 MovieClipUses:298Used by:306
Symbol 300 GraphicUsed by:301
Symbol 301 MovieClipUses:300Used by:306
Symbol 302 GraphicUsed by:303
Symbol 303 MovieClipUses:302Used by:306
Symbol 304 GraphicUsed by:305
Symbol 305 MovieClipUses:304Used by:306
Symbol 306 MovieClip {objectBall2}Uses:295 296 297 299 301 303 305Used by:324 379  Timeline
Symbol 307 MovieClipUses:80Used by:318
Symbol 308 GraphicUsed by:318
Symbol 309 GraphicUsed by:310
Symbol 310 MovieClipUses:309Used by:313
Symbol 311 GraphicUsed by:312
Symbol 312 MovieClipUses:311Used by:313
Symbol 313 MovieClipUses:310 312Used by:318
Symbol 314 GraphicUsed by:315
Symbol 315 MovieClipUses:314Used by:318
Symbol 316 GraphicUsed by:317
Symbol 317 MovieClipUses:316Used by:318
Symbol 318 MovieClip {objectBall3}Uses:295 307 308 313 315 317Used by:324 379 583  Timeline
Symbol 319 GraphicUsed by:323
Symbol 320 GraphicUsed by:321
Symbol 321 MovieClipUses:320Used by:323
Symbol 322 GraphicUsed by:323
Symbol 323 MovieClip {objectStar}Uses:319 321 322Used by:324 379 583  Timeline
Symbol 324 MovieClip {xmasObjects}Uses:262 269 272 277 285 294 101 92 306 318 323Used by:Timeline
Symbol 325 GraphicUsed by:326
Symbol 326 MovieClipUses:325Used by:340
Symbol 327 GraphicUsed by:328
Symbol 328 MovieClipUses:327Used by:340
Symbol 329 GraphicUsed by:330
Symbol 330 MovieClipUses:329Used by:340
Symbol 331 GraphicUsed by:332
Symbol 332 MovieClipUses:331Used by:340
Symbol 333 GraphicUsed by:334
Symbol 334 MovieClip {people2Head}Uses:333Used by:340
Symbol 335 GraphicUsed by:340
Symbol 336 GraphicUsed by:340
Symbol 337 GraphicUsed by:340
Symbol 338 GraphicUsed by:340
Symbol 339 GraphicUsed by:340
Symbol 340 MovieClip {people2}Uses:103 105 326 328 330 238 332 334 335 336 337 113 338 339 114Used by:Timeline
Symbol 341 GraphicUsed by:342
Symbol 342 MovieClip {xmaslight1bad}Uses:341 78Used by:379
Symbol 343 GraphicUsed by:379
Symbol 344 GraphicUsed by:345
Symbol 345 MovieClip {xmaslight2bad}Uses:344 78Used by:379
Symbol 346 GraphicUsed by:379
Symbol 347 GraphicUsed by:379
Symbol 348 GraphicUsed by:379
Symbol 349 GraphicUsed by:379
Symbol 350 GraphicUsed by:379
Symbol 351 GraphicUsed by:379
Symbol 352 GraphicUsed by:379
Symbol 353 GraphicUsed by:379
Symbol 354 GraphicUsed by:379
Symbol 355 GraphicUsed by:379
Symbol 356 GraphicUsed by:379
Symbol 357 GraphicUsed by:379
Symbol 358 GraphicUsed by:379
Symbol 359 GraphicUsed by:379
Symbol 360 GraphicUsed by:379
Symbol 361 ShapeTweeningUsed by:379
Symbol 362 ShapeTweeningUsed by:379
Symbol 363 GraphicUsed by:379
Symbol 364 GraphicUsed by:379
Symbol 365 GraphicUsed by:379
Symbol 366 GraphicUsed by:379
Symbol 367 GraphicUsed by:379
Symbol 368 BitmapUsed by:369
Symbol 369 GraphicUses:368Used by:370
Symbol 370 MovieClip {xmas3_fla.treeLayer1_108}Uses:369Used by:379
Symbol 371 BitmapUsed by:372
Symbol 372 GraphicUses:371Used by:373
Symbol 373 MovieClip {treeLeaves2}Uses:372Used by:376
Symbol 374 GraphicUsed by:375
Symbol 375 MovieClipUses:374Used by:376
Symbol 376 MovieClip {xmas3_fla.treeLayer1a_109}Uses:373 375Used by:379
Symbol 377 GraphicUsed by:378
Symbol 378 MovieClipUses:377Used by:379
Symbol 379 MovieClip {treeMiddle}Uses:342 56 343 58 59 249 252 255 258 262 269 272 277 285 294 101 92 306 318 323 345 57 346 347 348 349 350 351 352 353 354 355 356 357 358 359 61 360 361 362 363 364 365 366 367 370 376 378Used by:Timeline
Symbol 380 BitmapUsed by:381
Symbol 381 GraphicUses:380Used by:382
Symbol 382 MovieClip {objectDrum}Uses:381Used by:Timeline
Symbol 383 GraphicUsed by:384
Symbol 384 MovieClip {objectFertilizer}Uses:383Used by:583  Timeline
Symbol 385 BitmapUsed by:386
Symbol 386 GraphicUses:385Used by:387
Symbol 387 MovieClip {objectGift2}Uses:386Used by:Timeline
Symbol 388 GraphicUsed by:396
Symbol 389 GraphicUsed by:390 392
Symbol 390 MovieClipUses:389Used by:396
Symbol 391 GraphicUsed by:396
Symbol 392 MovieClipUses:389Used by:396
Symbol 393 GraphicUsed by:396
Symbol 394 GraphicUsed by:395
Symbol 395 MovieClipUses:394Used by:396
Symbol 396 MovieClip {objectGift3}Uses:388 390 391 392 393 395Used by:Timeline
Symbol 397 GraphicUsed by:405
Symbol 398 GraphicUsed by:399
Symbol 399 MovieClipUses:398Used by:405
Symbol 400 GraphicUsed by:405
Symbol 401 GraphicUsed by:402
Symbol 402 MovieClipUses:401Used by:405
Symbol 403 GraphicUsed by:404
Symbol 404 MovieClipUses:403Used by:405
Symbol 405 MovieClip {objectGift6}Uses:397 399 400 402 98 404Used by:Timeline
Symbol 406 GraphicUsed by:414
Symbol 407 GraphicUsed by:408
Symbol 408 MovieClipUses:407Used by:414
Symbol 409 GraphicUsed by:414
Symbol 410 GraphicUsed by:411
Symbol 411 MovieClipUses:410Used by:414
Symbol 412 GraphicUsed by:413
Symbol 413 MovieClipUses:412Used by:414
Symbol 414 MovieClip {objectHat}Uses:406 408 409 411 413Used by:Timeline
Symbol 415 GraphicUsed by:423
Symbol 416 GraphicUsed by:417
Symbol 417 MovieClipUses:416Used by:423
Symbol 418 GraphicUsed by:423
Symbol 419 GraphicUsed by:420 428 435 442 449 456 463 470 477 484 491 498
Symbol 420 MovieClipUses:419Used by:423
Symbol 421 GraphicUsed by:422 429 436 443 450 457 464 471 478 485 492 499
Symbol 422 MovieClipUses:421Used by:423
Symbol 423 MovieClip {objectLight1}Uses:415 417 418 420 422Used by:583  Timeline
Symbol 424 GraphicUsed by:430
Symbol 425 GraphicUsed by:426
Symbol 426 MovieClipUses:425Used by:430
Symbol 427 GraphicUsed by:430
Symbol 428 MovieClipUses:419Used by:430
Symbol 429 MovieClipUses:421Used by:430
Symbol 430 MovieClip {objectLight2}Uses:424 426 427 428 429Used by:Timeline
Symbol 431 GraphicUsed by:437
Symbol 432 GraphicUsed by:433
Symbol 433 MovieClipUses:432Used by:437
Symbol 434 GraphicUsed by:437
Symbol 435 MovieClipUses:419Used by:437
Symbol 436 MovieClipUses:421Used by:437
Symbol 437 MovieClip {objectLight3}Uses:431 433 434 435 436Used by:Timeline
Symbol 438 GraphicUsed by:444
Symbol 439 GraphicUsed by:440
Symbol 440 MovieClipUses:439Used by:444
Symbol 441 GraphicUsed by:444
Symbol 442 MovieClipUses:419Used by:444
Symbol 443 MovieClipUses:421Used by:444
Symbol 444 MovieClip {objectLight4}Uses:438 440 441 442 443Used by:Timeline
Symbol 445 GraphicUsed by:451
Symbol 446 GraphicUsed by:447
Symbol 447 MovieClipUses:446Used by:451
Symbol 448 GraphicUsed by:451
Symbol 449 MovieClipUses:419Used by:451
Symbol 450 MovieClipUses:421Used by:451
Symbol 451 MovieClip {objectLight5}Uses:445 447 448 449 450Used by:Timeline
Symbol 452 GraphicUsed by:458
Symbol 453 GraphicUsed by:454
Symbol 454 MovieClipUses:453Used by:458
Symbol 455 GraphicUsed by:458
Symbol 456 MovieClipUses:419Used by:458
Symbol 457 MovieClipUses:421Used by:458
Symbol 458 MovieClip {objectLight6}Uses:452 454 455 456 457Used by:Timeline
Symbol 459 GraphicUsed by:465
Symbol 460 GraphicUsed by:461
Symbol 461 MovieClipUses:460Used by:465
Symbol 462 GraphicUsed by:465
Symbol 463 MovieClipUses:419Used by:465
Symbol 464 MovieClipUses:421Used by:465
Symbol 465 MovieClip {objectLight7}Uses:459 461 462 463 464Used by:Timeline
Symbol 466 GraphicUsed by:472
Symbol 467 GraphicUsed by:468
Symbol 468 MovieClipUses:467Used by:472
Symbol 469 GraphicUsed by:472
Symbol 470 MovieClipUses:419Used by:472
Symbol 471 MovieClipUses:421Used by:472
Symbol 472 MovieClip {objectLight8}Uses:466 468 469 470 471Used by:Timeline
Symbol 473 GraphicUsed by:479
Symbol 474 GraphicUsed by:475
Symbol 475 MovieClipUses:474Used by:479
Symbol 476 GraphicUsed by:479
Symbol 477 MovieClipUses:419Used by:479
Symbol 478 MovieClipUses:421Used by:479
Symbol 479 MovieClip {objectLight9}Uses:473 475 476 477 478Used by:Timeline
Symbol 480 GraphicUsed by:486
Symbol 481 GraphicUsed by:482
Symbol 482 MovieClipUses:481Used by:486
Symbol 483 GraphicUsed by:486
Symbol 484 MovieClipUses:419Used by:486
Symbol 485 MovieClipUses:421Used by:486
Symbol 486 MovieClip {objectLight10}Uses:480 482 483 484 485Used by:Timeline
Symbol 487 GraphicUsed by:493
Symbol 488 GraphicUsed by:489
Symbol 489 MovieClipUses:488Used by:493
Symbol 490 GraphicUsed by:493
Symbol 491 MovieClipUses:419Used by:493
Symbol 492 MovieClipUses:421Used by:493
Symbol 493 MovieClip {objectLight11}Uses:487 489 490 491 492Used by:Timeline
Symbol 494 GraphicUsed by:500
Symbol 495 GraphicUsed by:496
Symbol 496 MovieClipUses:495Used by:500
Symbol 497 GraphicUsed by:500
Symbol 498 MovieClipUses:419Used by:500
Symbol 499 MovieClipUses:421Used by:500
Symbol 500 MovieClip {objectLight12}Uses:494 496 497 498 499Used by:Timeline
Symbol 501 GraphicUsed by:517
Symbol 502 GraphicUsed by:503
Symbol 503 MovieClipUses:502Used by:517
Symbol 504 GraphicUsed by:517
Symbol 505 GraphicUsed by:506
Symbol 506 MovieClipUses:505Used by:517
Symbol 507 GraphicUsed by:517
Symbol 508 GraphicUsed by:509
Symbol 509 MovieClipUses:508Used by:517
Symbol 510 GraphicUsed by:511
Symbol 511 MovieClipUses:510Used by:517
Symbol 512 GraphicUsed by:517
Symbol 513 GraphicUsed by:514
Symbol 514 MovieClipUses:513Used by:517
Symbol 515 GraphicUsed by:516
Symbol 516 MovieClipUses:515Used by:517
Symbol 517 MovieClip {objectRibbon}Uses:501 503 504 506 507 509 511 512 514 516Used by:Timeline
Symbol 518 GraphicUsed by:525
Symbol 519 GraphicUsed by:520
Symbol 520 MovieClipUses:519Used by:525
Symbol 521 GraphicUsed by:525
Symbol 522 GraphicUsed by:523 541
Symbol 523 MovieClipUses:522Used by:525
Symbol 524 GraphicUsed by:525
Symbol 525 MovieClip {objectSkate}Uses:518 520 521 523 524Used by:Timeline
Symbol 526 GraphicUsed by:536
Symbol 527 GraphicUsed by:528
Symbol 528 MovieClipUses:527Used by:536
Symbol 529 GraphicUsed by:536
Symbol 530 GraphicUsed by:531
Symbol 531 MovieClipUses:530Used by:536
Symbol 532 GraphicUsed by:536
Symbol 533 GraphicUsed by:534
Symbol 534 MovieClipUses:533Used by:536
Symbol 535 GraphicUsed by:536
Symbol 536 MovieClip {objectSnowman}Uses:526 528 529 531 532 534 535Used by:Timeline
Symbol 537 GraphicUsed by:542
Symbol 538 GraphicUsed by:539
Symbol 539 MovieClipUses:538Used by:542
Symbol 540 GraphicUsed by:542
Symbol 541 MovieClipUses:522Used by:542
Symbol 542 MovieClip {objectSock}Uses:537 539 540 541Used by:Timeline
Symbol 543 GraphicUsed by:547
Symbol 544 GraphicUsed by:547
Symbol 545 GraphicUsed by:547
Symbol 546 GraphicUsed by:547
Symbol 547 MovieClip {objectSun}Uses:543 544 545 546Used by:583  Timeline
Symbol 548 GraphicUsed by:558
Symbol 549 GraphicUsed by:550
Symbol 550 MovieClipUses:549Used by:558
Symbol 551 GraphicUsed by:558
Symbol 552 GraphicUsed by:553
Symbol 553 MovieClipUses:552Used by:558
Symbol 554 GraphicUsed by:558
Symbol 555 GraphicUsed by:556
Symbol 556 MovieClipUses:555Used by:558
Symbol 557 GraphicUsed by:558
Symbol 558 MovieClip {objectWreath}Uses:548 550 551 553 554 556 557Used by:Timeline
Symbol 559 ShapeTweeningUsed by:563
Symbol 560 ShapeTweeningUsed by:563
Symbol 561 ShapeTweeningUsed by:563
Symbol 562 GraphicUsed by:563
Symbol 563 MovieClip {xmasLine}Uses:559 560 561 562Used by:Timeline
Symbol 564 TextUses:22Used by:565
Symbol 565 MovieClip {UIMenu}Uses:564 49Used by:577
Symbol 566 GraphicUsed by:577
Symbol 567 GraphicUsed by:576
Symbol 568 GraphicUsed by:576
Symbol 569 GraphicUsed by:576
Symbol 570 GraphicUsed by:576
Symbol 571 GraphicUsed by:576
Symbol 572 GraphicUsed by:576
Symbol 573 GraphicUsed by:576
Symbol 574 GraphicUsed by:576
Symbol 575 GraphicUsed by:576
Symbol 576 MovieClip {UIXmaslevelbar}Uses:567 568 569 570 571 572 573 574 575Used by:577
Symbol 577 MovieClip {UIXmaslevel}Uses:565 566 27 576Used by:Timeline
Symbol 578 GraphicUsed by:580
Symbol 579 GraphicUsed by:580
Symbol 580 MovieClipUses:578 579Used by:581
Symbol 581 MovieClip {arrowUp}Uses:580Used by:Timeline
Symbol 582 GraphicUsed by:583
Symbol 583 MovieClip {starSpeak}Uses:582 70 384 547 423 262 272 285 318 323Used by:Timeline
Symbol 584 MovieClipUses:5 1 2 4 3Used by:Timeline
Symbol 585 GraphicUsed by:609 614 623
Symbol 586 TextUses:22Used by:609
Symbol 587 TextUses:22Used by:609
Symbol 588 EditableTextUses:22Used by:609
Symbol 589 EditableTextUses:22Used by:609
Symbol 590 GraphicUsed by:608
Symbol 591 GraphicUsed by:592
Symbol 592 MovieClipUses:591Used by:608
Symbol 593 GraphicUsed by:608
Symbol 594 GraphicUsed by:595
Symbol 595 MovieClipUses:594Used by:608
Symbol 596 GraphicUsed by:608
Symbol 597 GraphicUsed by:598
Symbol 598 MovieClipUses:597Used by:608
Symbol 599 GraphicUsed by:608
Symbol 600 GraphicUsed by:601
Symbol 601 MovieClipUses:600Used by:608
Symbol 602 GraphicUsed by:608
Symbol 603 GraphicUsed by:604
Symbol 604 MovieClipUses:603Used by:608
Symbol 605 GraphicUsed by:608
Symbol 606 GraphicUsed by:607
Symbol 607 MovieClipUses:606Used by:608
Symbol 608 MovieClip {UISanta}Uses:590 592 593 595 596 598 599 601 602 604 605 607Used by:609
Symbol 609 MovieClip {menuOver}Uses:585 203 586 587 588 589 608Used by:Timeline
Symbol 610 TextUses:22Used by:614
Symbol 611 TextUses:22Used by:613
Symbol 612 GraphicUsed by:613
Symbol 613 MovieClip {popupStartclose}Uses:611 612Used by:614
Symbol 614 MovieClip {popupStart}Uses:585 610 613Used by:Timeline
Symbol 615 TextUses:22Used by:623
Symbol 616 TextUses:22Used by:623
Symbol 617 TextUses:22Used by:623
Symbol 618 GraphicUsed by:619
Symbol 619 MovieClip {menuPauseResume}Uses:618Used by:623
Symbol 620 GraphicUsed by:622
Symbol 621 GraphicUsed by:622
Symbol 622 MovieClip {xmas3_fla.mute_219}Uses:620 621Used by:623
Symbol 623 MovieClip {menuPause}Uses:585 615 616 617 619 622Used by:Timeline

Instance Names

"mainStar"Symbol 43 MovieClip {cursorStar} Frame 1Symbol 32 MovieClip {cursorStarStar}
"cursorFace"Symbol 43 MovieClip {cursorStar} Frame 1Symbol 42 MovieClip {xmas3_fla.cursorStarEyes_4}
"replay"Symbol 190 MovieClip {howtoplay} Frame 13Symbol 47 MovieClip {howtoReplay}
"prev"Symbol 190 MovieClip {howtoplay} Frame 13Symbol 50 MovieClip {howtoPrevious}
"next"Symbol 190 MovieClip {howtoplay} Frame 13Symbol 52 MovieClip {howtoNext}
"replay"Symbol 190 MovieClip {howtoplay} Frame 15Symbol 47 MovieClip {howtoReplay}
"prev"Symbol 190 MovieClip {howtoplay} Frame 15Symbol 50 MovieClip {howtoPrevious}
"next"Symbol 190 MovieClip {howtoplay} Frame 15Symbol 52 MovieClip {howtoNext}
"replay"Symbol 190 MovieClip {howtoplay} Frame 32Symbol 47 MovieClip {howtoReplay}
"prev"Symbol 190 MovieClip {howtoplay} Frame 32Symbol 50 MovieClip {howtoPrevious}
"next"Symbol 190 MovieClip {howtoplay} Frame 32Symbol 52 MovieClip {howtoNext}
"replay"Symbol 190 MovieClip {howtoplay} Frame 49Symbol 47 MovieClip {howtoReplay}
"prev"Symbol 190 MovieClip {howtoplay} Frame 49Symbol 50 MovieClip {howtoPrevious}
"next"Symbol 190 MovieClip {howtoplay} Frame 49Symbol 52 MovieClip {howtoNext}
"replay"Symbol 190 MovieClip {howtoplay} Frame 66Symbol 47 MovieClip {howtoReplay}
"prev"Symbol 190 MovieClip {howtoplay} Frame 66Symbol 50 MovieClip {howtoPrevious}
"next"Symbol 190 MovieClip {howtoplay} Frame 66Symbol 52 MovieClip {howtoNext}
"replay"Symbol 190 MovieClip {howtoplay} Frame 98Symbol 47 MovieClip {howtoReplay}
"prev"Symbol 190 MovieClip {howtoplay} Frame 98Symbol 50 MovieClip {howtoPrevious}
"next"Symbol 190 MovieClip {howtoplay} Frame 98Symbol 52 MovieClip {howtoNext}
"replay"Symbol 190 MovieClip {howtoplay} Frame 124Symbol 47 MovieClip {howtoReplay}
"prev"Symbol 190 MovieClip {howtoplay} Frame 124Symbol 50 MovieClip {howtoPrevious}
"next"Symbol 190 MovieClip {howtoplay} Frame 124Symbol 52 MovieClip {howtoNext}
"replay"Symbol 190 MovieClip {howtoplay} Frame 140Symbol 47 MovieClip {howtoReplay}
"prev"Symbol 190 MovieClip {howtoplay} Frame 140Symbol 50 MovieClip {howtoPrevious}
"next"Symbol 190 MovieClip {howtoplay} Frame 140Symbol 52 MovieClip {howtoNext}
"menuItemStartGameEasy"Symbol 216 MovieClip {xmas3_fla.menuStartGame_48} Frame 11Symbol 212 MovieClip {menuStartGameEasy}
"menuItemStartGameMedium"Symbol 216 MovieClip {xmas3_fla.menuStartGame_48} Frame 13Symbol 214 MovieClip {menuStartGameMed}
"menuItemStartGameHard"Symbol 216 MovieClip {xmas3_fla.menuStartGame_48} Frame 15Symbol 215 MovieClip {menuStartGameHard}
"menuStartGame"Symbol 229 MovieClip {menuStart} Frame 1Symbol 216 MovieClip {xmas3_fla.menuStartGame_48}
"menuHowToPlay"Symbol 229 MovieClip {menuStart} Frame 1Symbol 218 MovieClip
"menuMoreGames"Symbol 229 MovieClip {menuStart} Frame 1Symbol 220 MovieClip
"mute"Symbol 229 MovieClip {menuStart} Frame 1Symbol 223 MovieClip {mute2}
"menuItemHighscores"Symbol 229 MovieClip {menuStart} Frame 1Symbol 225 MovieClip {menuHighscores}
"cavalcade"Symbol 229 MovieClip {menuStart} Frame 1Symbol 228 MovieClip
"score"Symbol 234 MovieClip {UIScore} Frame 1Symbol 233 EditableText
"decorLightStage1"Symbol 379 MovieClip {treeMiddle} Frame 1Symbol 342 MovieClip {xmaslight1bad}
"decorLight4"Symbol 379 MovieClip {treeMiddle} Frame 1Symbol 249 MovieClip {xmaslight1}
"decorLight3"Symbol 379 MovieClip {treeMiddle} Frame 1Symbol 252 MovieClip {xmaslight2}
"decorLight2"Symbol 379 MovieClip {treeMiddle} Frame 1Symbol 255 MovieClip {xmaslight3}
"decorLight1"Symbol 379 MovieClip {treeMiddle} Frame 1Symbol 258 MovieClip {xmaslight4}
"decorCane3"Symbol 379 MovieClip {treeMiddle} Frame 1Symbol 262 MovieClip {objectCane}
"decorCane1"Symbol 379 MovieClip {treeMiddle} Frame 1Symbol 262 MovieClip {objectCane}
"decorCane2"Symbol 379 MovieClip {treeMiddle} Frame 1Symbol 262 MovieClip {objectCane}
"decorMittens"Symbol 379 MovieClip {treeMiddle} Frame 1Symbol 269 MovieClip {objectMittens}
"decorBear"Symbol 379 MovieClip {treeMiddle} Frame 1Symbol 272 MovieClip {objectBear}
"decorGinger"Symbol 379 MovieClip {treeMiddle} Frame 1Symbol 277 MovieClip {objectGinger}
"decorGift3"Symbol 379 MovieClip {treeMiddle} Frame 1Symbol 285 MovieClip {objectGift1}
"decorGift2"Symbol 379 MovieClip {treeMiddle} Frame 1Symbol 294 MovieClip {objectGift4}
"decorGift1"Symbol 379 MovieClip {treeMiddle} Frame 1Symbol 101 MovieClip {objectGift5}
"decorBall3"Symbol 379 MovieClip {treeMiddle} Frame 1Symbol 92 MovieClip {objectBall1}
"decorBall2"Symbol 379 MovieClip {treeMiddle} Frame 1Symbol 306 MovieClip {objectBall2}
"decorBall1"Symbol 379 MovieClip {treeMiddle} Frame 1Symbol 318 MovieClip {objectBall3}
"decorStar"Symbol 379 MovieClip {treeMiddle} Frame 1Symbol 323 MovieClip {objectStar}
"decorLightMedBad"Symbol 379 MovieClip {treeMiddle} Frame 1Symbol 345 MovieClip {xmaslight2bad}
"menuItemPause"Symbol 577 MovieClip {UIXmaslevel} Frame 1Symbol 565 MovieClip {UIMenu}
"levelBar"Symbol 577 MovieClip {UIXmaslevel} Frame 1Symbol 576 MovieClip {UIXmaslevelbar}
"water_1"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 70 MovieClip {objectWater}
"water_2"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 70 MovieClip {objectWater}
"water_3"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 70 MovieClip {objectWater}
"water_4"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 70 MovieClip {objectWater}
"water_6"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 70 MovieClip {objectWater}
"water_8"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 70 MovieClip {objectWater}
"water_5"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 70 MovieClip {objectWater}
"water_7"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 70 MovieClip {objectWater}
"water_9"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 70 MovieClip {objectWater}
"fertilizer_1"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 384 MovieClip {objectFertilizer}
"fertilizer_2"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 384 MovieClip {objectFertilizer}
"fertilizer_3"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 384 MovieClip {objectFertilizer}
"fertilizer_4"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 384 MovieClip {objectFertilizer}
"fertilizer_6"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 384 MovieClip {objectFertilizer}
"fertilizer_8"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 384 MovieClip {objectFertilizer}
"fertilizer_5"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 384 MovieClip {objectFertilizer}
"fertilizer_7"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 384 MovieClip {objectFertilizer}
"fertilizer_9"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 384 MovieClip {objectFertilizer}
"sun_1"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 547 MovieClip {objectSun}
"sun_2"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 547 MovieClip {objectSun}
"sun_3"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 547 MovieClip {objectSun}
"sun_4"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 547 MovieClip {objectSun}
"sun_6"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 547 MovieClip {objectSun}
"sun_8"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 547 MovieClip {objectSun}
"sun_5"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 547 MovieClip {objectSun}
"sun_7"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 547 MovieClip {objectSun}
"sun_9"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 547 MovieClip {objectSun}
"light_1"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 423 MovieClip {objectLight1}
"light_2"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 423 MovieClip {objectLight1}
"light_3"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 423 MovieClip {objectLight1}
"light_4"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 423 MovieClip {objectLight1}
"light_5"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 423 MovieClip {objectLight1}
"light_7"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 423 MovieClip {objectLight1}
"light_9"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 423 MovieClip {objectLight1}
"light_12"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 423 MovieClip {objectLight1}
"light_11"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 423 MovieClip {objectLight1}
"light_6"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 423 MovieClip {objectLight1}
"light_8"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 423 MovieClip {objectLight1}
"light_10"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 423 MovieClip {objectLight1}
"candy_1"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 262 MovieClip {objectCane}
"candy_2"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 262 MovieClip {objectCane}
"candy_3"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 262 MovieClip {objectCane}
"candy_4"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 262 MovieClip {objectCane}
"candy_6"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 262 MovieClip {objectCane}
"candy_8"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 262 MovieClip {objectCane}
"candy_5"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 262 MovieClip {objectCane}
"candy_7"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 262 MovieClip {objectCane}
"candy_9"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 262 MovieClip {objectCane}
"toy_3"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 272 MovieClip {objectBear}
"toy_2"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 272 MovieClip {objectBear}
"toy_1"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 272 MovieClip {objectBear}
"toy_4"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 272 MovieClip {objectBear}
"toy_6"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 272 MovieClip {objectBear}
"toy_8"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 272 MovieClip {objectBear}
"toy_5"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 272 MovieClip {objectBear}
"toy_7"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 272 MovieClip {objectBear}
"toy_9"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 272 MovieClip {objectBear}
"gift_1"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 285 MovieClip {objectGift1}
"gift_2"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 285 MovieClip {objectGift1}
"gift_3"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 285 MovieClip {objectGift1}
"gift_4"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 285 MovieClip {objectGift1}
"gift_6"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 285 MovieClip {objectGift1}
"gift_8"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 285 MovieClip {objectGift1}
"gift_5"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 285 MovieClip {objectGift1}
"gift_7"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 285 MovieClip {objectGift1}
"gift_9"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 285 MovieClip {objectGift1}
"ball_3"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 318 MovieClip {objectBall3}
"ball_2"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 318 MovieClip {objectBall3}
"ball_1"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 318 MovieClip {objectBall3}
"ball_4"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 318 MovieClip {objectBall3}
"ball_6"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 318 MovieClip {objectBall3}
"ball_8"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 318 MovieClip {objectBall3}
"ball_5"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 318 MovieClip {objectBall3}
"ball_7"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 318 MovieClip {objectBall3}
"ball_9"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 318 MovieClip {objectBall3}
"star_2"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 323 MovieClip {objectStar}
"star_1"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 323 MovieClip {objectStar}
"star_3"Symbol 583 MovieClip {starSpeak} Frame 1Symbol 323 MovieClip {objectStar}
"scoreTotal"Symbol 609 MovieClip {menuOver} Frame 7Symbol 588 EditableText
"scoreChristmasSpirit"Symbol 609 MovieClip {menuOver} Frame 7Symbol 589 EditableText
"resume"Symbol 623 MovieClip {menuPause} Frame 7Symbol 619 MovieClip {menuPauseResume}
"restart"Symbol 623 MovieClip {menuPause} Frame 7Symbol 619 MovieClip {menuPauseResume}
"main"Symbol 623 MovieClip {menuPause} Frame 7Symbol 619 MovieClip {menuPauseResume}
"mute"Symbol 623 MovieClip {menuPause} Frame 7Symbol 622 MovieClip {xmas3_fla.mute_219}

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS3.

Labels

"preload"Frame 1
"exported-assets"Frame 10
"game"Frame 22
"stage1"Symbol 56 MovieClip {xmas3_fla.treePot_8} Frame 1
"held"Symbol 132 MovieClip {balloonRightRed} Frame 1
"up"Symbol 132 MovieClip {balloonRightRed} Frame 18
"pop"Symbol 132 MovieClip {balloonRightRed} Frame 37
"flying"Symbol 170 MovieClip {enemyBird} Frame 1
"shot"Symbol 170 MovieClip {enemyBird} Frame 11
"held"Symbol 179 MovieClip {balloonRight} Frame 1
"up"Symbol 179 MovieClip {balloonRight} Frame 18
"pop"Symbol 179 MovieClip {balloonRight} Frame 37
"held"Symbol 188 MovieClip {balloonRightYellow} Frame 1
"up"Symbol 188 MovieClip {balloonRightYellow} Frame 18
"pop"Symbol 188 MovieClip {balloonRightYellow} Frame 37
"how1"Symbol 190 MovieClip {howtoplay} Frame 1
"how2"Symbol 190 MovieClip {howtoplay} Frame 14
"how3"Symbol 190 MovieClip {howtoplay} Frame 16
"how4"Symbol 190 MovieClip {howtoplay} Frame 33
"how5"Symbol 190 MovieClip {howtoplay} Frame 50
"how6"Symbol 190 MovieClip {howtoplay} Frame 67
"how7"Symbol 190 MovieClip {howtoplay} Frame 99
"how8"Symbol 190 MovieClip {howtoplay} Frame 125
"how9"Symbol 190 MovieClip {howtoplay} Frame 141
"how10"Symbol 190 MovieClip {howtoplay} Frame 142
"next"Symbol 216 MovieClip {xmas3_fla.menuStartGame_48} Frame 2
"skating"Symbol 246 MovieClip {people1} Frame 1
"looking"Symbol 246 MovieClip {people1} Frame 24
"stage1"Symbol 259 MovieClip {xmasLights} Frame 1
"stage2"Symbol 259 MovieClip {xmasLights} Frame 19
"stage3"Symbol 259 MovieClip {xmasLights} Frame 43
"stage4"Symbol 259 MovieClip {xmasLights} Frame 74
"skating"Symbol 340 MovieClip {people2} Frame 1
"looking"Symbol 340 MovieClip {people2} Frame 24
"stage0"Symbol 379 MovieClip {treeMiddle} Frame 1
"stage1"Symbol 379 MovieClip {treeMiddle} Frame 11
"stage2"Symbol 379 MovieClip {treeMiddle} Frame 21
"idle2"Symbol 379 MovieClip {treeMiddle} Frame 27
"stage3"Symbol 379 MovieClip {treeMiddle} Frame 39
"stage4"Symbol 379 MovieClip {treeMiddle} Frame 73
"stage5"Symbol 379 MovieClip {treeMiddle} Frame 74
"stage6"Symbol 379 MovieClip {treeMiddle} Frame 75
"paused"Symbol 609 MovieClip {menuOver} Frame 2
"unpause"Symbol 609 MovieClip {menuOver} Frame 10
"paused"Symbol 614 MovieClip {popupStart} Frame 2
"unpause"Symbol 614 MovieClip {popupStart} Frame 10
"paused"Symbol 623 MovieClip {menuPause} Frame 2
"unpause"Symbol 623 MovieClip {menuPause} Frame 10




http://swfchan.com/10/47829/info.shtml
Created: 1/5 -2019 01:57:55 Last modified: 1/5 -2019 01:57:55 Server time: 22/12 -2024 23:11:38