Section 1
//jpg (background1.jpg)
package background1 {
import flash.display.*;
public dynamic class jpg extends BitmapData {
public function jpg(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package background1
Section 2
//MainTimeline (bird_watching_launcher_fla.MainTimeline)
package bird_watching_launcher_fla {
import flash.display.*;
import com.lumoslabs.framework.*;
public dynamic class MainTimeline extends MovieClip {
public function MainTimeline(){
addFrameScript(0, frame1);
}
function frame1(){
Launcher.main(this);
}
}
}//package bird_watching_launcher_fla
Section 3
//AbstractGameEvent (com.lumoslabs.framework.events.AbstractGameEvent)
package com.lumoslabs.framework.events {
import com.lumoslabs.framework.*;
import flash.events.*;
public class AbstractGameEvent extends Event {
protected var aManagedGame:ManagedGame;
public function AbstractGameEvent(_arg1:ManagedGame, _arg2:String){
super(_arg2);
aManagedGame = _arg1;
}
public function get managedGame():ManagedGame{
return (aManagedGame);
}
}
}//package com.lumoslabs.framework.events
Section 4
//GameDataEvent (com.lumoslabs.framework.events.GameDataEvent)
package com.lumoslabs.framework.events {
import com.lumoslabs.framework.*;
public class GameDataEvent extends AbstractGameEvent {
protected var gameDataHash:Object;
public static const GAME_DATA:String = "gameData";
public function GameDataEvent(_arg1:ManagedGame, _arg2:Object){
super(_arg1, GAME_DATA);
this.gameDataHash = _arg2;
}
public function get dataHash():Object{
return (gameDataHash);
}
}
}//package com.lumoslabs.framework.events
Section 5
//GamePlayEvent (com.lumoslabs.framework.events.GamePlayEvent)
package com.lumoslabs.framework.events {
import com.lumoslabs.framework.*;
public class GamePlayEvent extends AbstractGameEvent {
public static const GAME_PLAY:String = "gamePlay";
public function GamePlayEvent(_arg1:ManagedGame){
super(_arg1, GAME_PLAY);
}
}
}//package com.lumoslabs.framework.events
Section 6
//GamePromoEvent (com.lumoslabs.framework.events.GamePromoEvent)
package com.lumoslabs.framework.events {
import com.lumoslabs.framework.*;
public class GamePromoEvent extends AbstractGameEvent {
public static const GAME_PROMO:String = "gamePromo";
public function GamePromoEvent(_arg1:ManagedGame){
super(_arg1, GAME_PROMO);
}
}
}//package com.lumoslabs.framework.events
Section 7
//GameQuitEvent (com.lumoslabs.framework.events.GameQuitEvent)
package com.lumoslabs.framework.events {
import com.lumoslabs.framework.*;
public class GameQuitEvent extends AbstractGameEvent {
public static const GAME_QUIT:String = "gameQuit";
public function GameQuitEvent(_arg1:ManagedGame){
super(_arg1, GAME_QUIT);
}
}
}//package com.lumoslabs.framework.events
Section 8
//GameManager (com.lumoslabs.framework.GameManager)
package com.lumoslabs.framework {
public interface GameManager {
function help():void;
function pause():void;
function mute():void;
function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void;
function setupGame(_arg1:ManagedGame):void;
}
}//package com.lumoslabs.framework
Section 9
//GameRegistrar (com.lumoslabs.framework.GameRegistrar)
package com.lumoslabs.framework {
public class GameRegistrar {
private static var _gameManager:GameManager;
public static function getGameManager():GameManager{
return (_gameManager);
}
public static function registerManagedGame(_arg1:ManagedGame):void{
trace(("GameRegistrar: registerManagedGame: " + _arg1));
if (_gameManager != null){
_gameManager.setupGame(_arg1);
} else {
_arg1.start();
};
}
public static function registerGameManager(_arg1:GameManager):void{
trace(("GameRegistrar: registerGameManager: " + _arg1));
if (_gameManager != null){
trace(("GameRegistrar: registering a new GameManager, although already had: " + _gameManager));
};
_gameManager = _arg1;
}
}
}//package com.lumoslabs.framework
Section 10
//Launcher (com.lumoslabs.framework.Launcher)
package com.lumoslabs.framework {
import flash.display.*;
import flash.events.*;
import com.lumoslabs.util.*;
import com.lumoslabs.framework.events.*;
import flash.net.*;
import flash.system.*;
import flash.external.*;
public class Launcher extends EventDispatcher implements ManagedGame {
protected var connectionID:String;
protected var settingsHash:Object;
protected var connection:LocalConnection;
protected var parentDisObjCon:DisplayObjectContainer;
protected var relaunchScreen:RelaunchScreen;
protected var launchScreen:LaunchScreen;
protected static const SEND_ID:String = "LauncherToPopUp";
protected static const RECEIVE_ID:String = "PopUpToLauncher";
public function Launcher(_arg1:DisplayObjectContainer){
this.parentDisObjCon = _arg1;
_arg1.stage.tabChildren = false;
_arg1.stage.align = StageAlign.TOP_LEFT;
_arg1.stage.scaleMode = StageScaleMode.NO_SCALE;
launchScreen = new LaunchScreen();
launchScreen.launchButton.addEventListener(MouseEvent.CLICK, launchPopUpClick);
relaunchScreen = new RelaunchScreen();
relaunchScreen.launchButton.addEventListener(MouseEvent.CLICK, launchPopUpClick);
connection = new LocalConnection();
connection.client = this;
var _local2:Date = new Date();
connectionID = _local2.valueOf().toString();
trace(("Launcher, connectionID: " + connectionID));
if (ExternalInterface.available){
setupJS();
GameRegistrar.registerManagedGame(this);
} else {
trace("Launcher, ExternalInterface not available");
};
}
public function help():void{
}
protected function setupJS():void{
ExternalInterface.call("eval", ((((((((((("function onBodyUnload() {" + "if (navigator.appName.indexOf('Microsoft') != -1) {") + "window['") + ExternalInterface.objectID) + "'].sendToActionScript();") + "} else {") + "document['") + ExternalInterface.objectID) + "'].sendToActionScript();") + "}") + "}") + "window.onunload = onBodyUnload;"));
ExternalInterface.addCallback("sendToActionScript", closeConnection);
}
protected function openConnection():void{
try {
connection.connect((RECEIVE_ID + connectionID));
trace("Launcher, openConnection, succeeded");
} catch(error:ArgumentError) {
trace("Launcher, openConnection, failed");
};
}
public function pause():void{
}
public function reportPlay():void{
dispatchEvent(new GamePlayEvent(this));
}
public function reportData(_arg1:Object):void{
dispatchEvent(new GameDataEvent(this, _arg1));
}
public function mute():void{
}
public function getParent():DisplayObjectContainer{
return (new Sprite());
}
public function hasControlPanel():Boolean{
return (false);
}
public function reportQuit():void{
closeConnection();
dispatchEvent(new GameQuitEvent(this));
}
public function start():void{
Display.removeAll(launchScreen, relaunchScreen);
parentDisObjCon.addChild(launchScreen);
}
public function getMochiAdID():String{
return (new String());
}
public function isFullScreen():Boolean{
return (true);
}
protected function launchPopUpClick(_arg1:MouseEvent):void{
var _local2:String = ResourceHelper.getResourcePath(("/pop_up/pop_up.html?connectionID=" + connectionID));
var _local3:Number = Capabilities.screenResolutionX;
var _local4:Number = Capabilities.screenResolutionY;
var _local5:URLRequest = new URLRequest(((((((("javascript:var popUpWindow = window.open('" + _local2) + "','popUp','width=") + _local3) + ",height=") + _local4) + ",top=0,left=0,screenX=0,screenY=0,") + "directories=no,location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no'); if (window.focus) { popUpWindow.focus(); }"));
Display.removeAll(launchScreen, relaunchScreen);
parentDisObjCon.addChild(relaunchScreen);
openConnection();
navigateToURL(_local5, "_self");
}
public function destroy():void{
connection.send((SEND_ID + connectionID), "destroy");
closeConnection();
Display.removeAll(launchScreen, relaunchScreen);
parentDisObjCon = null;
}
public function reportPromo():void{
dispatchEvent(new GamePromoEvent(this));
}
public function addSettings(_arg1:Object):void{
this.settingsHash = _arg1;
}
protected function closeConnection():void{
try {
connection.close();
trace("Launcher, closeConnection succeeded");
} catch(error:ArgumentError) {
trace("Launcher, closeConnection failed");
};
}
public function popUpReply():void{
trace("Launcher received");
var _local1:Object = {settingsHash:settingsHash, resource_url:ResourceHelper.getResourcePath()};
trace("Launcher sent");
connection.send((SEND_ID + connectionID), "setupAndStart", _local1);
}
public static function main(_arg1:DisplayObjectContainer):void{
var _local2:ManagedGame = new Launcher(_arg1);
}
}
}//package com.lumoslabs.framework
Section 11
//ManagedGame (com.lumoslabs.framework.ManagedGame)
package com.lumoslabs.framework {
public interface ManagedGame {
function help():void;
function start():void;
function addSettings(_arg1:Object):void;
function isFullScreen():Boolean;
function pause():void;
function hasControlPanel():Boolean;
function mute():void;
function destroy():void;
function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void;
}
}//package com.lumoslabs.framework
Section 12
//ResourceHelper (com.lumoslabs.framework.ResourceHelper)
package com.lumoslabs.framework {
import flash.net.*;
import flash.system.*;
public class ResourceHelper {
private static var resourcePath:String;
private static var rootPath:String;
private static function getDefaultResourcePath(_arg1:String=""):String{
trace(("ResourceHelper: getDefaultResourcePath: " + _arg1));
if ((((Capabilities.playerType == "External")) || ((Capabilities.playerType == "StandAlone")))){
return (("../resources/" + _arg1));
};
return (getRootPath(("flash/resources/" + _arg1)));
}
private static function getDefaultRootPath(_arg1:String=""):String{
trace(("ResourceHelper: getDefaultRootPath: " + _arg1));
var _local2:LocalConnection = new LocalConnection();
return (((("http://" + _local2.domain) + "/") + _arg1));
}
public static function setResourcePath(_arg1:String):void{
trace(("ResourceHelper: setResourcePath: " + _arg1));
ResourceHelper.resourcePath = _arg1;
}
public static function getResourcePath(_arg1:String=""):String{
trace(("ResourceHelper: getResourcePath: " + _arg1));
if (resourcePath == null){
return (getDefaultResourcePath(_arg1));
};
return ((resourcePath + _arg1));
}
private static function parseLoaderInfoURL(_arg1:String):String{
var _local4:int;
trace(("ResourceHelper: parseLoaderInfoURL: " + _arg1));
var _local2:RegExp = /http:\/\/[^\/]*\//;
var _local3:Array = _arg1.match(_local2);
if ((_local3 is Array)){
return (_local3[0]);
};
_local4 = _arg1.indexOf("flash/");
return (_arg1.substr(0, _local4));
}
public static function setLoaderInfoURL(_arg1:String):void{
trace(("ResourceHelper: setLoaderInfoURL: " + _arg1));
ResourceHelper.rootPath = parseLoaderInfoURL(_arg1);
}
public static function getRootPath(_arg1:String=""):String{
trace(("ResourceHelper: getRootPath: " + _arg1));
if (Security.sandboxType == Security.REMOTE){
if (rootPath == null){
return (getDefaultRootPath(_arg1));
};
return ((rootPath + _arg1));
//unresolved jump
};
return (_arg1);
}
}
}//package com.lumoslabs.framework
Section 13
//Display (com.lumoslabs.util.Display)
package com.lumoslabs.util {
import flash.display.*;
import flash.geom.*;
public class Display {
public static const WHITE:Number = 0xFFFFFF;
public static const BROWN:Number = 0x996600;
public static const INDIGO:Number = 153;
public static const BLUE:Number = 0xFF;
public static const GREY:Number = 0xCCCCCC;
public static const GREEN:Number = 0xFF00;
public static const BLACK:Number = 0;
public static const ORANGE:Number = 0xFF9900;
public static const RED:Number = 0xFF0000;
public static const YELLOW:Number = 0xFFFF00;
public static const PURPLE:Number = 0x9900FF;
public static const VIOLET:Number = 0xFF00FF;
public static function centerAtY(_arg1:DisplayObject, _arg2:DisplayObject, _arg3:Number=0):void{
centerAt(_arg1, _arg2, NaN, _arg3);
}
public static function replace(_arg1:DisplayObject, _arg2:DisplayObject):void{
if (_arg1.parent != null){
if (_arg1 != _arg2){
_arg2.x = _arg1.x;
_arg2.y = _arg1.y;
_arg1.parent.addChild(_arg2);
_arg1.parent.swapChildren(_arg1, _arg2);
_arg1.parent.removeChild(_arg1);
} else {
trace("Display, replace, argument DisplayObjects are equal");
};
} else {
trace("Display, replace, first argument DisplayObject has no parent");
};
}
public static function remove(_arg1:DisplayObject):void{
if (((!((_arg1 == null))) && (!((_arg1.parent == null))))){
_arg1.parent.removeChild(_arg1);
};
}
public static function bringToFront(_arg1:DisplayObject):void{
if (_arg1.parent != null){
_arg1.parent.addChild(_arg1);
};
}
public static function localToLocal(_arg1:DisplayObject, _arg2:DisplayObject, _arg3:Point=null):Point{
if (_arg3 == null){
_arg3 = new Point();
};
_arg3 = _arg1.localToGlobal(_arg3);
_arg3 = _arg2.globalToLocal(_arg3);
return (_arg3);
}
public static function stopAllClips(_arg1:DisplayObjectContainer):void{
var _local3:DisplayObjectContainer;
var _local2:MovieClip = (_arg1 as MovieClip);
if (_local2 != null){
_local2.stop();
};
var _local4:int;
while (_local4 < _arg1.numChildren) {
_local3 = (_arg1.getChildAt(_local4) as DisplayObjectContainer);
if (_local3 != null){
stopAllClips(_local3);
};
_local4++;
};
}
public static function center(_arg1:DisplayObject, _arg2:DisplayObject):void{
var _local3:Rectangle = _arg2.getBounds(_arg2);
centerAt(_arg1, _arg2, (_local3.x + (_local3.width / 2)), (_local3.y + (_local3.height / 2)));
}
public static function removeIfChild(_arg1:DisplayObjectContainer, _arg2:DisplayObject):void{
if (((((!((_arg1 == null))) && (!((_arg2 == null))))) && ((_arg2.parent == _arg1)))){
_arg1.removeChild(_arg2);
};
}
public static function removeIfChildren(_arg1:DisplayObjectContainer, ... _args):void{
var _local3:DisplayObject;
if (_arg1 != null){
for each (_local3 in _args) {
if (((!((_local3 == null))) && ((_local3.parent == _arg1)))){
_arg1.removeChild(_local3);
};
};
};
}
public static function removeAllChildren(_arg1:DisplayObjectContainer):void{
if (_arg1 != null){
while (_arg1.numChildren > 0) {
_arg1.removeChildAt(0);
};
};
}
public static function centerAt(_arg1:DisplayObject, _arg2:DisplayObject, _arg3:Number=NaN, _arg4:Number=NaN):void{
var _local6:Point;
var _local5:Rectangle = _arg1.getBounds(_arg2);
if (_arg1.stage){
if (_arg2.stage){
_local6 = localToLocal(_arg1, _arg2);
} else {
_local6 = _arg1.localToGlobal(new Point());
_arg1.localToGlobal(new Point()).x = (_local6.x - _arg2.x);
_local6.y = (_local6.y - _arg2.y);
};
} else {
if (_arg2.stage){
_local6 = _arg2.globalToLocal(new Point(_arg1.x, _arg1.y));
} else {
_local6 = new Point((_arg1.x - _arg2.x), (_arg1.y - _arg2.y));
};
};
if (!isNaN(_arg3)){
_arg1.x = (((_arg3 - _local5.x) - (_local5.width / 2)) + _local6.x);
};
if (!isNaN(_arg4)){
_arg1.y = (((_arg4 - _local5.y) - (_local5.height / 2)) + _local6.y);
};
}
public static function centerAtX(_arg1:DisplayObject, _arg2:DisplayObject, _arg3:Number=0):void{
centerAt(_arg1, _arg2, _arg3);
}
public static function removeEnumerable(_arg1:Object):void{
var _local2:DisplayObject;
for each (_local2 in _arg1) {
remove(_local2);
};
}
public static function removeAll(... _args):void{
var _local2:DisplayObject;
for each (_local2 in _args) {
remove(_local2);
};
}
}
}//package com.lumoslabs.util
Section 14
//GreenLaunch (GreenLaunch)
package {
import flash.display.*;
public dynamic class GreenLaunch extends Sprite {
}
}//package
Section 15
//LaunchButton (LaunchButton)
package {
import flash.display.*;
public dynamic class LaunchButton extends SimpleButton {
}
}//package
Section 16
//LaunchScreen (LaunchScreen)
package {
import flash.display.*;
public dynamic class LaunchScreen extends Sprite {
public var launchButton:LaunchButton;
}
}//package
Section 17
//NotebookCover (NotebookCover)
package {
import flash.display.*;
public dynamic class NotebookCover extends Sprite {
}
}//package
Section 18
//OrangeLaunch (OrangeLaunch)
package {
import flash.display.*;
public dynamic class OrangeLaunch extends Sprite {
}
}//package
Section 19
//RelaunchScreen (RelaunchScreen)
package {
import flash.display.*;
public dynamic class RelaunchScreen extends Sprite {
public var launchButton:LaunchButton;
}
}//package