Section 1
//UsefulEvent (com.kid360.events.UsefulEvent)
package com.kid360.events {
import flash.events.*;
public class UsefulEvent extends Event {
public var data:Object;
public static const USEFUL_EVENT:String = "usefulEvent";
public function UsefulEvent(_arg1:Object, _arg2:String="usefulEvent", _arg3:Boolean=true, _arg4:Boolean=true){
super(_arg2, _arg3, _arg4);
data = _arg1;
}
override public function toString():String{
return (formatToString("UsefulEvent", "type", "bubbles", "cancelable", "eventPhase", "data"));
}
override public function clone():Event{
return (new UsefulEvent(data, type, bubbles, cancelable));
}
}
}//package com.kid360.events
Section 2
//AvatarSpec (com.kid360.mlp.AvatarSpec)
package com.kid360.mlp {
import com.kid360.*;
public class AvatarSpec {
public var creationTime:Number;// = 0
public var mark:uint;// = 0
public var tail:Object;
public var name:String;// = ""
public var markingTime:Number;// = 0
public var body:Object;
public var head:Object;
public var bottoms:Object;
public var eye:Object;
public var hair:Object;
public var tops:Object;
public function AvatarSpec(){
name = "";
creationTime = 0;
body = {variant:0, color:0};
eye = {variant:0, color:0};
hair = {variant:0, color:0};
tail = {variant:0, color:0};
head = {variant:1, color:0};
tops = {variant:1, color:0};
bottoms = {variant:1, color:0};
mark = 0;
markingTime = 0;
super();
}
public function clone():AvatarSpec{
return (({name:name, creationTime:creationTime, body:{variant:body.variant, color:body.color}, eye:{variant:eye.variant, color:eye.color}, hair:{variant:hair.variant, color:hair.color}, tail:{variant:tail.variant, color:tail.color}, head:{variant:head.variant, color:head.color}, tops:{variant:tops.variant, color:tops.color}, bottoms:{variant:bottoms.variant, color:bottoms.color}, mark:mark, markingTime:markingTime} as AvatarSpec));
}
public function toString():String{
var _local1:String;
_local1 = (("[" + name) + "\n");
_local1 = (_local1 + (("\tBorn:\t" + new Date(creationTime).toString()) + "\n"));
_local1 = (_local1 + ((("\tBody:\t" + body.variant) + MLPConstants.COLOR_NAMES[body.color]) + "\n"));
_local1 = (_local1 + ((("\tEyes:\t" + eye.variant) + MLPConstants.COLOR_NAMES[eye.color]) + "\n"));
_local1 = (_local1 + ((("\tHair:\t" + hair.variant) + MLPConstants.COLOR_NAMES[hair.color]) + "\n"));
_local1 = (_local1 + ((("\tTail:\t" + tail.variant) + MLPConstants.COLOR_NAMES[tail.color]) + "\n"));
_local1 = (_local1 + ((("\tHead:\t" + head.variant) + MLPConstants.COLOR_NAMES[head.color]) + "\n"));
_local1 = (_local1 + ((("\tNeck:\t" + tops.variant) + MLPConstants.COLOR_NAMES[tops.color]) + "\n"));
_local1 = (_local1 + ((("\tBack:\t" + bottoms.variant) + MLPConstants.COLOR_NAMES[bottoms.color]) + "\n"));
_local1 = (_local1 + (((("\tMark:\t" + ((mark == 0)) ? "none" : String(mark)) + " on ") + new Date(markingTime).toString()) + "]"));
return (_local1);
}
public function get isMarked():Boolean{
return ((markingTime > 0));
}
public static function anySpec():Object{
var anyName:Function;
var ponySpec:Object;
anyName = function ():String{
return (("Pony" + Utils.randInRange(1000, 9999)));
};
ponySpec = new (AvatarSpec);
ponySpec.name = anyName();
ponySpec.body = {variant:Utils.randInRange(0, (MLPConstants.NUM_BODY_CHOICES - 1)), color:Utils.randInRange(0, (MLPConstants.NUM_COLOR_CHOICES - 1))};
ponySpec.eye = {variant:Utils.randInRange(0, (MLPConstants.NUM_EYE_CHOICES - 1)), color:Utils.randInRange(0, (MLPConstants.NUM_COLOR_CHOICES - 1))};
ponySpec.hair = {variant:Utils.randInRange(0, (MLPConstants.NUM_MANE_CHOICES - 1)), color:Utils.randInRange(0, (MLPConstants.NUM_COLOR_CHOICES - 1))};
ponySpec.tail = {variant:Utils.randInRange(0, (MLPConstants.NUM_TAIL_CHOICES - 1)), color:Utils.randInRange(0, (MLPConstants.NUM_COLOR_CHOICES - 1))};
ponySpec.head = {variant:Utils.randInRange(0, (MLPConstants.NUM_HAT_CHOICES - 1)), color:Utils.randInRange(0, (MLPConstants.NUM_COLOR_CHOICES - 1))};
ponySpec.tops = {variant:Utils.randInRange(0, (MLPConstants.NUM_NECK_CHOICES - 1)), color:Utils.randInRange(0, (MLPConstants.NUM_COLOR_CHOICES - 1))};
ponySpec.bottoms = {variant:Utils.randInRange(0, (MLPConstants.NUM_BACK_CHOICES - 1)), color:Utils.randInRange(0, (MLPConstants.NUM_COLOR_CHOICES - 1))};
ponySpec.mark = Utils.randInRange(1, 20);
return (ponySpec);
}
}
}//package com.kid360.mlp
Section 3
//MetaIntro (com.kid360.mlp.MetaIntro)
package com.kid360.mlp {
import flash.display.*;
import flash.events.*;
import com.kid360.events.*;
import flash.text.*;
public class MetaIntro extends MovieClip {
public var selectedLanguage:String;
public var gameTitleShadow:TextField;
public var gameTitle:TextField;
public var rainbow:MovieClip;
public var copyright:TextField;
public static const INTRO_DONE:String = "introDone";
public function MetaIntro(){
addFrameScript(0, frame1, 5, frame6, 937, frame938, 938, frame939, 1130, frame1131);
rainbow.bar.scaleX = (rainbow.bar.scaleY = 0.01);
loaderInfo.addEventListener(ProgressEvent.PROGRESS, onLoadProgress, false, 0, true);
loaderInfo.addEventListener(Event.COMPLETE, onLoadComplete, false, 0, true);
}
private function get avatarIsConfigured():Boolean{
return (locIsValid);
}
private function introDone():void{
stage.removeEventListener(MouseEvent.MOUSE_DOWN, onPressed);
MLPPlayer.instance.hasSeenIntro(MLPConstants.META_INTRO);
dispatchEvent(new UsefulEvent({name:INTRO_DONE, payload:null}));
}
public function stringsDidLoad():void{
updateStrings();
}
private function onPressed(_arg1:MouseEvent):void{
if (MLPPlayer.instance.maySkipIntro(MLPConstants.META_INTRO)){
stop();
introDone();
};
}
function frame6(){
stop();
}
function frame1(){
stop();
selectedLanguage = "en_US";
StringsManager.loadText("strings.xml", this, stringsDidLoad);
}
function frame1131(){
stop();
introDone();
}
public function updateStrings():void{
copyright.text = StringsManager.getString("metaIntro", "copyright", selectedLanguage);
gameTitle.text = StringsManager.getString("metaIntro", "gameTitle", selectedLanguage);
gameTitleShadow.text = StringsManager.getString("metaIntro", "gameTitle", selectedLanguage);
}
private function get locIsValid():Boolean{
return ((MLPPlayer.instance.stats.ponyLoc > -1));
}
private function onLoadComplete(_arg1:Event):void{
rainbow.bar.scaleX = (rainbow.bar.scaleY = 1);
gotoAndStop("startScreen");
}
private function onLoadProgress(_arg1:ProgressEvent):void{
rainbow.bar.scaleX = (rainbow.bar.scaleY = (_arg1.bytesLoaded / _arg1.bytesTotal));
}
function frame938(){
stop();
}
function frame939(){
stop();
introDone();
}
public function loadingDone():void{
loaderInfo.removeEventListener(ProgressEvent.PROGRESS, onLoadProgress);
loaderInfo.removeEventListener(Event.COMPLETE, onLoadComplete);
stage.addEventListener(MouseEvent.MOUSE_DOWN, onPressed, false, 0, true);
dispatchEvent(new UsefulEvent({name:"gameStart", payload:null}));
gotoAndPlay((avatarIsConfigured) ? "configured" : "notConfigured");
}
}
}//package com.kid360.mlp
Section 4
//MLPConstants (com.kid360.mlp.MLPConstants)
package com.kid360.mlp {
public class MLPConstants {
public static const BODY_CATEGORY:int = 6;
public static const STAGE_WIDTH:Number = 750;
public static const APPLE_INTRO:int = 1;
public static const TAIL_CATEGORY:int = 2;
public static const PANO_MAX_X:int = 0;
public static const KINDNESS_SPARKS:uint = 0;
public static const CHEAT_ACTIVE:int = 1;
public static const AVATAR_EDITOR:uint = 8;
public static const PARK_PANO_WIDTH:uint = 1709;
public static const NUM_MANE_CHOICES:uint = 9;
public static const YELLOW_BODY_COLOR:uint = 16777062;
public static const RED_CHIP_COLOR:uint = 16737945;
public static const NUM_TAIL_CHOICES:uint = 9;
public static const BODY_THRESHOLDS:Array = [0, 1, 2];
public static const HARVEST_LOC:int = 0;
public static const COLOR_NAMES:Array = ["white", "red", "yellow", "green", "blue", "purple"];
public static const CLOUD_BUMP:uint = 6;
public static const NUM_NECK_CHOICES:uint = 10;
public static const DOWNTOWN:uint = 1;
public static const SCROLL_SPEED:int = 6;
public static const FARM:uint = 0;
public static const LAUGH_PACK:uint = 5;
public static const MINIGAME_ABORTED:String = "minigameAborted";
public static const YELLOW_CHIP_COLOR:uint = 16777062;
public static const ENCOUNTER_DONE:String = "encounterDone";
public static const MINIGAME_DONE:String = "minigameDone";
public static const GREEN_BODY_COLOR:uint = 0x66FF00;
public static const STRINGS_FILENAME:String = "strings.xml";
public static const GENEROSITY_SPARKS:uint = 1;
public static const FARM_PANO_WIDTH:uint = 1165;
public static const PART_THRESHOLDS:Array = [EYE_THRESHOLDS, MANE_THRESHOLDS, TAIL_THRESHOLDS, HAT_THRESHOLDS, NECK_THRESHOLDS, BACK_THRESHOLDS, BODY_THRESHOLDS];
public static const BURBS_PANO_WIDTH:uint = 1475;
public static const NUM_EYE_CHOICES:uint = 9;
public static const APPLE_HARVEST:uint = 4;
public static const LAUGHTER_SPARKS:uint = 3;
public static const NECK_THRESHOLDS:Array = [0, 0, 0, 0, 1500, 3300, 5100, 6900, 8700, 10500];
public static const RARITY_MOB:uint = 5;
public static const AVATAR_CHANGE:String = "avatarChange";
public static const TOPS_CATEGORY:int = 4;
public static const PINKIE_PIE_MOB:uint = 3;
public static const FLUTTERSHY_MOB:uint = 2;
public static const SWEETS_LOC:int = 1;
public static const TOWN_PANO_WIDTH:uint = 1332;
public static const RAINBOW_DASH_MOB:uint = 4;
public static const BLUE_BODY_COLOR:uint = 10944509;
public static const EYE_CATEGORY:int = 0;
public static const CREATOR_LOC:int = 2;
public static const LOYALTY_SPARKS:uint = 4;
public static const NUM_BODY_CHOICES:uint = 3;
public static const MISH_MASH:uint = 7;
public static const EYE_THRESHOLDS:Array = [0, 0, 0, 300, 2100, 3900, 5700, 7500, 9300];
public static const LOCATION_CHANGE:String = "locationChange";
public static const GREEN_CHIP_COLOR:uint = 10017853;
public static const MINIGAME_SCORE:String = "minigameScore";
public static const PANO_MIN_X:int = -4931;
public static const UPDATE_SCORE:String = "updateScore";
public static const PONY_CHANGE:String = "ponyChange";
public static const WHITE_CHIP_COLOR:uint = 0xFFFFFF;
public static const MELODY_DONE:String = "melodyDone";
public static const HEAD_CATEGORY:int = 3;
public static const GENERIC_MOB:uint = 0;
public static const META_INTRO:int = 0;
public static const BLUE_CHIP_COLOR:uint = 5354482;
public static const SWEETS_INTRO:int = 2;
public static const MUSIC_INTRO:int = 4;
public static const TELEPORT_PONY:String = "teleportPony";
public static const CLOUD_INTRO:int = 3;
public static const STAGE_HEIGHT:Number = 500;
public static const WESTWARD:int = -1;
public static const BODY_COLORS:Array = [0, RED_BODY_COLOR, YELLOW_BODY_COLOR, GREEN_BODY_COLOR, BLUE_BODY_COLOR, PURPLE_BODY_COLOR];
public static const NUM_BACK_CHOICES:uint = 10;
public static const NUM_HAT_CHOICES:uint = 10;
public static const TAIL_THRESHOLDS:Array = [0, 0, 0, 900, 2700, 4500, 6300, 8100, 9900];
public static const INVALID_LOC:int = -1;
public static const APPLEJACK_MOB:uint = 1;
public static const HAIR_CATEGORY:int = 1;
public static const NUM_COLOR_CHOICES:uint = 6;
public static const HONESTY_SPARKS:uint = 2;
public static const BACK_THRESHOLDS:Array = [0, 0, 0, 0, 1800, 3600, 5400, 7200, 9000, 10800];
public static const PURPLE_BODY_COLOR:uint = 0xFF00FF;
public static const MISHMASH_LOC:int = 4;
public static const SUBURBS:uint = 2;
public static const BOTTOMS_CATEGORY:int = 5;
public static const HAT_THRESHOLDS:Array = [0, 0, 0, 0, 1200, 3000, 4800, 6600, 8400, 10200];
public static const PANO_LOCS:Array = [-240, -1550, -3400, -4600, -4860];
public static const MANE_THRESHOLDS:Array = [0, 0, 0, 600, 2400, 4200, 6000, 7800, 9600];
public static const PARK:uint = 3;
public static const TWILIGHT_SPARKLE_MOB:uint = 6;
public static const PURPLE_CHIP_COLOR:uint = 6961263;
public static const CLOUD_LOC:int = 3;
public static const EASTWARD:int = 1;
public static const RED_BODY_COLOR:uint = 16737945;
public static function defaultAvatar():Object{
return (new AvatarSpec());
}
public static function partCategoryName(_arg1:uint):String{
var _local2:Array;
_local2 = ["eyes", "mane", "tails", "headwear", "neckwear", "saddles"];
return (_local2[_arg1]);
}
public static function partsAvailable(_arg1:uint, _arg2:uint):Array{
var maxValidIndex:Function;
var newParts:Array;
var i:int;
var vals:Array;
var lastUnlocked:uint;
var nowUnlocked:uint;
var numUnlocked:int;
var newOnes:Array;
var j:int;
var oldPoints = _arg1;
var newPoints = _arg2;
maxValidIndex = function (_arg1:Array, _arg2:uint):uint{
var _local3:int;
var _local4:int;
_local3 = (_arg1.length - 1);
if (_arg2 >= _arg1[_local3]){
return (_local3);
};
_local4 = 0;
while (_local4 < _arg1.length) {
if (_arg1[_local4] > _arg2){
return ((_local4 - 1));
};
_local4++;
};
return (0);
};
newParts = [];
i = 0;
while (i < (PART_THRESHOLDS.length - 1)) {
vals = PART_THRESHOLDS[i];
lastUnlocked = maxValidIndex(vals, oldPoints);
nowUnlocked = maxValidIndex(vals, newPoints);
if (nowUnlocked > lastUnlocked){
numUnlocked = (nowUnlocked - lastUnlocked);
newOnes = [];
j = 0;
while (j < numUnlocked) {
newOnes.push(((lastUnlocked + j) + 1));
j = (j + 1);
};
newParts.push({category:i, items:newOnes});
};
i = (i + 1);
};
return (newParts);
}
}
}//package com.kid360.mlp
Section 5
//MLPPlayer (com.kid360.mlp.MLPPlayer)
package com.kid360.mlp {
import flash.display.*;
import flash.events.*;
public class MLPPlayer extends EventDispatcher {
public var playerName:String;// = "Guest"
private var dilemmas:Array;
private var unpreviewedParts:Array;
private var playerPoints:uint;// = 0
private var friendshipSparks:Array;
private var owner:MovieClip;
private var avatarSpec:Object;
private var curPanorama:int;// = -1
private var introViews:Array;
private var markedPonies:Array;
public static const instance:MLPPlayer = new MLPPlayer(SingletonLock);
;
public function MLPPlayer(_arg1:Class){
playerName = "Guest";
introViews = [false, false, false, false];
unpreviewedParts = [];
markedPonies = [];
dilemmas = [false, false, false, false, false, false, false, false, false, false, false];
curPanorama = -1;
friendshipSparks = [0, 0, 0, 0, 0];
playerPoints = 0;
super();
if (_arg1 != SingletonLock){
throw (new Error("Invalid access. Use MLPPlayer.instance."));
};
avatarSpec = new AvatarSpec();
}
public function appendMarkedPony(_arg1:Object):void{
markedPonies.push(_arg1);
}
public function get hasWon():Boolean{
var _local1:Number;
for each (_local1 in friendshipSparks) {
if (_local1 < 100){
return (false);
};
};
return (true);
}
public function get stats():Object{
var _local1:Object;
_local1 = {ponyLoc:curPanorama, sparks:friendshipSparks, totalScore:(game) ? game.score : playerPoints, avatar:avatarSpec, dilemmas:dilemmas, markedPonies:markedPonies, unpreviewed:unpreviewedParts, intros:introViews};
return (_local1);
}
public function set ponyLoc(_arg1:int):void{
curPanorama = _arg1;
}
public function set avatar(_arg1:Object):void{
avatarSpec = _arg1;
}
public function hasSeenIntro(_arg1:int):void{
introViews[_arg1] = true;
}
public function set stats(_arg1:Object):void{
curPanorama = _arg1.ponyLoc;
friendshipSparks = _arg1.sparks;
if (game){
game.score = _arg1.totalScore;
} else {
playerPoints = _arg1.totalScore;
};
avatarSpec = _arg1.avatar;
dilemmas = _arg1.dilemmas;
markedPonies = _arg1.markedPonies;
unpreviewedParts = _arg1.unpreviewed;
introViews = _arg1.intros;
}
public function dilemmaAvailable(_arg1:uint):Boolean{
return ((dilemmas[_arg1] == false));
}
public function reset():void{
curPanorama = MLPConstants.INVALID_LOC;
friendshipSparks = [0, 0, 0, 0, 0];
dilemmas = [false, false, false, false, false, false, false, false, false, false, false];
unpreviewedParts = [];
avatarSpec = new AvatarSpec();
game.infoArea.ponyName = avatarSpec.name;
game.infoArea.head = avatarSpec;
game.infoArea.setScore({totalScore:(game) ? game.score : playerPoints, sparks:[0, 0, 0, 0, 0]});
game.saveGameState();
}
public function get ponyLoc():int{
return (curPanorama);
}
public function maySkipIntro(_arg1:int):Boolean{
return (introViews[_arg1]);
}
public function get avatar():Object{
return (avatarSpec);
}
public function set unpreviewed(_arg1:Array):void{
unpreviewedParts = _arg1;
}
public function set game(_arg1:MovieClip):void{
owner = _arg1;
}
public function get unpreviewed():Array{
return (unpreviewedParts);
}
public function get game():MovieClip{
return (owner);
}
public function rememberDilemma(_arg1:uint):void{
dilemmas[_arg1] = true;
}
}
}//package com.kid360.mlp
class SingletonLock {
private function SingletonLock(){
}
}
Section 6
//Utils (com.kid360.Utils)
package com.kid360 {
import flash.geom.*;
import flash.display.*;
public class Utils {
public static function shuffleArray(_arg1:Array):Array{
return (randomSubset(_arg1.concat(), _arg1.length));
}
public static function traceObject(_arg1:Object, _arg2:int=0, _arg3:int=0, _arg4:Boolean=false){
var _local5:String;
var _local6:int;
var _local7:String;
if (_arg4){
trace("<traceObject>");
};
_local5 = "";
_local6 = 0;
while (_local6 < _arg3) {
_local5 = (_local5 + "\t");
_local6++;
};
trace((_local5 + _arg1));
for (_local7 in _arg1) {
trace((((((_local5 + _local7) + ":") + _arg1[_local7]) + ":") + typeof(_arg1[_local7])));
if ((((_arg2 > 0)) && ((((typeof(_arg1[_local7]) == "movieclip")) || ((typeof(_arg1[_local7]) == "object")))))){
traceObject(_arg1[_local7], (_arg2 - 1), (_arg3 + 1), true);
};
};
if (_arg4){
trace("</traceObject>");
};
}
public static function randomSubset(_arg1:Array, _arg2:int):Array{
var _local3:Array;
var _local4:int;
var _local5:Number;
_local3 = [];
_local4 = 0;
while (_local4 < _arg2) {
_local5 = randInRange(0, (_arg1.length - 1));
_local3.push(_arg1.splice(_local5, 1)[0]);
_local4++;
};
return (_local3);
}
public static function anyIndex(_arg1:Array):int{
return (randInRange(0, (_arg1.length - 1)));
}
public static function float2decimal(_arg1:Number, _arg2:uint):Number{
var _local3:Number;
var _local4:Number;
_local3 = Math.pow(10, Math.abs(_arg2));
_local4 = (Math.round((_arg1 * _local3)) / _local3);
return (_local4);
}
public static function arrayPopulation(_arg1:Array):uint{
var _local2:uint;
var _local3:uint;
_local3 = 0;
_local2 = 0;
while (_local2 < _arg1.length) {
if (_arg1[_local2]){
_local3++;
};
_local2++;
};
return (_local3);
}
public static function nearestMultiple(_arg1:Number, _arg2:uint):int{
var _local3:Number;
_local3 = Math.round((_arg1 / _arg2));
return ((_local3 * _arg2));
}
public static function nearestPoint(_arg1:Point, _arg2:uint):Point{
var _local3:Point;
_local3 = new Point();
_local3.x = nearestMultiple(_arg1.x, _arg2);
_local3.y = nearestMultiple(_arg1.y, _arg2);
return (_local3);
}
public static function randInRange(_arg1:Number, _arg2:Number):Number{
return ((_arg1 + Math.floor((Math.random() * ((_arg2 + 1) - _arg1)))));
}
public static function nearestLegalPoint(_arg1:Point, _arg2:Rectangle):Point{
var _local3:Point;
var _local4:Point;
var _local5:Number;
var _local6:String;
if (_arg2.containsPoint(_arg1)){
return (_arg1);
};
_local3 = new Point();
_local4 = new Point((_arg2.x + (_arg2.width / 2)), (_arg2.y + (_arg2.height / 2)));
_local5 = (-((_arg1.y - _local4.y)) / (_arg1.x - _local4.x));
if (_local5 == Number.POSITIVE_INFINITY){
_local3.x = _local4.x;
_local3.y = _arg2.top;
} else {
if (_local5 == Number.NEGATIVE_INFINITY){
_local3.x = _local4.x;
_local3.y = _arg2.bottom;
} else {
_local6 = Utils.nearestEdge(_arg1, _arg2);
switch (_local6){
case "topRight":
_local3.x = _arg2.right;
_local3.y = _arg2.top;
case "right":
_local3.x = _arg2.right;
_local3.y = (_local4.y + ((_arg2.width / 2) * -(_local5)));
break;
case "bottomRight":
_local3.x = _arg2.right;
_local3.y = _arg2.bottom;
case "bottom":
_local3.x = (_local4.x + (((_arg2.height / 2) * -1) / _local5));
_local3.y = _arg2.bottom;
break;
case "bottomLeft":
_local3.x = _arg2.left;
_local3.y = _arg2.bottom;
case "left":
_local3.x = _arg2.left;
_local3.y = (_local4.y + ((_arg2.width / 2) * _local5));
break;
case "topLeft":
_local3.x = _arg2.left;
_local3.y = _arg2.top;
case "top":
_local3.x = (_local4.x + (((_arg2.height / 2) * 1) / _local5));
_local3.y = _arg2.top;
break;
};
};
};
return (_local3);
}
public static function randPtInRect(_arg1:Rectangle):Point{
return (new Point(randInRange(_arg1.left, _arg1.right), randInRange(_arg1.top, _arg1.bottom)));
}
public static function tintObject(_arg1:DisplayObject, _arg2:uint):void{
var _local3:ColorTransform;
_local3 = new ColorTransform();
_local3.color = _arg2;
_arg1.transform.colorTransform = _local3;
}
public static function nearestEdge(_arg1:Point, _arg2:Rectangle):String{
var _local3:Point;
var _local4:Number;
var _local5:Number;
var _local6:String;
_local3 = new Point((_arg2.x + (_arg2.width / 2)), (_arg2.y + (_arg2.height / 2)));
_local4 = (-((_arg1.y - _local3.y)) / (_arg1.x - _local3.x));
_local5 = (_arg2.height / _arg2.width);
_local6 = "";
if (_arg1.x > _local3.x){
_local6 = "right";
if (_arg1.y < _local3.y){
if (_local4 == _local5){
_local6 = "topRight";
} else {
if (_local4 > _local5){
_local6 = "top";
} else {
_local6 = "right";
};
};
} else {
if (_arg1.y > _local3.y){
if (_local4 == -(_local5)){
_local6 = "bottomRight";
} else {
if (_local4 < -(_local5)){
_local6 = "bottom";
} else {
_local6 = "right";
};
};
};
};
} else {
if (_arg1.x < _local3.x){
_local6 = "left";
if (_arg1.y < _local3.y){
if (_local4 == -(_local5)){
_local6 = "topLeft";
} else {
if (_local4 < -(_local5)){
_local6 = "top";
} else {
_local6 = "left";
};
};
} else {
if (_arg1.y > _local3.y){
if (_local4 == _local5){
_local6 = "bottomLeft";
} else {
if (_local4 > _local5){
_local6 = "bottom";
} else {
_local6 = "left";
};
};
};
};
};
};
return (_local6);
}
public static function firstEmptyIndex(_arg1:Array):int{
var _local2:int;
_local2 = 0;
while (_local2 < _arg1.length) {
if (!_arg1[_local2]){
return (_local2);
};
_local2++;
};
return (-1);
}
}
}//package com.kid360
Section 7
//caption_5 (MetaIntro_fla.caption_5)
package MetaIntro_fla {
import flash.display.*;
import flash.text.*;
public dynamic class caption_5 extends MovieClip {
public var selectedLanguage:String;
public var caption:TextField;
public function caption_5(){
addFrameScript(0, frame1);
}
public function stringsDidLoad():void{
updateStrings();
}
function frame1(){
caption.wordWrap = true;
caption.autoSize = "center";
selectedLanguage = "en_US";
StringsManager.loadText("strings.xml", this, stringsDidLoad);
}
public function updateStrings():void{
caption.text = StringsManager.getString("metaIntro", "page1", selectedLanguage);
}
}
}//package MetaIntro_fla
Section 8
//caption2_8 (MetaIntro_fla.caption2_8)
package MetaIntro_fla {
import flash.display.*;
import flash.text.*;
public dynamic class caption2_8 extends MovieClip {
public var selectedLanguage:String;
public var caption:TextField;
public function caption2_8(){
addFrameScript(0, frame1);
}
public function stringsDidLoad():void{
updateStrings();
}
function frame1(){
caption.wordWrap = true;
caption.autoSize = "center";
selectedLanguage = "en_US";
StringsManager.loadText("strings.xml", this, stringsDidLoad);
}
public function updateStrings():void{
caption.text = StringsManager.getString("metaIntro", "page2", selectedLanguage);
}
}
}//package MetaIntro_fla
Section 9
//caption3_9 (MetaIntro_fla.caption3_9)
package MetaIntro_fla {
import flash.display.*;
import flash.text.*;
public dynamic class caption3_9 extends MovieClip {
public var selectedLanguage:String;
public var caption:TextField;
public function caption3_9(){
addFrameScript(0, frame1);
}
public function stringsDidLoad():void{
updateStrings();
}
function frame1(){
caption.wordWrap = true;
caption.autoSize = "center";
selectedLanguage = "en_US";
StringsManager.loadText("strings.xml", this, stringsDidLoad);
}
public function updateStrings():void{
caption.text = StringsManager.getString("metaIntro", "page3", selectedLanguage);
}
}
}//package MetaIntro_fla
Section 10
//caption4_14 (MetaIntro_fla.caption4_14)
package MetaIntro_fla {
import flash.display.*;
import flash.text.*;
public dynamic class caption4_14 extends MovieClip {
public var selectedLanguage:String;
public var caption:TextField;
public function caption4_14(){
addFrameScript(0, frame1);
}
public function stringsDidLoad():void{
updateStrings();
}
function frame1(){
caption.wordWrap = true;
caption.autoSize = "center";
selectedLanguage = "en_US";
StringsManager.loadText("strings.xml", this, stringsDidLoad);
}
public function updateStrings():void{
caption.text = StringsManager.getString("metaIntro", "page4", selectedLanguage);
}
}
}//package MetaIntro_fla
Section 11
//caption5_47 (MetaIntro_fla.caption5_47)
package MetaIntro_fla {
import flash.display.*;
import flash.text.*;
public dynamic class caption5_47 extends MovieClip {
public var selectedLanguage:String;
public var caption:TextField;
public function caption5_47(){
addFrameScript(0, frame1);
}
public function stringsDidLoad():void{
updateStrings();
}
function frame1(){
caption.wordWrap = true;
caption.autoSize = "center";
selectedLanguage = "en_US";
StringsManager.loadText("strings.xml", this, stringsDidLoad);
}
public function updateStrings():void{
caption.text = StringsManager.getString("metaIntro", "page5", selectedLanguage);
}
}
}//package MetaIntro_fla
Section 12
//caption6_50 (MetaIntro_fla.caption6_50)
package MetaIntro_fla {
import flash.display.*;
import flash.text.*;
public dynamic class caption6_50 extends MovieClip {
public var selectedLanguage:String;
public var caption:TextField;
public function caption6_50(){
addFrameScript(0, frame1);
}
public function stringsDidLoad():void{
updateStrings();
}
function frame1(){
caption.wordWrap = true;
caption.autoSize = "center";
selectedLanguage = "en_US";
StringsManager.loadText("strings.xml", this, stringsDidLoad);
}
public function updateStrings():void{
caption.text = StringsManager.getString("metaIntro", "page6", selectedLanguage);
}
}
}//package MetaIntro_fla
Section 13
//goBtnBegin_51 (MetaIntro_fla.goBtnBegin_51)
package MetaIntro_fla {
import flash.display.*;
import flash.events.*;
public dynamic class goBtnBegin_51 extends MovieClip {
public function goBtnBegin_51(){
addFrameScript(0, frame1);
}
public function onPressed(_arg1:MouseEvent):void{
gotoAndStop("down");
}
function frame1(){
stop();
buttonMode = true;
mouseChildren = false;
trace("beginbtn");
addEventListener(MouseEvent.MOUSE_OVER, onRolled);
addEventListener(MouseEvent.MOUSE_OUT, onRolledOut);
addEventListener(MouseEvent.MOUSE_DOWN, onPressed);
addEventListener(MouseEvent.CLICK, onClick);
gotoAndStop("up");
}
public function onRolled(_arg1:MouseEvent):void{
gotoAndStop("over");
}
public function onRolledOut(_arg1:MouseEvent):void{
gotoAndStop("up");
}
public function onClick(_arg1:MouseEvent):void{
removeEventListener(MouseEvent.CLICK, onClick);
(parent as MovieClip).play();
}
}
}//package MetaIntro_fla
Section 14
//goBtnShape_3 (MetaIntro_fla.goBtnShape_3)
package MetaIntro_fla {
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class goBtnShape_3 extends MovieClip {
public function goBtnShape_3(){
addFrameScript(0, frame1, 1, frame2);
}
public function onPressed(_arg1:MouseEvent):void{
gotoAndStop("down");
}
function frame1(){
buttonMode = true;
addEventListener(MouseEvent.MOUSE_OVER, onRolled);
addEventListener(MouseEvent.MOUSE_OUT, onRolledOut);
addEventListener(MouseEvent.MOUSE_DOWN, onPressed);
addEventListener(MouseEvent.CLICK, onClick);
}
function frame2(){
stop();
}
public function onRolled(_arg1:MouseEvent):void{
gotoAndStop("over");
}
public function onRolledOut(_arg1:MouseEvent):void{
gotoAndStop("up");
}
public function onClick(_arg1:MouseEvent):void{
removeEventListener(MouseEvent.CLICK, onClick);
(parent as MovieClip).loadingDone();
}
}
}//package MetaIntro_fla
Section 15
//rainbow_1 (MetaIntro_fla.rainbow_1)
package MetaIntro_fla {
import flash.display.*;
public dynamic class rainbow_1 extends MovieClip {
public var bar:MovieClip;
}
}//package MetaIntro_fla
Section 16
//StringsManager (StringsManager)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class StringsManager extends EventDispatcher {
public static const CANONICAL_SUBTAG_SEPARATOR:String = "-";
public static const DEFAULT_LANGUAGE_TAG:String = ((DEFAULT_LANGUAGE + CANONICAL_SUBTAG_SEPARATOR) + DEFAULT_REGION);
public static const DEFAULT_REGION:String = "US";
public static const DEFAULT_LANGUAGE:String = "en";
private static var textloader:URLLoader;
private static var callback:Function;
private static var owner:DisplayObject;
public static var i18n:XML;
public static function getString(_arg1:String, _arg2:String, _arg3:String=""):String{
if (_arg3 == ""){
_arg3 = StringsManager.DEFAULT_LANGUAGE_TAG;
};
return (StringsManager.findBestString(_arg1, _arg2, StringsManager.canonicalize(_arg3)));
}
private static function canonicalize(_arg1:String):String{
return (_arg1.replace(/_/g, CANONICAL_SUBTAG_SEPARATOR));
}
private static function doCallback():void{
if (((!((StringsManager.owner == null))) && (!((StringsManager.callback == null))))){
var _local2 = StringsManager.owner;
with (_local2) {
StringsManager.callback();
};
};
}
private static function findBestString(_arg1:String, _arg2:String, _arg3:String):String{
var translations:XMLList;
var s:String;
var separatorPos:int;
var regionTag:String;
var t:XML;
var screenID = _arg1;
var blockID = _arg2;
var languageTag = _arg3;
translations = i18n.screen.(@id == screenID).block.(@id == blockID).text;
s = translations.(@lang == languageTag);
if (s == ""){
separatorPos = languageTag.indexOf(CANONICAL_SUBTAG_SEPARATOR);
if (separatorPos > 1){
regionTag = languageTag.substr(-((separatorPos + 1)));
languageTag = languageTag.substring(0, separatorPos);
s = translations.(@lang == languageTag);
if (s == ""){
for each (t in translations) {
if (t.@lang.indexOf(languageTag) == 0){
s = t;
};
};
};
};
};
if (s == ""){
languageTag = DEFAULT_LANGUAGE_TAG;
s = translations.(@lang == languageTag);
};
if (s == ""){
languageTag = "en";
s = translations.(@lang == languageTag);
};
if (s == ""){
s = "???";
};
return (s);
}
private static function onTextLoaded(_arg1:Event):void{
StringsManager.i18n = new XML(StringsManager.canonicalize(_arg1.target.data));
doCallback();
}
public static function loadText(_arg1:String, _arg2:DisplayObject=null, _arg3:Function=null):void{
StringsManager.owner = _arg2;
StringsManager.callback = _arg3;
if (StringsManager.i18n){
doCallback();
} else {
StringsManager.textloader = new URLLoader(new URLRequest(_arg1));
StringsManager.textloader.addEventListener(Event.COMPLETE, StringsManager.onTextLoaded, false, 0, true);
};
}
}
}//package