Frame 1
Main.main(this);
Symbol 20480 MovieClip [__Packages.Screen] Frame 0
class Screen
{
var sClip;
function Screen () {
}
function Display(name) {
sClip = _root.createEmptyMovieClip("screen", 1);
sClip.attachMovie(name, "screen", 1);
}
function Kill() {
sClip.removeMovieClip();
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20481 MovieClip [__Packages.org.flashdevelop.utils.TraceLevel] Frame 0
class org.flashdevelop.utils.TraceLevel
{
function TraceLevel () {
}
static var INFO = 0;
static var DEBUG = 1;
static var WARNING = 2;
static var ERROR = 3;
static var FATAL = 4;
}
Symbol 20482 MovieClip [__Packages.org.flashdevelop.utils.FlashConnect] Frame 0
class org.flashdevelop.utils.FlashConnect
{
static var messages, movie, counter, socket, interval;
function FlashConnect () {
}
static function send(message) {
if (messages == null) {
initialize();
}
messages.push(message);
}
static function trace(message, level) {
var _local4 = createMsgNode(message, level);
send(_local4);
}
static function mtrace(message, method, path, line) {
if (path.indexOf(":") < 0) {
if (movie == undefined) {
var _local6 = _global.unescape(_level0._url).split("///");
if (_local6.length == 1) {
_local6 = _global.unescape(_level0._url).split("//");
}
if (_local6[0] == "file:") {
movie = _local6[1];
movie = movie.substr(0, movie.lastIndexOf("\\") + 1).split("|").join(":");
} else {
movie = new String("");
}
}
path = movie + path;
}
var _local7 = path.split("/").join("\\");
var _local8 = (((_local7 + ":") + line) + ":") + message;
trace(_local8, org.flashdevelop.utils.TraceLevel.DEBUG);
}
static function initialize() {
counter = 0;
messages = new Array();
socket = new XMLSocket();
socket.onData = function (data) {
org.flashdevelop.utils.FlashConnect.onReturnData(data);
};
socket.onConnect = function (success) {
if (success) {
org.flashdevelop.utils.FlashConnect.status = 1;
} else {
org.flashdevelop.utils.FlashConnect.status = -1;
}
org.flashdevelop.utils.FlashConnect.onConnection();
};
interval = _global.setInterval(sendStack, 50);
socket.connect(host, port);
}
static function createMsgNode(message, level) {
if (_global.isNaN(level)) {
level = org.flashdevelop.utils.TraceLevel.DEBUG;
}
var _local4 = new XMLNode(1, null);
var _local5 = new XMLNode(3, _global.escape(message));
_local4.attributes.state = level.toString();
_local4.attributes.cmd = "trace";
_local4.nodeName = "message";
_local4.appendChild(_local5);
return(_local4);
}
static function sendStack() {
if ((messages.length > 0) && (status == 1)) {
var _local2 = new XML();
var _local3 = _local2.createElement("flashconnect");
while (messages.length != 0) {
counter++;
if (counter > limit) {
_global.clearInterval(interval);
var _local4 = new String("FlashConnect aborted. You have reached the limit of maximum messages.");
var _local5 = createMsgNode(_local4, org.flashdevelop.utils.TraceLevel.ERROR);
_local3.appendChild(_local5);
break;
}
var _local6 = XMLNode(messages.shift());
_local3.appendChild(_local6);
}
_local2.appendChild(_local3);
socket.send(_local2);
}
}
static var status = 0;
static var limit = 1000;
static var host = "localhost";
static var port = 1978;
}
Symbol 20483 MovieClip [__Packages.Main] Frame 0
class Main
{
static var iScreen, iCounter, iSprites;
function Main () {
}
static function main() {
var i;
iScreen = new Screen();
iCounter = 0;
i = 0;
for ( ; i < 10 ; i++) {
iSprites[i] = new MovieClip();
}
_root.onEnterFrame = function () {
if (Main.iStatus == 0) {
Main.iScreen.Display("library.title.jpg");
if (Key.isDown(Key.SPACE)) {
Main.iStatus = 1;
Main.iScreen.Kill();
i = 0;
for ( ; i < 10 ; i++) {
Main.iSprites[i] = _root.createEmptyMovieClip("sprite" + i, 10 + i);
}
Main.iSprites[0] = _root.attachMovie("library.doc.png", "player", 10);
Main.iSprites[1] = _root.attachMovie("library.cloud1.jpg", "back1", 9);
Main.iSprites[2] = _root.attachMovie("library.cloud1.jpg", "back2", 8);
Main.iSprites[3] = _root.attachMovie("library.master.png", "master", 11);
Main.iSprites[4] = _root.attachMovie("library.nme.png", "nme", 12);
_root.player._xscale = 50;
_root.player._yscale = 50;
_root.back2._x = 400;
_root.master._x = 350;
_root.master._y = 150;
_root.master._xscale = 20;
_root.master._yscale = 20;
_root.nme._x = 400;
_root.nme._y = Math.random() * 220;
_root.nme._xscale = 33;
_root.nme._yscale = 33;
Main.iScreen.Display("library.output.swf");
}
} else if (Main.iStatus == 1) {
var _local2 = new Object();
_local2.ra = 100;
_local2.rb = 0;
_local2.ga = 100;
_local2.gb = 0;
_local2.ba = Main.iCounter;
_local2.bb = 0;
_local2.aa = 100;
_local2.ab = 0;
Main.iCounter = Main.iCounter + 4;
if (Main.iCounter == 100) {
Main.iCounter = 0;
}
org.flashdevelop.utils.FlashConnect.trace(Main.iCounter, "Main::main", "classes/Main.as", 89);
_root.back1._x--;
_root.back2._x--;
if (_root.back1._x == -400) {
_root.back2._x = 400;
_root.back1._x = 0;
}
_root.master._x = _root.master._x - 0.5;
_root.nme._x = _root.nme._x - 3;
if (_root.nme._x < -20) {
_root.nme._x = 400;
_root.nme._y = Math.random() * 220;
}
new Color(_root.player).setTransform(_local2);
if (Key.isDown(Key.DOWN)) {
_root.player._y = _root.player._y + 2;
}
if (Key.isDown(Key.UP)) {
_root.player._y = _root.player._y - 2;
}
if (_root.player._y < 0) {
_root.player._y = 0;
}
if (_root.player._y > 220) {
_root.player._y = 220;
}
if (_root.master._x < 10) {
Main.iStatus = 4;
_root.player.removeMovieClip();
_root.master.removeMovieClip();
_root.back1.removeMovieClip();
_root.back2.removeMovieClip();
_root.nme.removeMovieClip();
Main.iScreen.Kill();
}
if ((_root.nme._x < 50) && (_root.nme._x > -10)) {
if ((_root.nme._y - _root.player._y) > -10) {
if ((_root.nme._y - _root.player._y) < 70) {
Main.iStatus = 3;
_root.player.removeMovieClip();
_root.master.removeMovieClip();
_root.back1.removeMovieClip();
_root.back2.removeMovieClip();
_root.nme.removeMovieClip();
Main.iScreen.Kill();
}
}
}
} else if (Main.iStatus == 3) {
Main.iScreen.Display("library.gameover.jpg");
if (Key.isDown(Key.SPACE)) {
Main.iStatus = 0;
Main.iScreen.Kill();
}
} else if (Main.iStatus == 4) {
Main.iScreen.Display("library.win.jpg");
if (Key.isDown(Key.SPACE)) {
Main.iStatus = 0;
Main.iScreen.Kill();
}
}
};
}
//ASSetPropFlags(_local1, null, 1);
static var iStatus = 0;
}