Section 1
//MainTimeline (smallworlds_fla.MainTimeline)
package smallworlds_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var playButton01:SimpleButton;
public var quitButton01:SimpleButton;
public var music;
public var orbNum;
public var viewRect;
public var jump;
public var mouseButton;
public var SFXButton01:SimpleButton;
public var SFXButton02:SimpleButton;
public var collisionMC;
public var telePos;
public var screenVisible:BitmapData;
public var flashAmount;
public var i;
public var orbFrames;
public var beginButton01:SimpleButton;
public var screenWorld:BitmapData;
public var worldNum;
public var startPos;
public var worldFrameNum;
public var worldMC;
public var orbMC;
public var yesButton01:SimpleButton;
public var sfxChannel;
public var gameButton01:SimpleButton;
public var viewMatrix;
public var teleMC;
public var coll;
public var orbPos;
public var colTrans;
public var returnPos;
public var worldFrame;
public var incompetechButton01:SimpleButton;
public var musicChannel;
public var teleporterSND;
public var menuButton01:SimpleButton;
public var collision;
public var teleporter;
public var screenWorldbmp:Bitmap;
public var screenVisiblebmp:Bitmap;
public var frame;
public var musicDisp:MovieClip;
public var mousePos;
public var bkg_1:MovieClip;
public var bkg_2:MovieClip;
public var instructionsButton01:SimpleButton;
public var captionFade;
public var world;
public var noButton01:SimpleButton;
public var worldMask;
public var barMask:MovieClip;
public var muteMusic;
public var muteSFX;
public var playerPos;
public var sfxDisp:MovieClip;
public var screenBuffer;
public var orbFrame;
public var jigButton01:SimpleButton;
public var caption:MovieClip;
public var viewDist;
public var keys;
public var orbGet;
public var musicButton01:SimpleButton;
public var musicButton02:SimpleButton;
public function MainTimeline(){
addFrameScript(0, frame1, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 41, frame42, 99, frame100, 100, frame101, 101, frame102, 104, frame105, 331, frame332);
}
public function mainLoop(_arg1:Event){
caption.alpha = captionFade;
captionFade = Math.max(0, (captionFade - 0.01));
calculatePlayerMovement();
drawView();
drawWorld();
frame++;
if (frame == 25){
frame = 0;
};
orbFrame++;
if (orbFrame == 4){
orbFrame = 0;
};
}
public function loaded(_arg1:Event):void{
this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, loading);
this.loaderInfo.removeEventListener(Event.COMPLETE, loaded);
trace("...Assets loaded");
gotoAndStop(3);
}
public function drawView(){
worldMask[world].fillRect(new Rectangle(((playerPos.x - 8) * 2), ((playerPos.y - 2) * 2), 34, 10), 4278190080);
worldMask[world].fillRect(new Rectangle(((playerPos.x - 7) * 2), ((playerPos.y - 5) * 2), 30, 22), 4278190080);
worldMask[world].fillRect(new Rectangle(((playerPos.x - 6) * 2), ((playerPos.y - 6) * 2), 26, 26), 4278190080);
worldMask[world].fillRect(new Rectangle(((playerPos.x - 5) * 2), ((playerPos.y - 7) * 2), 22, 30), 4278190080);
worldMask[world].fillRect(new Rectangle(((playerPos.x - 2) * 2), ((playerPos.y - 8) * 2), 10, 34), 4278190080);
}
public function redrawCursor(_arg1:MouseEvent):void{
mousePos.x = _arg1.stageX;
mousePos.y = _arg1.stageY;
}
public function setWorld(){
var _local1:*;
var _local2:*;
_local1 = new Matrix();
_local1.scale(2, 2);
collisionMC.gotoAndStop((world + 1));
collision.draw(collisionMC, new Matrix());
_local2 = 0;
while (_local2 < worldFrameNum) {
worldFrame[_local2] = new BitmapData(600, 600, false, 4294967295);
worldMC.gotoAndPlay((((world * 25) + _local2) + 1));
worldFrame[_local2].draw(worldMC, _local1);
_local2++;
};
SoundMixer.stopAll();
if (((((((orbGet[1]) && (orbGet[2]))) && (orbGet[3]))) && (orbGet[4]))){
stage.removeEventListener("enterFrame", mainLoop);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
stage.removeEventListener(KeyboardEvent.KEY_UP, keyReleased);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, redrawCursor);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, mouseButtonPressed);
stage.removeEventListener(MouseEvent.MOUSE_UP, mouseButtonReleased);
gotoAndPlay(105);
} else {
if (!muteMusic){
musicChannel = music[world].play(0, 99);
};
};
if (!muteSFX){
sfxChannel = teleporterSND.play();
};
flashAmount = 0xFF;
return (world);
}
public function toggleSFX01(_arg1:MouseEvent):void{
muteSFX = !(muteSFX);
if (muteSFX){
sfxDisp.alpha = 1;
} else {
sfxDisp.alpha = 0;
};
}
function frame4(){
trace("...creating data structures");
worldNum = 5;
viewDist = 8;
worldFrameNum = 25;
orbNum = 4;
muteSFX = false;
muteMusic = false;
mousePos = new Point(0, 0);
mouseButton = 0;
keys = new Array();
playerPos = new Point(0, 0);
coll = new Array();
orbFrame = 1;
colTrans = new ColorTransform();
flashAmount = 1;
captionFade = 1;
music = new Array();
musicChannel = new SoundChannel();
sfxChannel = new SoundChannel();
teleporterSND = new teleporter_SND();
worldFrame = new Array();
screenBuffer = new BitmapData(600, 600, false, 4278190080);
worldMask = new Array();
collision = new BitmapData(300, 300, false, 4278190080);
viewRect = new Array();
orbFrames = new Array();
orbMC = new orb_MC();
teleporter = new BitmapData(6, 12, false, 4278190080);
teleMC = new tele_MC();
orbGet = new Array();
orbPos = new Array();
telePos = new Array();
startPos = new Array();
returnPos = new Array();
i = 0;
while (i < 4) {
orbFrames[i] = new BitmapData(22, 22, true, 0);
orbMC.gotoAndStop((i + 1));
orbFrames[i].draw(orbMC, new Matrix());
i++;
};
orbPos[2] = new Point(144, 113);
orbPos[1] = new Point(144, 110);
orbPos[3] = new Point(156, 113);
orbPos[4] = new Point(156, 110);
telePos[2] = new Point(102, 97);
telePos[1] = new Point(121, 103);
telePos[3] = new Point(197, 97);
telePos[4] = new Point(178, 103);
returnPos[2] = new Point(106, 102);
returnPos[1] = new Point(125, 108);
returnPos[3] = new Point(195, 102);
returnPos[4] = new Point(176, 108);
startPos[0] = new Point(138, 26);
startPos[1] = new Point(48, 68);
startPos[2] = new Point(57, 124);
startPos[3] = new Point(83, 76);
startPos[4] = new Point(24, 76);
teleporter.draw(teleMC, new Matrix());
i = 0;
while (i < worldNum) {
worldMask[i] = new BitmapData(600, 600, true, 0);
viewRect[i] = new Rectangle();
i++;
};
music[0] = new music0();
music[1] = new music1();
music[2] = new music2();
music[3] = new music3();
music[4] = new music4();
worldMC = new world_MC();
collisionMC = new collision_MC();
screenWorld = new BitmapData(600, 600, false, 4278190080);
screenWorldbmp = new Bitmap(screenWorld);
screenVisible = new BitmapData(600, 600, false, 4294967295);
screenVisiblebmp = new Bitmap(screenVisible);
}
public function openJIG(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://jayisgames.com/cgdc6");
navigateToURL(_local2, "blank");
}
function frame5(){
trace("...Title menu");
stop();
SoundMixer.stopAll();
stage.addEventListener("enterFrame", titleScreen);
playButton01.addEventListener(MouseEvent.CLICK, startGame);
instructionsButton01.addEventListener(MouseEvent.CLICK, instructions);
jigButton01.addEventListener(MouseEvent.CLICK, openJIG);
incompetechButton01.addEventListener(MouseEvent.CLICK, openIncompetech);
}
public function toggleSFX02(_arg1:MouseEvent):void{
muteSFX = !(muteSFX);
if (muteSFX){
sfxDisp.alpha = 1;
} else {
sfxDisp.alpha = 0;
};
}
public function returnToGame(_arg1:MouseEvent):void{
SFXButton02.removeEventListener(MouseEvent.CLICK, toggleSFX02);
musicButton02.removeEventListener(MouseEvent.CLICK, toggleMusic02);
gameButton01.removeEventListener(MouseEvent.CLICK, returnToMenu);
quitButton01.removeEventListener(MouseEvent.CLICK, quitPressed);
gotoAndStop(42);
}
public function returnToOptions(_arg1:MouseEvent):void{
yesButton01.removeEventListener(MouseEvent.CLICK, quitToMenu);
noButton01.removeEventListener(MouseEvent.CLICK, returnToOptions);
gotoAndStop(101);
}
function frame1(){
trace("SMALL WORLDS V1.1 (c) 2009 David Shute");
trace("...Preloader starting");
stop();
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, loading);
this.loaderInfo.addEventListener(Event.COMPLETE, loaded);
}
function frame6(){
trace("...Initialising new game");
world = 0;
jump = 0;
frame = 1;
playerPos.x = startPos[world].x;
playerPos.y = startPos[world].y;
i = 0;
while (i < worldNum) {
viewRect[i].x = (startPos[i].x - 11);
viewRect[i].y = (startPos[i].y - 11);
viewRect[i].width = 23;
viewRect[i].height = 23;
worldMask[i].fillRect(new Rectangle(0, 0, 600, 600), 0);
i++;
};
i = 1;
while (i < 5) {
orbGet[i] = false;
i++;
};
worldMask[0].fillRect(new Rectangle(240, 24, 56, 34), 4278190080);
if (!muteMusic){
musicChannel = music[world].play(0, 99);
};
collisionMC.gotoAndStop((world + 1));
collision.draw(collisionMC, new Matrix());
viewMatrix = new Matrix();
viewMatrix.scale(2, 2);
i = 0;
while (i < worldFrameNum) {
worldFrame[i] = new BitmapData(600, 600, false, 4294967295);
worldMC.gotoAndPlay((((world * 25) + i) + 1));
worldFrame[i].draw(worldMC, viewMatrix);
i++;
};
screenWorld.fillRect(new Rectangle(0, 0, 600, 600), 4278190080);
flashAmount = 0xFF;
captionFade = 1;
play();
}
public function openIncompetech(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://incompetech.com");
navigateToURL(_local2, "blank");
}
function frame3(){
trace("...Game loaded");
stop();
beginButton01.addEventListener(MouseEvent.CLICK, button01Press);
}
public function mouseButtonReleased(_arg1:MouseEvent):void{
mouseButton = 0;
}
function frame42(){
trace("...Game started");
stop();
stage.addChildAt(screenWorldbmp, 0);
keys["jump"] = 0;
keys["left"] = 0;
keys["right"] = 0;
stage.addEventListener("enterFrame", mainLoop);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
stage.addEventListener(KeyboardEvent.KEY_UP, keyReleased);
stage.addEventListener(MouseEvent.MOUSE_MOVE, redrawCursor);
stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseButtonPressed);
stage.addEventListener(MouseEvent.MOUSE_UP, mouseButtonReleased);
}
public function drawWorld(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
_local1 = calculateView();
_local2 = new Rectangle((_local1.x * 2), (_local1.y * 2), (_local1.width * 2), (_local1.height * 2));
screenBuffer.fillRect(new Rectangle(0, 0, 600, 600), 4278190080);
screenBuffer.copyPixels(worldFrame[frame], _local2, new Point(0, 0), worldMask[world], new Point(_local2.x, _local2.y));
if (world == 0){
_local3 = 1;
while (_local3 < 5) {
if (orbGet[_local3]){
screenBuffer.copyPixels(orbFrames[orbFrame], new Rectangle(0, 0, 4, 4), new Point(((orbPos[_local3].x - _local1.x) * 2), ((orbPos[_local3].y - _local1.y) * 2)));
screenBuffer.copyPixels(teleporter, new Rectangle(0, 0, 6, 12), new Point(((telePos[_local3].x - _local1.x) * 2), ((telePos[_local3].y - _local1.y) * 2)));
};
_local3++;
};
};
_local3 = 0;
while (_local3 < 3) {
coll[_local3] = ((collision.getPixel(playerPos.x, ((playerPos.y + _local3) - 1)) >> 16) & 0xFF);
_local3++;
};
if ((((coll[0] > 200)) || ((coll[0] < 180)))){
screenBuffer.fillRect(new Rectangle(((playerPos.x - _local1.x) * 2), (((playerPos.y - _local1.y) - 1) * 2), 2, 2), 4294938768);
};
if ((((coll[1] > 200)) || ((coll[1] < 180)))){
screenBuffer.fillRect(new Rectangle(((playerPos.x - _local1.x) * 2), ((playerPos.y - _local1.y) * 2), 2, 2), 4294901760);
};
if ((((coll[2] > 200)) || ((coll[2] < 180)))){
screenBuffer.fillRect(new Rectangle(((playerPos.x - _local1.x) * 2), (((playerPos.y - _local1.y) + 1) * 2), 2, 2), 4294901760);
};
_local3 = 0;
while (_local3 < 3) {
coll[0] = ((collision.getPixel((playerPos.x + 1), (playerPos.y + _local3)) >> 16) & 0xFF);
if ((((coll[0] < 140)) && ((coll[0] > 120)))){
_local6 = new Point((((playerPos.x - _local1.x) + 1) * 2), (((playerPos.y - _local1.y) + _local3) * 2));
coll[0] = screenBuffer.getPixel(_local6.x, _local6.y);
_local7 = Math.floor((((coll[0] >> 16) & 0xFF) * 0.65));
_local8 = Math.floor((((coll[0] >> 8) & 0xFF) * 0.65));
_local9 = Math.floor(((coll[0] & 0xFF) * 0.65));
screenBuffer.fillRect(new Rectangle(_local6.x, _local6.y, 2, 2), (((_local7 << 16) | (_local8 << 8)) | _local9));
};
_local3++;
};
_local4 = new Matrix();
_local5 = (600 / (_local1.width * 2));
_local4.scale(_local5, _local5);
colTrans.redOffset = flashAmount;
colTrans.greenOffset = flashAmount;
colTrans.blueOffset = flashAmount;
screenWorld.draw(screenBuffer, _local4, colTrans);
flashAmount = Math.max(1, (flashAmount - 20));
}
public function keyPressed(_arg1:KeyboardEvent):void{
if ((((((((((_arg1.keyCode == 38)) || ((_arg1.keyCode == 87)))) || ((_arg1.keyCode == 32)))) || ((_arg1.keyCode == 88)))) || ((_arg1.keyCode == 90)))){
keys["jump"] = 1;
};
if ((((_arg1.keyCode == 37)) || ((_arg1.keyCode == 65)))){
keys["left"] = 1;
};
if ((((_arg1.keyCode == 39)) || ((_arg1.keyCode == 68)))){
keys["right"] = 1;
};
if (_arg1.keyCode == 27){
stage.removeEventListener("enterFrame", mainLoop);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
stage.removeEventListener(KeyboardEvent.KEY_UP, keyReleased);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, redrawCursor);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, mouseButtonPressed);
stage.removeEventListener(MouseEvent.MOUSE_UP, mouseButtonReleased);
gotoAndStop(101);
};
}
public function keyReleased(_arg1:KeyboardEvent):void{
if ((((((((((_arg1.keyCode == 38)) || ((_arg1.keyCode == 87)))) || ((_arg1.keyCode == 32)))) || ((_arg1.keyCode == 88)))) || ((_arg1.keyCode == 90)))){
keys["jump"] = 0;
};
if ((((_arg1.keyCode == 37)) || ((_arg1.keyCode == 65)))){
keys["left"] = 0;
};
if ((((_arg1.keyCode == 39)) || ((_arg1.keyCode == 68)))){
keys["right"] = 0;
};
}
public function quitPressed(_arg1:MouseEvent):void{
SFXButton02.removeEventListener(MouseEvent.CLICK, toggleSFX02);
musicButton02.removeEventListener(MouseEvent.CLICK, toggleMusic02);
gameButton01.removeEventListener(MouseEvent.CLICK, returnToMenu);
quitButton01.removeEventListener(MouseEvent.CLICK, quitPressed);
play();
}
public function titleScreen(_arg1:Event){
bkg_1.y = (bkg_1.y - 4);
bkg_2.y = (bkg_2.y - 4);
if (bkg_1.y <= -900){
bkg_1.y = 900;
};
if (bkg_2.y <= -900){
bkg_2.y = 900;
};
}
public function toggleMusic01(_arg1:MouseEvent):void{
muteMusic = !(muteMusic);
if (muteMusic){
musicDisp.alpha = 1;
SoundMixer.stopAll();
} else {
musicDisp.alpha = 0;
};
}
public function toggleMusic02(_arg1:MouseEvent):void{
muteMusic = !(muteMusic);
if (muteMusic){
musicDisp.alpha = 1;
SoundMixer.stopAll();
} else {
musicDisp.alpha = 0;
musicChannel = music[world].play(0, 99);
};
}
public function loading(_arg1:ProgressEvent):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = _arg1.target.bytesLoaded;
_local3 = _arg1.target.bytesTotal;
_local4 = (_local2 / _local3);
barMask.x = (20 + (560 * _local4));
}
function frame332(){
gotoAndPlay(5);
}
public function calculateView(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = new Rectangle();
_local2 = new Point(0, 0);
_local3 = new Point(viewRect[world].x, viewRect[world].y);
_local4 = new Point((viewRect[world].x + viewRect[world].width), (viewRect[world].y + viewRect[world].height));
_local3.x = Math.max(Math.min((playerPos.x - viewDist), _local3.x), 0);
_local3.y = Math.max(Math.min((playerPos.y - viewDist), _local3.y), 0);
_local4.x = Math.min(Math.max((playerPos.x + viewDist), _local4.x), 300);
_local4.y = Math.min(Math.max((playerPos.y + viewDist), _local4.y), 300);
viewRect[world] = new Rectangle(_local3.x, _local3.y, (_local4.x - _local3.x), (_local4.y - _local3.y));
_local5 = Math.max((_local4.x - _local3.x), (_local4.y - _local3.y));
_local2.x = (_local3.x + ((_local4.x - _local3.x) / 2));
_local2.y = (_local3.y + ((_local4.y - _local3.y) / 2));
_local1.x = (_local2.x - (_local5 / 2));
_local1.y = (_local2.y - (_local5 / 2));
_local1.width = (_local5 + 1);
_local1.height = (_local5 + 1);
return (_local1);
}
public function button01Press(_arg1:MouseEvent):void{
beginButton01.removeEventListener(MouseEvent.CLICK, button01Press);
play();
}
function frame100(){
stop();
if (muteSFX){
sfxDisp.alpha = 1;
} else {
sfxDisp.alpha = 0;
};
if (muteMusic){
musicDisp.alpha = 1;
} else {
musicDisp.alpha = 0;
};
SFXButton01.addEventListener(MouseEvent.CLICK, toggleSFX01);
musicButton01.addEventListener(MouseEvent.CLICK, toggleMusic01);
menuButton01.addEventListener(MouseEvent.CLICK, returnToMenu);
}
function frame101(){
stop();
if (muteSFX){
sfxDisp.alpha = 1;
} else {
sfxDisp.alpha = 0;
};
if (muteMusic){
musicDisp.alpha = 1;
} else {
musicDisp.alpha = 0;
};
SFXButton02.addEventListener(MouseEvent.CLICK, toggleSFX02);
musicButton02.addEventListener(MouseEvent.CLICK, toggleMusic02);
gameButton01.addEventListener(MouseEvent.CLICK, returnToGame);
quitButton01.addEventListener(MouseEvent.CLICK, quitPressed);
}
function frame105(){
stage.removeChildAt(0);
}
function frame102(){
stop();
yesButton01.addEventListener(MouseEvent.CLICK, quitToMenu);
noButton01.addEventListener(MouseEvent.CLICK, returnToOptions);
}
public function startGame(_arg1:MouseEvent):void{
playButton01.removeEventListener(MouseEvent.CLICK, startGame);
stage.removeEventListener("enterFrame", titleScreen);
instructionsButton01.removeEventListener(MouseEvent.CLICK, instructions);
jigButton01.removeEventListener(MouseEvent.CLICK, openJIG);
incompetechButton01.removeEventListener(MouseEvent.CLICK, openIncompetech);
play();
}
public function quitToMenu(_arg1:MouseEvent):void{
yesButton01.removeEventListener(MouseEvent.CLICK, quitToMenu);
noButton01.removeEventListener(MouseEvent.CLICK, returnToOptions);
stage.removeChildAt(0);
gotoAndStop(5);
}
public function instructions(_arg1:MouseEvent):void{
playButton01.removeEventListener(MouseEvent.CLICK, startGame);
stage.removeEventListener("enterFrame", titleScreen);
instructionsButton01.removeEventListener(MouseEvent.CLICK, instructions);
jigButton01.removeEventListener(MouseEvent.CLICK, openJIG);
incompetechButton01.removeEventListener(MouseEvent.CLICK, openIncompetech);
gotoAndStop(100);
}
public function calculatePlayerMovement(){
var _local1:*;
var _local2:*;
var _local3:*;
if (((collision.getPixel(playerPos.x, playerPos.y) >> 8) & 0xFF) > 230){
if (world > 0){
orbGet[world] = true;
playerPos.x = returnPos[world].x;
playerPos.y = returnPos[world].y;
world = 0;
setWorld();
} else {
if (playerPos.x < 115){
_local3 = 2;
} else {
if (playerPos.x < 150){
_local3 = 1;
} else {
if (playerPos.x < 190){
_local3 = 4;
} else {
_local3 = 3;
};
};
};
if (!orbGet[_local3]){
world = _local3;
playerPos.x = startPos[world].x;
playerPos.y = startPos[world].y;
setWorld();
};
};
} else {
if (((collision.getPixel(playerPos.x, playerPos.y) >> 8) & 0xFF) > 100){
jump = 0;
playerPos.y--;
};
};
_local1 = new Point();
_local2 = ((collision.getPixel(playerPos.x, (playerPos.y + 2)) >> 16) & 0xFF);
if (keys["left"]){
_local1.x = -1;
};
if (keys["right"]){
_local1.x = 1;
};
if (_local1.x != 0){
i = 0;
while (i < 4) {
coll[i] = ((collision.getPixel((playerPos.x + _local1.x), ((playerPos.y + i) - 2)) >> 16) & 0xFF);
i++;
};
if ((((coll[1] < 230)) && ((coll[2] < 230)))){
if (coll[3] < 230){
playerPos.x = (playerPos.x + _local1.x);
} else {
if ((((((coll[0] < 230)) && ((((collision.getPixel(playerPos.x, (playerPos.y - 2)) >> 16) & 0xFF) < 191)))) && ((jump >= 0)))){
playerPos.x = (playerPos.x + _local1.x);
playerPos.y = (playerPos.y - 1);
};
};
};
};
if ((((_local2 > 191)) && (keys["jump"]))){
if (jump >= 0){
jump = -2.5;
};
};
if ((((((((collision.getPixel(playerPos.x, (playerPos.y + 2)) >> 16) & 0xFF) > 191)) && (!(keys["jump"])))) && ((jump > 0)))){
jump = 0;
};
_local1.y = Math.round(jump);
if (jump < 2){
jump = (jump + 0.5);
};
coll[0] = ((collision.getPixel(playerPos.x, (playerPos.y + 3)) >> 16) & 0xFF);
coll[1] = ((collision.getPixel(playerPos.x, (playerPos.y + 2)) >> 16) & 0xFF);
coll[2] = ((collision.getPixel(playerPos.x, (playerPos.y - 3)) >> 16) & 0xFF);
coll[3] = ((collision.getPixel(playerPos.x, (playerPos.y - 2)) >> 16) & 0xFF);
if (_local1.y > 0){
if (coll[0] > 230){
_local1.y = 1;
};
if (coll[1] > 230){
_local1.y = 0;
};
};
if (_local1.y < 0){
if (coll[2] > 230){
_local1.y = -1;
};
if (coll[3] > 230){
_local1.y = 0;
};
};
if ((((coll[3] > 230)) && ((jump <= 0)))){
jump = 0;
};
playerPos.y = (playerPos.y + _local1.y);
}
public function returnToMenu(_arg1:MouseEvent):void{
SFXButton01.removeEventListener(MouseEvent.CLICK, toggleSFX01);
musicButton01.removeEventListener(MouseEvent.CLICK, toggleMusic01);
menuButton01.removeEventListener(MouseEvent.CLICK, returnToMenu);
gotoAndStop(5);
}
public function mouseButtonPressed(_arg1:MouseEvent):void{
mouseButton = 1;
}
}
}//package smallworlds_fla
Section 2
//collision_MC (collision_MC)
package {
import flash.display.*;
public dynamic class collision_MC extends MovieClip {
}
}//package
Section 3
//music0 (music0)
package {
import flash.media.*;
public dynamic class music0 extends Sound {
}
}//package
Section 4
//music1 (music1)
package {
import flash.media.*;
public dynamic class music1 extends Sound {
}
}//package
Section 5
//music2 (music2)
package {
import flash.media.*;
public dynamic class music2 extends Sound {
}
}//package
Section 6
//music3 (music3)
package {
import flash.media.*;
public dynamic class music3 extends Sound {
}
}//package
Section 7
//music4 (music4)
package {
import flash.media.*;
public dynamic class music4 extends Sound {
}
}//package
Section 8
//orb_MC (orb_MC)
package {
import flash.display.*;
public dynamic class orb_MC extends MovieClip {
}
}//package
Section 9
//tele_MC (tele_MC)
package {
import flash.display.*;
public dynamic class tele_MC extends MovieClip {
}
}//package
Section 10
//teleporter_SND (teleporter_SND)
package {
import flash.media.*;
public dynamic class teleporter_SND extends Sound {
}
}//package
Section 11
//world_MC (world_MC)
package {
import flash.display.*;
public dynamic class world_MC extends MovieClip {
}
}//package