Section 1
//preloader (game.Documents.preloader)
package game.Documents {
import flash.display.*;
import game.engine.bitmap.*;
import flash.events.*;
import flash.text.*;
public class preloader extends MovieClip {
public var dur:int;
public var sunChange:SimpleButton;
public var creditClick:SimpleButton;
public var fadeLapse:int;
public var sky:Array;
public var i;
public var ti:int;
private var tl:TextField;
public var fade:int;
private var l:TextField;
public var ground:MovieClip;
public var current:int;
public var timeLapse:int;
public var tree:BitmapRecorder;
public var creditMovie:MovieClip;
private var t:TextField;
public var treeChange:SimpleButton;
public static var _root:MovieClip;
public function preloader(){
var onRootLoaderComplete:Function;
super();
onRootLoaderComplete = function (_arg1:Event):void{
_root.gotoAndStop("Begin");
};
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
this.loaderInfo.addEventListener(Event.COMPLETE, onRootLoaderComplete);
_root = this;
}
public function clearAll():void{
while (numChildren > 0) {
removeChild(getChildAt(0));
};
}
public function addInOrder():void{
addChild(sky[current]);
addChild(tree);
addChild(ground);
addChild(treeChange);
addChild(sunChange);
addChild(creditClick);
addChild(creditMovie);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
sky = new Array();
sky[0] = EffectData.retrieve("NormalClouds");
sky[1] = EffectData.retrieve("SunsetClouds");
sky[2] = EffectData.retrieve("NightClouds");
sky[3] = EffectData.retrieve("DawnClouds");
tree = EffectData.retrieve("SwayingTree");
tree.play();
tree.x = (400 - (tree.width / 2));
tree.y = ((600 - tree.height) + 100);
i = 0;
while (i < sky.length) {
sky[i].play();
sky[i].width = 950;
sky[i].height = 750;
sky[i].x = 0;
sky[i].y = 0;
i++;
};
current = 0;
removeChild(ground);
addInOrder();
creditClick.addEventListener(MouseEvent.CLICK, playCredit);
sunChange.addEventListener(MouseEvent.CLICK, changeTime);
treeChange.addEventListener(MouseEvent.CLICK, changeTree);
addEventListener(Event.ENTER_FRAME, main);
timeLapse = 0;
fade = 100;
fadeLapse = 0;
dur = 700;
}
public function changeTree(_arg1:MouseEvent):void{
var _local2:SwayingTreeID;
var _local3:*;
_local2 = new SwayingTreeID();
_local3 = 0;
while (_local3 < _local2.getNumF()) {
_local2.main(new Event("a"));
_local3++;
};
removeChild(tree);
tree = EffectData.retrieve("SwayingTree");
tree.play();
tree.x = (400 - (tree.width / 2));
tree.y = ((600 - tree.height) + 100);
clearAll();
addInOrder();
}
public function changeTime(_arg1:MouseEvent):void{
timeLapse = (dur + 1);
}
public function playCredit(_arg1:MouseEvent):void{
creditMovie.play();
}
public function main(_arg1:Event):void{
tree.play();
sky[current].play();
timeLapse++;
if (timeLapse > dur){
if (fadeLapse > fade){
timeLapse = 0;
fadeLapse = 0;
} else {
if (fadeLapse > (fade / 2)){
fadeLapse++;
sky[current].alpha = ((1 / (fade / 2)) * (fadeLapse - (fade / 2)));
} else {
fadeLapse++;
sky[current].alpha = (1 - ((1 / (fade / 2)) * fadeLapse));
if (fadeLapse > (fade / 2)){
sky[current].alpha = 1;
clearAll();
current++;
if (current >= sky.length){
current = 0;
};
sky[current].alpha = 0;
addInOrder();
};
};
};
};
}
public function go(_arg1:Event):void{
ti++;
if (ti > 130){
nextFrame();
removeEventListener(Event.ENTER_FRAME, go);
};
}
function frame2(){
stop();
addEventListener(Event.ENTER_FRAME, go);
ti = 0;
}
}
}//package game.Documents
Section 2
//AlphaMap (game.engine.bitmap.AlphaMap)
package game.engine.bitmap {
import flash.display.*;
public class AlphaMap {
public function AlphaMap():void{
throw (new Error("Static class"));
}
public static function threshhold(_arg1:uint, _arg2:BitmapData, _arg3:Boolean=true):void{
var _local4:Boolean;
var _local5:*;
var _local6:*;
var _local7:uint;
var _local8:uint;
_arg2.lock();
_local4 = true;
if (_arg3){
_local5 = 0;
while (_local5 < _arg2.width) {
_local6 = 0;
while (_local6 < _arg2.height) {
_local7 = (_arg2.getPixel32(_local5, _local6) >>> 24);
if (_local7 < _arg1){
_local8 = _arg2.getPixel32(_local5, _local6);
_arg2.setPixel32(_local5, _local6, (_local8 & 0xFFFFFF));
};
_local6++;
};
_local5++;
};
} else {
_local5 = 0;
while (_local5 < _arg2.width) {
_local6 = 0;
while (_local6 < _arg2.height) {
_local7 = (_arg2.getPixel32(_local5, _local6) >>> 24);
if (_local7 < _arg1){
_arg2.setPixel32(_local5, _local6, (_arg2.getPixel32(_local5, _local6) & 0xFFFFFF));
};
_local6++;
};
_local5++;
};
};
_arg2.unlock();
}
public static function map(_arg1:BitmapData, _arg2:BitmapData, _arg3:Boolean=false, _arg4:uint=0):BitmapData{
var _local5:BitmapData;
var _local6:*;
var _local7:*;
var _local8:uint;
_local5 = _arg1.clone();
if (!_arg3){
_arg2.lock();
if ((((_arg1.width < _arg2.width)) && ((_arg1.height < _arg2.height)))){
_local6 = 0;
while (_local6 < _arg1.width) {
_local7 = 0;
while (_local7 < _arg1.height) {
_local8 = (_arg1.getPixel(_local6, _local7) >> 16);
if (_local8 > _arg4){
_arg2.setPixel32(_local6, _local7, ((_arg2.getPixel32(_local6, _local7) & 0xFFFFFF) + (_local8 << 24)));
} else {
_arg2.setPixel32(_local6, _local7, (_arg2.getPixel32(_local6, _local7) & 0xFFFFFF));
};
_local7++;
};
_local6++;
};
} else {
if (_arg1.width < _arg2.width){
_local6 = 0;
while (_local6 < _arg1.width) {
_local7 = 0;
while (_local7 < _arg2.height) {
_local8 = (_arg1.getPixel(_local6, _local7) >> 16);
if (_local8 > _arg4){
_arg2.setPixel32(_local6, _local7, ((_arg2.getPixel32(_local6, _local7) & 0xFFFFFF) + (_local8 << 24)));
} else {
_arg2.setPixel32(_local6, _local7, (_arg2.getPixel32(_local6, _local7) & 0xFFFFFF));
};
_local7++;
};
_local6++;
};
} else {
if (_arg1.height < _arg2.height){
_local6 = 0;
while (_local6 < _arg2.width) {
_local7 = 0;
while (_local7 < _arg1.height) {
_local8 = (_arg1.getPixel(_local6, _local7) >> 16);
if (_local8 > _arg4){
_arg2.setPixel32(_local6, _local7, ((_arg2.getPixel32(_local6, _local7) & 0xFFFFFF) + (_local8 << 24)));
} else {
_arg2.setPixel32(_local6, _local7, (_arg2.getPixel32(_local6, _local7) & 0xFFFFFF));
};
_local7++;
};
_local6++;
};
} else {
_local6 = 0;
while (_local6 < _arg2.width) {
_local7 = 0;
while (_local7 < _arg2.height) {
_local8 = (_arg1.getPixel(_local6, _local7) >> 16);
if (_local8 > _arg4){
_arg2.setPixel32(_local6, _local7, ((_arg2.getPixel32(_local6, _local7) & 0xFFFFFF) + (_local8 << 24)));
} else {
_arg2.setPixel32(_local6, _local7, (_arg2.getPixel32(_local6, _local7) & 0xFFFFFF));
};
_local7++;
};
_local6++;
};
};
};
};
_arg2.unlock();
} else {
_arg2.lock();
if ((((_arg1.width < _arg2.width)) && ((_arg1.height < _arg2.height)))){
_local6 = 0;
while (_local6 < _arg1.width) {
_local7 = 0;
while (_local7 < _arg1.height) {
_local8 = (_arg1.getPixel(_local6, _local7) >> 16);
if (_local8 > _arg4){
_arg2.setPixel32(_local6, _local7, ((_arg2.getPixel32(_local6, _local7) & 0xFFFFFF) + (4278190080 - (_local8 << 24))));
} else {
_arg2.setPixel32(_local6, _local7, (_arg2.getPixel32(_local6, _local7) & 0xFFFFFF));
};
_local7++;
};
_local6++;
};
} else {
if (_arg1.width < _arg2.width){
_local6 = 0;
while (_local6 < _arg1.width) {
_local7 = 0;
while (_local7 < _arg2.height) {
_local8 = (_arg1.getPixel(_local6, _local7) >> 16);
if (_local8 > _arg4){
_arg2.setPixel32(_local6, _local7, ((_arg2.getPixel32(_local6, _local7) & 0xFFFFFF) + (4278190080 - (_local8 << 24))));
} else {
_arg2.setPixel32(_local6, _local7, (_arg2.getPixel32(_local6, _local7) & 0xFFFFFF));
};
_local7++;
};
_local6++;
};
} else {
if (_arg1.height < _arg2.height){
_local6 = 0;
while (_local6 < _arg2.width) {
_local7 = 0;
while (_local7 < _arg1.height) {
_local8 = (_arg1.getPixel(_local6, _local7) >> 16);
if (_local8 > _arg4){
_arg2.setPixel32(_local6, _local7, ((_arg2.getPixel32(_local6, _local7) & 0xFFFFFF) + (4278190080 - (_local8 << 24))));
} else {
_arg2.setPixel32(_local6, _local7, (_arg2.getPixel32(_local6, _local7) & 0xFFFFFF));
};
_local7++;
};
_local6++;
};
} else {
_local6 = 0;
while (_local6 < _arg2.width) {
_local7 = 0;
while (_local7 < _arg2.height) {
_local8 = (_arg1.getPixel(_local6, _local7) >> 16);
if (_local8 > _arg4){
_arg2.setPixel32(_local6, _local7, ((_arg2.getPixel32(_local6, _local7) & 0xFFFFFF) + (4278190080 - (_local8 << 24))));
} else {
_arg2.setPixel32(_local6, _local7, (_arg2.getPixel32(_local6, _local7) & 0xFFFFFF));
};
_local7++;
};
_local6++;
};
};
};
};
_arg2.unlock();
};
return (_local5);
}
}
}//package game.engine.bitmap
Section 3
//BitmapRecorder (game.engine.bitmap.BitmapRecorder)
package game.engine.bitmap {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class BitmapRecorder extends Sprite {
private var maxFrames:int;// = 0
private var records:Array;
private var index:int;// = 0
public static var FULL:String = "full";
public function BitmapRecorder(_arg1:int=100):void{
index = 0;
records = new Array();
maxFrames = 0;
super();
maxFrames = _arg1;
}
public function play():void{
index++;
if (index >= records.length){
index = 0;
};
removePrevious();
addChild(records[index]);
}
public function goto(_arg1:int):void{
if (contains(records[index])){
removeChild(records[index]);
};
if ((((_arg1 >= 0)) && ((_arg1 < records.length)))){
index = _arg1;
};
addChild(records[index]);
}
public function record(_arg1:DisplayObject, _arg2:int=-1, _arg3:int=-1, _arg4:int=-1, _arg5:int=-1):void{
var _local6:BitmapData;
var _local7:Matrix;
var _local8:Rectangle;
if (records.length < maxFrames){
if ((((((((_arg2 == -1)) || ((_arg3 == -1)))) || ((_arg4 == -1)))) || ((_arg5 == -1)))){
_local6 = new BitmapData(_arg1.width, _arg1.height, true, 0);
_local7 = new Matrix();
_local8 = _arg1.getBounds(_arg1);
_local7.translate(-(_local8.x), -(_local8.y));
_local7.scale(0.9, 0.9);
_local6.lock();
_local6.draw(_arg1, _local7, null, null, null, true);
_local6.unlock();
} else {
_local6 = new BitmapData(_arg2, _arg3, true, 0);
_local7 = new Matrix();
_local7.translate(_arg4, _arg5);
_local7.scale(0.9, 0.9);
_local6.lock();
_local6.draw(_arg1, _local7, null, null, null, true);
_local6.unlock();
};
records.push(new Bitmap(_local6));
if (records.length == maxFrames){
_local8 = _arg1.getBounds(_arg1);
x = _local8.x;
y = _local8.y;
scaleX = (scaleX + 0.1);
scaleY = (scaleY + 0.1);
dispatchEvent(new Event(BitmapRecorder.FULL));
};
} else {
dispatchEvent(new Event(BitmapRecorder.FULL));
};
}
public function copy(_arg1:BitmapRecorder):void{
var _local2:Array;
var _local3:*;
_local2 = _arg1.getFrames();
records = new Array();
maxFrames = _local2.length;
index = 0;
_local3 = 0;
while (_local3 < _local2.length) {
records[_local3] = new Bitmap(_local2[_local3].bitmapData);
_local3++;
};
}
private function removePrevious():void{
if (index == 0){
if (contains(records[(records.length - 1)])){
removeChild(records[(records.length - 1)]);
};
} else {
if (contains(records[(index - 1)])){
removeChild(records[(index - 1)]);
};
};
}
public function getFrames():Array{
return (records);
}
public function getNumberFrames():int{
return (records.length);
}
}
}//package game.engine.bitmap
Section 4
//EffectData (game.engine.bitmap.EffectData)
package game.engine.bitmap {
public class EffectData {
private static var records:Array = new Array();
private static var names:Array = new Array();
public function EffectData():void{
throw (new Error("Static type class"));
}
public static function store(_arg1:BitmapRecorder, _arg2:String){
var _local3:Boolean;
var _local4:int;
var _local5:*;
var _local6:BitmapRecorder;
_local3 = false;
_local4 = 0;
_local5 = 0;
while (_local5 < records.length) {
if (names[_local5] == _arg2){
_local3 = true;
_local4 = _local5;
};
_local5++;
};
_local6 = new BitmapRecorder();
_local6.copy(_arg1);
if (!_local3){
records.push(_local6);
names.push(_arg2);
} else {
records[_local4] = _local6;
};
}
public static function retrieve(_arg1:String):BitmapRecorder{
var _local2:BitmapRecorder;
var _local3:*;
_local2 = new BitmapRecorder();
_local3 = 0;
while (_local3 < records.length) {
if (names[_local3] == _arg1){
_local2.copy(records[_local3]);
_local3 = records.length;
};
_local3++;
};
return (_local2);
}
}
}//package game.engine.bitmap
Section 5
//branch (game.engine.effectAids.branch)
package game.engine.effectAids {
import flash.display.*;
public class branch extends Sprite {
public var startR:Number;// = 0
public var C:Array;
public var L:Number;// = 0
public var P:branch;
public var S:Number;// = 0
var t:Number;// = 0
public function branch(_arg1:branch):void{
C = new Array();
S = 0;
L = 0;
startR = 0;
t = 0;
super();
P = _arg1;
if (P != null){
S = (P.S / 2);
L = (P.L / (Math.random() + 1.3));
graphics.lineStyle(S, 0);
graphics.moveTo(0, 0);
graphics.lineTo(0, -(L));
rotation = ((Math.random() * 70) - 35);
y = -(P.L);
} else {
S = 10;
L = 200;
graphics.lineStyle(S, 0);
graphics.moveTo(0, 0);
graphics.lineTo(0, -(L));
};
if ((((L > 20)) && ((getRow() < 4)))){
makeChildren();
};
startR = rotation;
}
public function makeChildren():void{
var _local1:int;
var _local2:*;
var _local3:Number;
_local1 = (Math.floor((Math.random() * 4)) + 4);
_local2 = 0;
while (_local2 < _local1) {
C.push(new branch(this));
addChild(C[(C.length - 1)]);
_local2++;
};
_local3 = 0;
while ((((_local3 > 10)) && ((_local3 < -10)))) {
_local3 = 0;
_local2 = 0;
while (_local2 < C.length) {
_local3 = (_local3 + C[_local2].rotation);
_local2++;
};
C.push(new branch(this));
addChild(C[(C.length - 1)]);
};
}
public function getTotalLength():Number{
var _local1:Number;
var _local2:branch;
_local1 = 0;
_local2 = this;
while (_local2.P != null) {
_local1 = (_local1 + _local2.L);
_local2 = _local2.P;
};
return (_local1);
}
public function setR(_arg1:Number):void{
rotation = _arg1;
}
public function getRow():int{
var _local1:int;
var _local2:branch;
_local1 = 0;
_local2 = this;
while (_local2.P != null) {
_local1++;
_local2 = _local2.P;
};
return (_local1);
}
public function sway():void{
var _local1:*;
rotation = (Math.sin(t) + startR);
t = (t + (Math.PI / 20));
_local1 = 0;
while (_local1 < C.length) {
C[_local1].sway();
_local1++;
};
}
}
}//package game.engine.effectAids
Section 6
//Animation1_4 (TreeAndSky_fla.Animation1_4)
package TreeAndSky_fla {
import flash.display.*;
public dynamic class Animation1_4 extends MovieClip {
public function Animation1_4(){
addFrameScript(69, frame70);
}
function frame70(){
stop();
}
}
}//package TreeAndSky_fla
Section 7
//CreditMovie_11 (TreeAndSky_fla.CreditMovie_11)
package TreeAndSky_fla {
import flash.display.*;
public dynamic class CreditMovie_11 extends MovieClip {
public function CreditMovie_11(){
addFrameScript(0, frame1, 34, frame35);
}
function frame1(){
stop();
}
function frame35(){
stop();
}
}
}//package TreeAndSky_fla
Section 8
//CreditSub_12 (TreeAndSky_fla.CreditSub_12)
package TreeAndSky_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class CreditSub_12 extends MovieClip {
public var b:SimpleButton;
public function CreditSub_12(){
addFrameScript(0, frame1);
}
public function goto(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.myspace.com/carolinemturner"));
}
function frame1(){
b.addEventListener(MouseEvent.CLICK, goto);
}
}
}//package TreeAndSky_fla
Section 9
//DinidenBuffer_1 (TreeAndSky_fla.DinidenBuffer_1)
package TreeAndSky_fla {
import flash.display.*;
public dynamic class DinidenBuffer_1 extends MovieClip {
public function DinidenBuffer_1(){
addFrameScript(104, frame105);
}
function frame105(){
stop();
}
}
}//package TreeAndSky_fla
Section 10
//EffectLoader_6 (TreeAndSky_fla.EffectLoader_6)
package TreeAndSky_fla {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
import flash.geom.*;
import flash.text.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.media.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class EffectLoader_6 extends MovieClip {
public var count:int;
public var E:Array;
public var totFrames:Number;
public var frame:int;
public var Display:TextField;
public function EffectLoader_6(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
E = new Array();
E[0] = new NightCloudsID();
E[1] = new NormalCloudsID();
E[2] = new SunsetCloudsID();
E[3] = new SwayingTreeID();
E[4] = new DawnCloudsID();
totFrames = 0;
addEventListener(Event.ENTER_FRAME, main);
count = 0;
frame = 0;
}
public function main(_arg1:Event):void{
var _local2:Boolean;
var _local3:*;
var _local4:int;
var _local5:*;
_local2 = false;
if (count < E.length){
_local3 = frame;
while (_local3 < E[count].getNumF()) {
E[count].main(new Event("HEY"));
if ((((_local3 >= (frame + 5))) || ((_local3 >= (E[count].getNumF() - 1))))){
frame = _local3;
_local3 = E[count].getNumF();
};
_local3++;
};
if (frame < (E[count].getNumF() - 1)){
_local2 = true;
_local4 = 0;
_local3 = 0;
while (_local3 < count) {
_local4 = (_local4 + E[_local3].getNumF());
_local3++;
};
totFrames = 0;
_local5 = 0;
while (_local5 < E.length) {
totFrames = (totFrames + E[_local5].getNumF());
_local5++;
};
_local4 = (_local4 + frame);
};
Display.text = Math.floor(((_local4 / totFrames) * 100)).toString();
} else {
trace("COMPLETE", count, totFrames);
removeEventListener(Event.ENTER_FRAME, main);
MovieClip(parent).nextFrame();
};
if (!_local2){
frame = 0;
count++;
};
}
}
}//package TreeAndSky_fla
Section 11
//Full_2 (TreeAndSky_fla.Full_2)
package TreeAndSky_fla {
import flash.display.*;
public dynamic class Full_2 extends MovieClip {
public function Full_2(){
addFrameScript(104, frame105);
}
function frame105(){
stop();
}
}
}//package TreeAndSky_fla
Section 12
//DawnCloudsID (DawnCloudsID)
package {
import flash.display.*;
import game.engine.bitmap.*;
import flash.events.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class DawnCloudsID extends MovieClip {
public var bitm:Bitmap;
public var bit:BitmapData;
public var yp:Number;
public var dense:Number;
public var grad:BitmapData;
public var i;
public var dmap:DisplacementMapFilter;
public var ch:int;
public var done:Boolean;
public var s:Number;
public var numF:int;
public var mat:Matrix;
public var merger:Number;
public var cor:Number;
public var bit2:BitmapData;
public var recorder:BitmapRecorder;
public var gradM:Sprite;
public var bitM:BitmapData;
public var bitN:BitmapData;
public var bitf:BitmapData;
public var xp:Number;
public function DawnCloudsID(){
addFrameScript(0, frame1);
}
function frame1(){
bit = new BitmapData(400, 400);
bit2 = new BitmapData(bit.width, bit.height);
bitf = new BitmapData(bit.width, bit.height, true, 4278190080);
grad = new BitmapData(bit.width, bit.height);
gradM = new Sprite();
mat = new Matrix();
mat.createGradientBox(bit.width, bit.height, (Math.PI / 2), 0, (bit.width / 2));
gradM.graphics.beginGradientFill(GradientType.LINEAR, [51, 39423], [1, 1], [0, 100], mat);
gradM.graphics.lineTo(bit.width, 0);
gradM.graphics.lineTo(bit.width, bit.height);
gradM.graphics.lineTo(0, bit.height);
gradM.graphics.lineTo(0, 0);
gradM.graphics.endFill();
i = 0;
while (i < 500) {
xp = (Math.random() * bit.width);
yp = (Math.random() * bit.height);
s = (Math.random() * 3);
mat.createGradientBox(s, s, 0, xp, yp);
gradM.graphics.beginGradientFill(GradientType.RADIAL, [0xFFFFFF, 0xFFFFFF, 0xFFFFFF], [1, 0.5, 0], [0, 127, 0xFF], mat);
gradM.graphics.drawCircle(xp, yp, s);
i++;
};
gradM.graphics.endFill();
grad.draw(gradM);
addChild(new Bitmap(grad));
bitm = new Bitmap(bitf, "auto", true);
addChild(bitm);
addEventListener(Event.ENTER_FRAME, main);
dense = 0;
ch = 0;
dmap = new DisplacementMapFilter(bit, new Point(0, 0), 1, 1, 50, 50, "color");
numF = 100;
recorder = new BitmapRecorder(numF);
done = false;
recorder.addEventListener(BitmapRecorder.FULL, filledRecording);
bitM = new BitmapData(bit.width, bit.height, true, 4294967295);
bitM.perlinNoise(2000, 30, 2, 3, false, true, 1, true);
bitN = new BitmapData(bit.width, bit.height, true, 4294967295);
AlphaMap.map(bitM, bitN, false, 160);
grad.merge(bitN, new Rectangle(0, 0, bit.width, bit.height), new Point(0, 0), 10, 10, 10, 1);
merger = 0xFF;
cor = 0;
}
public function filledRecording(_arg1:Event):void{
while (numChildren > 0) {
removeChild(getChildAt(0));
};
EffectData.store(recorder, "DawnClouds");
addChild(recorder);
recorder.play();
done = true;
x = -150;
scaleX = (scaleY = 1);
width = 1000;
height = 750;
}
public function main(_arg1:Event):void{
if (!done){
ch = (ch + 1);
if (ch <= (numF / 4)){
merger = (merger - (0xFF / (numF / 4)));
cor = 0;
} else {
if (ch >= (numF - (numF / 4))){
merger = (merger + (0xFF / (numF / 4)));
cor = numF;
};
};
bit.lock();
bit.perlinNoise(100, 30, 2, 3, false, true, 1, true, [new Point((ch * 2), ch), new Point(ch, -(ch)), new Point(ch, (ch * 2))]);
bit2.perlinNoise(100, 30, 2, 10, false, true, 1, true, [new Point(((ch - cor) * 3), (ch - cor)), new Point(((ch - cor) * 2), ((ch - cor) * 2)), new Point((ch - cor), ((ch - cor) * 3))]);
bit.merge(bit2, new Rectangle(0, 0, bit.width, bit.height), new Point(0, 0), merger, merger, merger, 1);
bit.unlock();
AlphaMap.map(bit, bitf);
recorder.record(this);
} else {
recorder.play();
};
}
public function getNumF():int{
return (numF);
}
}
}//package
Section 13
//NightCloudsID (NightCloudsID)
package {
import flash.display.*;
import game.engine.bitmap.*;
import flash.events.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class NightCloudsID extends MovieClip {
public var bitm:Bitmap;
public var bit:BitmapData;
public var yp:Number;
public var dense:Number;
public var grad:BitmapData;
public var i;
public var dmap:DisplacementMapFilter;
public var ch:int;
public var done:Boolean;
public var s:Number;
public var numF:int;
public var mat:Matrix;
public var merger:Number;
public var cor:Number;
public var bit2:BitmapData;
public var recorder:BitmapRecorder;
public var gradM:Sprite;
public var bitM:BitmapData;
public var bitN:BitmapData;
public var bitf:BitmapData;
public var xp:Number;
public function NightCloudsID(){
addFrameScript(0, frame1);
}
function frame1(){
bit = new BitmapData(500, 500);
bit2 = new BitmapData(bit.width, bit.height);
bitf = new BitmapData(bit.width, bit.height, true, 4278190080);
grad = new BitmapData(bit.width, bit.height);
gradM = new Sprite();
mat = new Matrix();
mat.createGradientBox(bit.width, bit.height, (Math.PI / 2), 0, (bit.width / 2));
gradM.graphics.beginGradientFill(GradientType.RADIAL, [102, 102, 0], [1, 1, 1], [0, 127, 0xFF], mat);
gradM.graphics.lineTo(bit.width, 0);
gradM.graphics.lineTo(bit.width, bit.height);
gradM.graphics.lineTo(0, bit.height);
gradM.graphics.lineTo(0, 0);
gradM.graphics.endFill();
i = 0;
while (i < 500) {
xp = (Math.random() * bit.width);
yp = (Math.random() * bit.height);
s = (Math.random() * 3);
mat.createGradientBox(s, s, 0, xp, yp);
gradM.graphics.beginGradientFill(GradientType.RADIAL, [0xFFFFFF, 0xFFFFFF, 0xFFFFFF], [1, 0.5, 0], [0, 127, 0xFF], mat);
gradM.graphics.drawCircle(xp, yp, s);
i++;
};
gradM.graphics.endFill();
grad.draw(gradM);
addChild(new Bitmap(grad));
bitm = new Bitmap(bitf, "auto", true);
addChild(bitm);
addEventListener(Event.ENTER_FRAME, main);
dense = 0;
ch = 0;
dmap = new DisplacementMapFilter(bit, new Point(0, 0), 1, 1, 50, 50, "color");
numF = 100;
recorder = new BitmapRecorder(numF);
done = false;
recorder.addEventListener(BitmapRecorder.FULL, filledRecording);
bitM = new BitmapData(bit.width, bit.height, true, 4294967295);
bitM.perlinNoise(2000, 30, 2, 3, false, true, 1, true);
bitN = new BitmapData(bit.width, bit.height, true, 4294967295);
AlphaMap.map(bitM, bitN, false, 160);
grad.merge(bitN, new Rectangle(0, 0, bit.width, bit.height), new Point(0, 0), 10, 10, 10, 1);
merger = 0xFF;
cor = 0;
}
public function filledRecording(_arg1:Event):void{
while (numChildren > 0) {
removeChild(getChildAt(0));
};
EffectData.store(recorder, "NightClouds");
addChild(recorder);
recorder.play();
trace("CHECK DONE");
done = true;
x = -150;
scaleX = (scaleY = 1);
width = 1000;
height = 750;
}
public function main(_arg1:Event):void{
if (!done){
ch = (ch + 1);
if (ch <= (numF / 4)){
merger = (merger - (0xFF / (numF / 4)));
cor = 0;
} else {
if (ch >= (numF - (numF / 4))){
merger = (merger + (0xFF / (numF / 4)));
cor = numF;
};
};
bit.lock();
bit.perlinNoise(100, 30, 2, 3, false, true, 1, true, [new Point((ch * 2), ch), new Point(ch, -(ch)), new Point(ch, (ch * 2))]);
bit2.perlinNoise(100, 30, 2, 10, false, true, 1, true, [new Point(((ch - cor) * 3), (ch - cor)), new Point(((ch - cor) * 2), ((ch - cor) * 2)), new Point((ch - cor), ((ch - cor) * 3))]);
bit.merge(bit2, new Rectangle(0, 0, bit.width, bit.height), new Point(0, 0), merger, merger, merger, 1);
bit.unlock();
AlphaMap.map(bit, bitf);
recorder.record(this);
} else {
recorder.play();
};
}
public function getNumF():int{
return (numF);
}
}
}//package
Section 14
//NormalCloudsID (NormalCloudsID)
package {
import flash.display.*;
import game.engine.bitmap.*;
import flash.events.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class NormalCloudsID extends MovieClip {
public var bitm:Bitmap;
public var bit:BitmapData;
public var dense:Number;
public var grad:BitmapData;
public var dmap:DisplacementMapFilter;
public var ch:int;
public var done:Boolean;
public var cor:int;
public var numF:int;
public var mat:Matrix;
public var merger:Number;
public var bit2:BitmapData;
public var recorder:BitmapRecorder;
public var gradM:Sprite;
public function NormalCloudsID(){
addFrameScript(0, frame1);
}
function frame1(){
bit = new BitmapData(400, 400);
bit2 = new BitmapData(400, 400);
bitm = new Bitmap(bit);
addChild(bitm);
grad = new BitmapData(width, height);
gradM = new Sprite();
mat = new Matrix();
mat.createGradientBox(width, height, (Math.PI / 2), 0, (bit.width / 2));
gradM.graphics.beginGradientFill(GradientType.RADIAL, [0xFFCC00, 0xFFCC00, 0xFF0000], [1, 1, 1], [0, 50, 0xFF], mat);
gradM.graphics.lineTo(width, 0);
gradM.graphics.lineTo(width, height);
gradM.graphics.lineTo(0, height);
gradM.graphics.lineTo(0, 0);
grad.draw(gradM);
dmap = new DisplacementMapFilter(bit, new Point(0, 0), 1, 1, 100, 0, "color");
addEventListener(Event.ENTER_FRAME, main);
dense = 0;
ch = 0;
numF = 100;
recorder = new BitmapRecorder(numF);
done = false;
recorder.addEventListener(BitmapRecorder.FULL, filledRecording);
merger = 0xFF;
cor = 0;
}
public function filledRecording(_arg1:Event):void{
while (numChildren > 0) {
removeChild(getChildAt(0));
};
EffectData.store(recorder, "NormalClouds");
addChild(recorder);
recorder.play();
trace("CHECK DONE");
done = true;
x = -150;
scaleX = (scaleY = 1);
width = 1000;
height = 750;
}
public function main(_arg1:Event):void{
if (!done){
ch = (ch + 1);
if (ch <= (numF / 2)){
merger = (merger - (0xFF / (numF / 2)));
cor = 0;
} else {
if (ch >= (numF - (numF / 2))){
merger = (merger + (0xFF / (numF / 2)));
cor = numF;
};
};
bit.lock();
bit.perlinNoise(100, 50, 2, 3, true, true, 1, true, [new Point((ch * 3), ch), new Point((ch * 2), (ch * 2)), new Point(ch, (ch * 3))]);
bit2.perlinNoise(100, 50, 2, 10, true, true, 1, true, [new Point(((ch - cor) * 3), (ch - cor)), new Point(((ch - cor) * 2), ((ch - cor) * 2)), new Point((ch - cor), ((ch - cor) * 3))]);
bit.colorTransform(new Rectangle(0, 0, bit.width, bit.height), new ColorTransform(1, 1, 1, 1, 0, 0, 200, 0));
bit2.colorTransform(new Rectangle(0, 0, bit.width, bit.height), new ColorTransform(1, 1, 1, 1, 0, 0, 200, 0));
bit.merge(bit2, new Rectangle(0, 0, bit.width, bit.height), new Point(0, 0), merger, merger, merger, 1);
bit.unlock();
recorder.record(this);
} else {
recorder.play();
};
}
public function getNumF():int{
return (numF);
}
}
}//package
Section 15
//SunsetCloudsID (SunsetCloudsID)
package {
import flash.display.*;
import game.engine.bitmap.*;
import flash.events.*;
import flash.filters.*;
import flash.geom.*;
public dynamic class SunsetCloudsID extends MovieClip {
public var bitm:Bitmap;
public var bit:BitmapData;
public var dense:Number;
public var grad:BitmapData;
public var dmap:DisplacementMapFilter;
public var ch:int;
public var done:Boolean;
public var cor:int;
public var numF:int;
public var mat:Matrix;
public var merger:Number;
public var bit2:BitmapData;
public var recorder:BitmapRecorder;
public var gradM:Sprite;
public function SunsetCloudsID(){
addFrameScript(0, frame1);
}
function frame1(){
bit = new BitmapData(400, 400);
bit2 = new BitmapData(400, 400);
bitm = new Bitmap(bit);
addChild(bitm);
grad = new BitmapData(width, height);
gradM = new Sprite();
mat = new Matrix();
mat.createGradientBox(width, height, (Math.PI / 2), 0, (bit.width / 2));
gradM.graphics.beginGradientFill(GradientType.RADIAL, [0xFFCC00, 0xFFCC00, 0xFF0000], [1, 1, 1], [0, 50, 0xFF], mat);
gradM.graphics.lineTo(width, 0);
gradM.graphics.lineTo(width, height);
gradM.graphics.lineTo(0, height);
gradM.graphics.lineTo(0, 0);
grad.draw(gradM);
dmap = new DisplacementMapFilter(bit, new Point(0, 0), 1, 1, 100, 0, "color");
addEventListener(Event.ENTER_FRAME, main);
dense = 0;
ch = 0;
numF = 100;
recorder = new BitmapRecorder(numF);
done = false;
recorder.addEventListener(BitmapRecorder.FULL, filledRecording);
merger = 0xFF;
cor = 0;
}
public function filledRecording(_arg1:Event):void{
while (numChildren > 0) {
removeChild(getChildAt(0));
};
EffectData.store(recorder, "SunsetClouds");
addChild(recorder);
recorder.play();
trace("CHECK DONE");
done = true;
x = -150;
scaleX = (scaleY = 1);
width = 1000;
height = 750;
}
public function main(_arg1:Event):void{
if (!done){
ch = (ch + 1);
if (ch <= (numF / 2)){
merger = (merger - (0xFF / (numF / 2)));
cor = 0;
} else {
if (ch >= (numF - (numF / 2))){
merger = (merger + (0xFF / (numF / 2)));
cor = numF;
};
};
bit.lock();
bit.perlinNoise(100, 30, 2, 3, true, true, 1, true, [new Point((ch * 3), ch), new Point((ch * 2), (ch * 2)), new Point(ch, (ch * 3))]);
bit2.perlinNoise(100, 30, 2, 10, true, true, 1, true, [new Point(((ch - cor) * 3), (ch - cor)), new Point(((ch - cor) * 2), ((ch - cor) * 2)), new Point((ch - cor), ((ch - cor) * 3))]);
bit.merge(bit2, new Rectangle(0, 0, bit.width, bit.height), new Point(0, 0), merger, merger, merger, 1);
bit.merge(grad, new Rectangle(0, 0, bit.width, bit.height), new Point(0, 0), 127, 127, 127, 1);
bit.unlock();
recorder.record(this);
} else {
recorder.play();
};
}
public function getNumF():int{
return (numF);
}
}
}//package
Section 16
//SwayingTreeID (SwayingTreeID)
package {
import flash.display.*;
import game.engine.bitmap.*;
import game.engine.effectAids.*;
import flash.events.*;
public dynamic class SwayingTreeID extends MovieClip {
public var H:Number;
public var W:Number;
public var numF:int;
public var done:Boolean;
public var trunk:branch;
public var recorder:BitmapRecorder;
public function SwayingTreeID(){
addFrameScript(0, frame1);
}
function frame1(){
trunk = new branch(null);
addChild(trunk);
W = (width + 200);
H = height;
addEventListener(Event.ENTER_FRAME, main);
numF = 40;
recorder = new BitmapRecorder(numF);
done = false;
recorder.addEventListener(BitmapRecorder.FULL, filledRecording);
}
public function filledRecording(_arg1:Event):void{
while (numChildren > 0) {
removeChild(getChildAt(0));
};
EffectData.store(recorder, "SwayingTree");
addChild(recorder);
recorder.play();
done = true;
}
public function main(_arg1:Event):void{
if (!done){
trunk.sway();
recorder.record(this, W, H, ((W / 2) + 100), H);
} else {
graphics.clear();
graphics.lineStyle(5, 0xFF0000);
graphics.drawRect((-(width) / 2), -(height), width, height);
recorder.play();
};
}
public function getNumF():int{
return (numF);
}
}
}//package