Section 1
//MainTimeline (image_fla.MainTimeline)
package image_fla {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.filters.*;
import flash.geom.*;
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.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var pass:Array;
public var loader:URLLoader;
public var downx;
public var downy;
public var coords:Sprite;
public var usercount:TextField;
public var raw:Array;
public var messTimer:Timer;
public var spacex:int;
public var spacey:int;
public var mapon:Boolean;
public var collide:Boolean;
public var border;
public var xmove;
public var starty:int;
public var startx:int;
public var bigmap:Object;
public var blur:BlurFilter;
public var borderndjkxcv:int;
public var i:int;
public var download;
public var rec:Array;
public var red:ColorTransform;
public var test:Boolean;
public var dir:String;
public var posx:Array;
public var req:URLRequest;
public var sendtext;
public var posy:Array;
public var unbold:TextFormat;
public var pictLdr2:Loader;
public var bigwidth;
public var keycode:Array;
public var over:Boolean;
public var mytext:TextField;
public var i2:int;
public var helpon:String;
public var addsquare:Shape;
public var added:Array;
public var space;
public var raw3:Array;
public var raw2:String;
public var filecount:int;
public var smmove;
public var square:Shape;
public var ip:String;
public var shadow:DropShadowFilter;
public var imip:Array;
public var map:Sprite;
public var file:Array;
public var addbox:Sprite;
public var hugeblur:BlurFilter;
public var screenx:int;
public var screeny:int;
public var coordtext:TextField;
public var glow:GlowFilter;
public var host:String;
public var oform:TextFormat;
public var imgborder:int;
public var whole:Array;
public var boxborder:Array;
public var allowed:Boolean;
public var pausecoords:Boolean;
public var neutral:ColorTransform;
public var movestage:Boolean;
public var box:Array;
public var pictURLReq2:URLRequest;
public var onsend:Boolean;
public var zoomnxjcjknxv:Number;
public var mess:TextField;
public var ondisplay:int;
public var filename:TextField;
public var dismap;
public var inmap:Shape;
public var mapsquares:Array;
public var right:TextFormat;
public var bigheight;
public var imloaded:Boolean;
public var mapbit:BitmapData;
public var imgisdown:Boolean;
public var so:SharedObject;
public var filenamebox:Sprite;
public var txt:TextField;
public var elisten:Boolean;
public var screenxblock:int;
public var coordgo:Object;
public var helpoff:String;
public var sendit:Sprite;
public var mover:Sprite;
public var boxfade:Array;
public var blurred:Array;
public var underline:TextFormat;
public var time:String;
public var ondown:Boolean;
public var mod:int;
public var messaging:Boolean;
public var overprogress:Sprite;
public var onscreen:Array;
public var keyjump:int;
public var hrtgd:int;
public var mtimer:Timer;
public var ongo:Boolean;
public var screenyblock:int;
public var downmost:int;
public var mapnjkscxz:Object;
public var browser:String;
public var maxmove:int;
public var mapzoom:Number;
public var boxfadeout:Array;
public var chat:Object;
public var coversquare:Shape;
public var sposx:int;
public var sposy:int;
public var rightmost:int;
public var adding:Boolean;
public var boxed:Array;
public var coordclick;
public var overprogresstext:TextField;
public var spotx:int;
public var cover:Sprite;
public var usermouse:MovieClip;
public var img:Array;
public var spoty:int;
public var ymove;
public var stagezoom:Number;
public var coord1:Object;
public var coord2:Object;
public var inc;
public var lmousex:int;
public var lmousey:int;
public var format:TextFormat;
public var helptext;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function coordgoer(_arg1:Event):void{
coordgoto();
}
public function stopout(_arg1:Event):void{
ondown = false;
}
public function overoff(){
removeChild(square);
unblur();
stage.removeEventListener(MouseEvent.MOUSE_DOWN, overclick);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveit);
stageon();
texton();
lmousex = mouseX;
lmousey = mouseY;
}
public function updatezoom(){
i = 0;
while (i < onscreen.length) {
if (file[onscreen[i]]){
file[onscreen[i]].width = (128 * stagezoom);
file[onscreen[i]].height = (128 * stagezoom);
};
i++;
};
updatepos();
}
public function eframe(_arg1:Event):void{
if (keycode[0]){
screeny = (screeny - keyjump);
updatepos();
};
if (keycode[1]){
screenx = (screenx + keyjump);
updatepos();
};
if (keycode[2]){
screeny = (screeny + keyjump);
updatepos();
};
if (keycode[3]){
screenx = (screenx - keyjump);
updatepos();
};
}
public function coordout(){
stage.removeEventListener(KeyboardEvent.KEY_DOWN, key);
stageon();
if (((pausecoords) && ((ongo == false)))){
pausecoords = false;
coordgo.spr.visible = false;
};
}
public function maketext(_arg1:String=""):TextField{
var txt:TextField;
var str = _arg1;
txt = new TextField();
var _local3 = txt;
with (_local3) {
antiAliasType = AntiAliasType.ADVANCED;
autoSize = TextFieldAutoSize.LEFT;
wordWrap = false;
multiline = true;
selectable = false;
defaultTextFormat = format;
filters = [shadow];
text = str;
};
return (txt);
}
public function ghcjb(_arg1:Event):void{
if (stage.focus != _arg1.target){
_arg1.currentTarget.alpha = 0.5;
};
}
public function sendover(_arg1:Event):void{
sendtext.setTextFormat(underline);
onsend = true;
}
public function overlay(_arg1:int){
var ioErrorHandler:Function;
var imgloading:Function;
var imgLoaded2:Function;
var b = _arg1;
ioErrorHandler = function (_arg1:IOErrorEvent):void{
removeChild(overprogress);
overoff();
};
imgloading = function (_arg1:ProgressEvent):void{
overprogresstext.text = (((_arg1.bytesLoaded + " of ") + _arg1.bytesTotal) + " bytes");
};
imgLoaded2 = function (_arg1:Event):void{
var zoominc:*;
var zoomit:Function;
var event = _arg1;
zoomit = function (_arg1:KeyboardEvent):void{
if ((((_arg1.keyCode == 187)) || ((_arg1.keyCode == 107)))){
if (pictLdr2.content.scaleX < 3){
pictLdr2.content.scaleX = (pictLdr2.content.scaleX * zoominc);
pictLdr2.content.scaleY = (pictLdr2.content.scaleY * zoominc);
};
} else {
if ((((_arg1.keyCode == 189)) || ((_arg1.keyCode == 109)))){
if (pictLdr2.content.scaleX > 0.2){
pictLdr2.content.scaleX = (pictLdr2.content.scaleX / zoominc);
pictLdr2.content.scaleY = (pictLdr2.content.scaleY / zoominc);
};
};
};
moveit2();
};
ondown = false;
removeChild(overprogress);
mover.addChild(pictLdr2.content);
pictLdr2.content.y = 25;
filename.text = file[b];
mover.addChild(filenamebox);
download.spr.x = (filename.textWidth + 10);
mover.addChild(download.spr);
stage.addEventListener(MouseEvent.MOUSE_MOVE, moveit);
stage.addEventListener(KeyboardEvent.KEY_DOWN, zoomit);
moveit2();
zoominc = 1.1;
};
ondisplay = b;
stageoff();
blurit();
textoff();
addChild(square);
addChild(mover);
stage.addEventListener(MouseEvent.MOUSE_DOWN, overclick);
pictURLReq2 = new URLRequest(((dir + "img/") + file[b]));
pictLdr2.load(pictURLReq2);
overprogresstext.text = "";
overprogress.x = ((stage.stageWidth / 2) - 50);
overprogress.y = (stage.stageHeight / 2);
addChild(overprogress);
pictLdr2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
pictLdr2.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, imgloading);
pictLdr2.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoaded2);
}
function frame2(){
stop();
loader = new URLLoader();
whole = new Array();
req = new URLRequest((dir + "request.php?block=5"));
loader.load(req);
loader.addEventListener(Event.COMPLETE, hand);
}
function frame1(){
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
dir = new String();
if (test){
dir = "http://localhost/~zareste/guider/grid/";
} else {
if (loaderInfo.parameters.grid == "art"){
dir = "http://zareste.com/artgrid/";
txt.text = ("The Artist Grid\n\n" + txt.text);
} else {
if (loaderInfo.parameters.grid == "exp"){
dir = "http://zareste.com/preg/";
txt.text = ("The Expansion Grid\n\n" + txt.text);
} else {
dir = "http://zareste.com/grid/";
txt.text = ("The Image Grid\n\n" + txt.text);
};
};
};
}
function frame3(){
stop();
space = 15192;
spacex = space;
spacey = space;
screenx = 0;
screeny = 0;
over = false;
added = new Array();
onscreen = new Array();
img = new Array();
box = new Array();
adding = false;
so = SharedObject.getLocal("application-name");
stagezoom = 1;
filecount = 0;
raw = raw2.split(";");
raw3 = new Array();
file = new Array();
posx = new Array();
posy = new Array();
imip = new Array();
pass = new Array();
i = 0;
while (i < raw.length) {
raw3 = raw[i].split(",", 30);
file[i] = raw3[0];
posx[i] = raw3[1];
posy[i] = raw3[2];
if (raw3[1] > rightmost){
rightmost = raw3[1];
};
if (raw3[2] > downmost){
downmost = raw3[2];
};
added[i] = false;
i++;
};
if (test){
screenx = 2000;
screeny = 600;
} else {
i = (file.length - 1);
while (i >= 0) {
i2 = 0;
while (i2 < file.length) {
if (((((!((i2 == i))) && ((difference(posx[i2], posx[i]) < ((stage.stageWidth / 2) - 5))))) && ((difference(posy[i2], posy[i]) < ((stage.stageHeight / 2) - 5))))){
screenx = (posx[i] - (stage.stageWidth / 2));
screeny = (posy[i] - (stage.stageHeight / 2));
i = -1;
break;
};
i2++;
};
i--;
};
};
lmousex = mouseX;
lmousey = mouseY;
imgisdown = false;
imgborder = 0;
blur = new BlurFilter();
var _local2 = blur;
with (_local2) {
blurX = 7;
blurY = 7;
quality = 1;
};
hugeblur = new BlurFilter();
_local2 = hugeblur;
with (_local2) {
blurX = 20;
blurY = 20;
quality = 2;
};
shadow = new DropShadowFilter();
shadow.distance = 0;
shadow.angle = 25;
shadow.strength = 1.2;
glow = new GlowFilter();
_local2 = glow;
with (_local2) {
blurX = 12;
blurY = 12;
color = 0xFFFFFF;
};
oform = new TextFormat();
_local2 = oform;
with (_local2) {
color = 0;
size = 18;
font = "Arial";
bold = true;
};
keycode = new Array();
elisten = false;
stage.addEventListener(KeyboardEvent.KEY_UP, keyup);
stage.addEventListener(KeyboardEvent.KEY_DOWN, key);
format = new TextFormat();
_local2 = format;
with (_local2) {
color = 0xFFFFFF;
size = 15;
font = "Arial";
bold = true;
};
format.underline = false;
right = new TextFormat();
right.align = "right";
underline = new TextFormat();
underline.underline = true;
unbold = new TextFormat();
unbold.bold = false;
mytext = new TextField();
mytext.antiAliasType = AntiAliasType.ADVANCED;
mytext.selectable = false;
mytext.mouseEnabled = true;
mytext.defaultTextFormat = format;
mytext.filters = [shadow];
map = new Sprite();
mapzoom = 0.4;
hrtgd = (128 * mapzoom);
inmap = new Shape();
mapsquares = new Array();
mapbit = new BitmapData((hrtgd + 1), (hrtgd + 1), false, 4476517);
_local2 = inmap.graphics;
with (_local2) {
lineStyle(1, 6578837);
lineTo(0, hrtgd);
lineTo(hrtgd, hrtgd);
lineTo(hrtgd, 0);
lineTo(0, 0);
};
mapbit.draw(inmap);
if (so.data.map == 1){
addChildAt(map, 0);
mapon = true;
dismap = makelink("disable backmap");
} else {
dismap = makelink("enable backmap");
};
dismap.spr.x = (stage.stageWidth - 230);
addChild(dismap.spr);
dismap.spr.addEventListener(MouseEvent.MOUSE_DOWN, jkfhjhfjh);
keyjump = 10;
sendit = new Sprite();
sendtext = new TextField();
sendit.addChild(sendtext);
_local2 = sendtext;
with (_local2) {
antiAliasType = AntiAliasType.ADVANCED;
autoSize = TextFieldAutoSize.CENTER;
selectable = false;
mouseEnabled = true;
defaultTextFormat = format;
filters = [shadow];
text = "add a picture\n<spacebar>";
};
sendtext.setTextFormat(right);
sendit.x = ((stage.stageWidth - sendtext.textWidth) - 5);
addChild(sendit);
sendit.addEventListener(MouseEvent.MOUSE_OVER, sendover);
sendit.addEventListener(MouseEvent.MOUSE_OUT, sendout);
mess = maketext();
mess.y = 50;
red = new ColorTransform(20, 0.5, 5);
neutral = new ColorTransform(1, 1, 1);
cover = new Sprite();
coversquare = makesquare(0, 0, stage.stageWidth, stage.stageHeight, 0, 0);
cover.buttonMode = true;
cover.useHandCursor = false;
cover.addChild(coversquare);
boxborder = new Array();
addbox = new Sprite();
addsquare = new Shape();
addbox.x = mouseX;
addbox.y = mouseY;
addbox.addChild(addsquare);
_local2 = addsquare.graphics;
with (_local2) {
lineStyle(1, 8978363);
lineTo(128, 0);
lineTo(128, 128);
lineTo(0, 128);
lineTo(0, 0);
lineTo(128, 128);
moveTo(0, 128);
lineTo(128, 0);
};
collide = false;
boxed = new Array();
stageon();
smmove = 0.3;
inc = 2;
maxmove = 5;
bigwidth = ((stage.stageWidth - (stage.stageWidth * mapzoom)) + stage.stageWidth);
bigheight = ((stage.stageHeight - (stage.stageHeight * mapzoom)) + stage.stageHeight);
trace(bigheight);
boxfade = new Array();
boxfadeout = new Array();
blurred = new Array();
border = 80;
square = new Shape();
square.graphics.beginFill(68, 0.4);
square.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
square.graphics.endFill();
pictLdr2 = new Loader();
mover = new Sprite();
filenamebox = new Sprite();
filename = maketext();
filename.selectable = true;
stopclicks(filename);
filenamebox.addChild(filename);
overprogress = new Sprite();
overprogresstext = maketext();
overprogresstext.filters = [];
overprogress.addChild(overprogresstext);
download = makelink("[download]");
download.spr.addEventListener(MouseEvent.MOUSE_DOWN, downclick);
updatepos(true);
usercount = maketext();
usercount.y = (stage.stageHeight - 20);
usercount.text = ("users: " + whole[5]);
addChild(usercount);
usercount.visible = false;
mtimer = new Timer(10000, 0);
mtimer.addEventListener(TimerEvent.TIMER, mtimerh);
mtimer.start();
chat = {intext:makeinput(300), inname:makeinput(), inbox:new Sprite(), box:new Sprite(), txt:maketext(), size:150, sending:new String(), nam:new Array(), messages:new Array(), codes:new Array(), disable:makelink()};
if (so.data.chat == null){
chat.disable.txt.text = "disable chat";
} else {
chat.disable.txt.text = "enable chat";
};
chat.disable.spr.addEventListener(MouseEvent.MOUSE_DOWN, dfghgdh);
_local2 = chat;
with (_local2) {
box.y = (stage.stageHeight - chat.size);
var _local3 = intext.txt;
with (_local3) {
maxChars = 90;
text = "chat";
addEventListener(MouseEvent.MOUSE_DOWN, eraseclick);
};
_local3 = inname.txt;
with (_local3) {
maxChars = 15;
if (((!((so.data.name == null))) && (!((so.data.name == ""))))){
text = so.data.name;
} else {
text = "Anon";
addEventListener(MouseEvent.MOUSE_DOWN, eraseclick);
};
};
intext.spr.x = (chat.inname.spr.width + 5);
inbox.y = (chat.size - 17);
};
stopclicks(chat.intext.spr);
stopclicks(chat.inname.spr);
addChild(chat.box);
chat.box.addChild(chat.txt);
chat.box.addChild(chat.inbox);
chat.inbox.addChild(chat.intext.spr);
chat.inbox.addChild(chat.inname.spr);
chat.txt.width = chat.box.width;
addChild(chat.disable.spr);
usercount.x = (chat.inbox.width + 10);
chat.disable.spr.x = ((chat.box.width + usercount.width) + 30);
chat.disable.spr.y = (stage.stageHeight - chat.disable.spr.height);
removeChild(usermouse);
coordclick = makelink();
coordclick.spr.addEventListener(MouseEvent.MOUSE_DOWN, cxgvb547);
addChild(coordclick.spr);
coords = new Sprite();
coords.y = 20;
coordtext = maketext("x-\ny-");
coord1 = makeinput(50);
coord2 = makeinput(50);
coord1.spr.x = 20;
coord1.spr.y = 4;
coord2.spr.x = 20;
coord2.spr.y = 22;
coords.addChild(coordtext);
coords.addChild(coord1.spr);
coords.addChild(coord2.spr);
coord1.txt.addEventListener(FocusEvent.FOCUS_IN, coordin);
coord2.txt.addEventListener(FocusEvent.FOCUS_IN, coordin);
coord1.txt.addEventListener(FocusEvent.FOCUS_OUT, coordout2);
coord2.txt.addEventListener(FocusEvent.FOCUS_OUT, coordout2);
coordgo = makelink("go");
coordgo.spr.y = 35;
coordgo.spr.x = 25;
coords.addChild(coordgo.spr);
coordgo.spr.visible = false;
if (so.data.coord == 1){
coordclick.txt.text = "hide coordinates";
addChild(coords);
} else {
coordclick.txt.text = "show coordinates";
};
coordgo.spr.addEventListener(MouseEvent.MOUSE_OVER, ongo1);
coordgo.spr.addEventListener(MouseEvent.MOUSE_OUT, offgo);
coordgo.spr.addEventListener(MouseEvent.MOUSE_UP, coordgoer);
helpon = "Click and drag to move, or use arrow keys\nTo save a picture, click it, then click [download] at the upper left\nPress <spacebar> to add an image\n";
if (loaderInfo.parameters.grid == "exp"){
helpon = (helpon + "Only expansion-related pictures\n");
} else {
if (loaderInfo.parameters.grid == "art"){
} else {
helpon = (helpon + "Anyone posting or requesting illegal images will have their IP forwarded to authorities\n");
};
};
helpon = (helpon + "Try to group similar images\nPress 'g' to go to the most recent image\nPress 'h' to hide these messages");
helpoff = "Press 'h' for help";
helptext = maketext();
helptext.autoSize = TextFieldAutoSize.RIGHT;
if (so.data.help == 1){
helptext.text = helpoff;
} else {
helptext.text = helpon;
};
alignhelp();
addChild(helptext);
mapnjkscxz = makelink("view map");
mapnjkscxz.spr.x = (stage.stageWidth - 320);
mapnjkscxz.spr.addEventListener(MouseEvent.CLICK, clicknjzxc);
if (loaderInfo.parameters.grid != "art"){
addChild(mapnjkscxz.spr);
};
borderndjkxcv = 20;
bigmap = {zoom:((stage.stageHeight - borderndjkxcv) / downmost), size:null, shape:null, squares:new Array(), squarebit:null, map:new Sprite(), mouse:new Shape(), mousesize:null, mousehalf:null, current:null, txt:makelink("click anywhere to go. Click here to cancel")};
_local2 = bigmap;
with (_local2) {
mousesize = Math.ceil((stage.stageHeight * zoom));
mousehalf = Math.floor((mousesize / 2));
};
centerx(bigmap.txt.spr);
messager("New change - you can add pictures past 10,000x-y now", 15000);
}
public function stagemouse(_arg1:MouseEvent):void{
if ((((((((mouseX > 0)) && ((mouseX < stage.stageWidth)))) && ((mouseY > 0)))) && ((mouseY < stage.stageHeight)))){
xmove = (mouseX - lmousex);
ymove = (mouseY - lmousey);
if (xmove > maxmove){
xmove = maxmove;
} else {
if (xmove < -(maxmove)){
xmove = -(maxmove);
};
};
if (ymove > maxmove){
ymove = maxmove;
} else {
if (ymove < -(maxmove)){
ymove = -(maxmove);
};
};
screenx = (screenx + xmove);
screeny = (screeny + ymove);
lmousex = mouseX;
lmousey = mouseY;
updatepos();
};
}
public function hand(_arg1:Event){
whole = loader.data.split("\n");
raw2 = whole[0];
ip = whole[1];
browser = whole[2];
time = whole[3];
host = whole[4];
mod = int(whole[5]);
loader.removeEventListener(Event.COMPLETE, hand);
nextFrame();
}
public function mtimerh(_arg1:Event):void{
update();
}
public function movex4fcv468(_arg1:Event):void{
bigmap.mouse.x = (mouseX - bigmap.mousehalf);
bigmap.mouse.y = (mouseY - bigmap.mousehalf);
if (bigmap.mouse.y < borderndjkxcv){
bigmap.mouse.y = borderndjkxcv;
} else {
if (bigmap.mouse.y > (stage.stageHeight - bigmap.mousesize)){
bigmap.mouse.y = (stage.stageHeight - bigmap.mousesize);
};
};
if (bigmap.mouse.x > ((bigmap.map.width + bigmap.map.x) - bigmap.mousesize)){
bigmap.mouse.x = ((bigmap.map.width + bigmap.map.x) - bigmap.mousesize);
} else {
if (bigmap.mouse.x < bigmap.map.x){
bigmap.mouse.x = bigmap.map.x;
};
};
}
public function makesquare(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:uint, _arg6:Number=0):Shape{
var mcjkxv:Shape;
var x = _arg1;
var y = _arg2;
var w = _arg3;
var h = _arg4;
var c = _arg5;
var a = _arg6;
mcjkxv = new Shape();
if (a > 0){
mcjkxv.graphics.beginFill(c, a);
} else {
mcjkxv.graphics.beginFill(c);
};
var _local8 = mcjkxv.graphics;
with (_local8) {
drawRect(x, y, w, h);
endFill();
};
return (mcjkxv);
}
public function gotonjskzxc(_arg1:Event):void{
if (mouseY < 21){
offbigmap();
} else {
screenx = Math.ceil(((bigmap.mouse.x - bigmap.map.x) / bigmap.zoom));
screeny = Math.ceil(((bigmap.mouse.y - borderndjkxcv) / bigmap.zoom));
offbigmap();
updatepos();
};
}
public function togglehelp(){
if (so.data.help == null){
helptext.text = helpoff;
so.data.help = 1;
} else {
helptext.text = helpon;
so.data.help = null;
};
alignhelp();
}
public function rep(_arg1:String, _arg2:String, _arg3:String):String{
var _local4:*;
_local4 = 0;
while (_local4 < 40) {
if (_arg1.indexOf(_arg2) != -1){
_arg1 = _arg1.replace(_arg2, _arg3);
};
_local4++;
};
return (_arg1);
}
public function moveit(_arg1:Event):void{
moveit2();
}
public function update(_arg1:Boolean=false){
var req2:URLRequest;
var variables:URLVariables;
var ldr:URLLoader;
var ioErrorHandler:Function;
var mcomplete:Function;
var up = _arg1;
ioErrorHandler = function (_arg1:Event):void{
mtimer.reset();
mtimer.start();
};
mcomplete = function (_arg1:Event):void{
var _local2:URLLoader;
var _local3:Array;
var _local4:*;
var _local5:*;
var _local6:Array;
_local2 = URLLoader(_arg1.target);
_local3 = _local2.data.split("\n");
time = _local3[0];
usercount.visible = true;
usercount.text = ("users: " + _local3[2]);
if (chat.sending != ""){
chat.intext.txt.text = "";
chat.intext.txt.type = TextFieldType.INPUT;
chat.inname.txt.type = TextFieldType.INPUT;
chat.sending = "";
};
if (_local3[3] != ""){
_local4 = _local3[3].split(";");
i = 0;
while (i < _local4.length) {
_local5 = _local4[i].split(",");
if (_local5[0] == ""){
chat.nam.push("Anon");
} else {
chat.nam.push(_local5[0]);
};
chat.messages.push(_local5[1]);
chat.codes.push(_local5[2]);
chatupdate();
i++;
};
};
if (_local3[1] != ""){
_local3 = _local3[1].split(";");
_local6 = new Array();
i = 0;
while (i < _local3.length) {
_local6 = _local3[i].split(",");
file.push(_local6[0]);
posx.push(_local6[1]);
posy.push(_local6[2]);
added.push(false);
if (up == false){
messager("New picture added. Press 'g' to go to it");
};
downmost = (downmost + 64);
rightmost = (rightmost + 64);
if (downmost > space){
downmost = space;
};
if (rightmost > space){
rightmost = space;
};
i++;
};
};
updatepos(true);
mtimer.reset();
mtimer.start();
};
mtimer.stop();
mtimer.reset();
req2 = new URLRequest((dir + "request.php"));
req2.method = URLRequestMethod.POST;
variables = new URLVariables();
variables.mytime = time;
variables.ip = ip;
if (chat.inname.txt.text == "name"){
variables.myname = "";
} else {
variables.myname = chat.inname.txt.text;
so.data.name = chat.inname.txt.text;
};
if (chat.sending != ""){
variables.chat = chat.sending;
chat.intext.txt.text = "sending...";
chat.intext.txt.type = TextFieldType.DYNAMIC;
chat.inname.txt.type = TextFieldType.DYNAMIC;
chat.nam.push(variables.myname);
chat.messages.push(chat.sending);
chat.codes.push(" ");
chatupdate();
};
req2.data = variables;
ldr = new URLLoader();
ldr.load(req2);
ldr.addEventListener(Event.COMPLETE, mcomplete);
ldr.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
}
public function secondbox(_arg1:int){
boxadd(_arg1);
}
public function cancelall(){
stageon();
sendtext.text = "add a picture\n<spacebar>";
adding = false;
removeChild(addbox);
i = 0;
while (i < boxed.length) {
box[boxed[i]].removeChildAt(0);
i++;
};
stage.removeEventListener(KeyboardEvent.KEY_DOWN, key2);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, addmove);
stage.removeEventListener(MouseEvent.MOUSE_UP, addup);
mtimer.stop();
mtimer.reset();
}
public function updatepos(_arg1:Boolean=false){
var _local2:int;
if ((((((((((screenx < screenxblock)) || ((screenx > (screenxblock + stage.stageWidth))))) || ((screeny < screenyblock)))) || ((screeny > (screenyblock + stage.stageHeight))))) || ((_arg1 == true)))){
onscreen.length = 0;
screenxblock = (screenx - (stage.stageWidth / 2));
screenyblock = (screeny - (stage.stageHeight / 2));
i = 0;
while (i < file.length) {
if ((((((((posx[i] > screenxblock)) && ((posy[i] > screenyblock)))) && ((posx[i] < (screenxblock + (stage.stageWidth * 2)))))) && ((posy[i] < (screenyblock + (stage.stageHeight * 2)))))){
onscreen.push(i);
if (added[i] == false){
boxadd(i);
};
box[i].visible = true;
} else {
if (box[i] != null){
box[i].visible = false;
};
};
if (so.data.map == 1){
if ((((((((posx[i] > (screenxblock - screenxblock))) && ((posy[i] > (screenyblock - screenyblock))))) && ((posx[i] < ((screenxblock + (stage.stageWidth * 2)) + stage.stageWidth))))) && ((posy[i] < ((screenyblock + (stage.stageHeight * 2)) + stage.stageHeight))))){
if (mapsquares[i] == null){
mapsquares[i] = new Bitmap(mapbit);
map.addChild(mapsquares[i]);
};
mapsquares[i].x = ((stage.stageWidth / 2) - (((stage.stageWidth / 2) - (posx[i] - screenx)) * mapzoom));
mapsquares[i].y = ((stage.stageHeight / 2) - (((stage.stageHeight / 2) - (posy[i] - screeny)) * mapzoom));
};
};
i++;
};
map.x = 0;
map.y = 0;
spotx = screenx;
spoty = screeny;
};
if (screenx < 0){
screenx = 0;
} else {
if (screenx > rightmost){
screenx = rightmost;
};
};
if (screeny > downmost){
screeny = downmost;
} else {
if (screeny < 0){
screeny = 0;
};
};
if ((screenx + stage.stageWidth) > space){
screenx = (space - stage.stageWidth);
};
if ((screeny + stage.stageHeight) > space){
screeny = (space - stage.stageHeight);
};
if (mapon){
map.x = ((spotx - screenx) * mapzoom);
map.y = ((spoty - screeny) * mapzoom);
};
i = 0;
while (i < onscreen.length) {
box[onscreen[i]].x = ((posx[onscreen[i]] * stagezoom) - screenx);
box[onscreen[i]].y = ((posy[onscreen[i]] * stagezoom) - screeny);
i++;
};
if (coords != null){
if (((contains(coords)) && ((pausecoords == false)))){
coord1.txt.text = screenx;
coord2.txt.text = screeny;
};
};
}
public function linkout(_arg1:Event):void{
_arg1.currentTarget.getChildAt(0).setTextFormat(format);
}
public function textoff(){
mapnjkscxz.spr.visible = false;
chat.inname.spr.visible = false;
chat.intext.spr.visible = false;
chat.disable.spr.visible = false;
dismap.spr.visible = false;
sendit.visible = false;
coords.visible = false;
coordclick.spr.visible = false;
helptext.visible = false;
}
public function getover(){
i = 0;
while (i < onscreen.length) {
if ((((box[onscreen[i]].x > (mouseX - 128))) && ((box[onscreen[i]].x < mouseX)))){
if ((((box[onscreen[i]].y > (mouseY - 128))) && ((box[onscreen[i]].y < mouseY)))){
return (onscreen[i]);
};
};
i++;
};
return (-1);
}
public function clicknjzxc(_arg1:Event):void{
initbigmap();
}
public function fxgh(_arg1:Event):void{
_arg1.currentTarget.alpha = 1;
}
public function drag(_arg1:MouseEvent):void{
if (onsend == true){
if (adding == false){
addpic();
} else {
cancelall();
};
} else {
downx = mouseX;
downy = mouseY;
if (adding == false){
stage.addEventListener(MouseEvent.MOUSE_MOVE, stagemove);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, stagemouse);
stage.addEventListener(MouseEvent.MOUSE_UP, noDrag);
};
lmousex = mouseX;
lmousey = mouseY;
movestage = true;
};
}
public function keyup(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == 38){
keycode[0] = false;
};
if (_arg1.keyCode == 39){
keycode[1] = false;
};
if (_arg1.keyCode == 40){
keycode[2] = false;
};
if (_arg1.keyCode == 37){
keycode[3] = false;
};
if (((((((!(keycode[0])) && (!(keycode[1])))) && (!(keycode[2])))) && (!(keycode[3])))){
removeEventListener(Event.ENTER_FRAME, eframe);
elisten = false;
};
}
public function overclick(_arg1:Event):void{
if (ondown == false){
mover.removeChild(filenamebox);
mover.removeChild(download.spr);
mover.removeChild(pictLdr2.content);
pictLdr2 = new Loader();
removeChild(mover);
overoff();
};
}
public function difference(_arg1:int, _arg2:int){
if (_arg1 > _arg2){
return ((_arg1 - _arg2));
};
return ((_arg2 - _arg1));
}
public function addpic():void{
stageoff();
update();
boxed.length = 0;
sendtext.text = "cancel\n<spacebar>";
addChild(addbox);
adding = true;
i = 0;
while (i < onscreen.length) {
boxborder[onscreen[i]] = new Shape();
var _local2 = boxborder[onscreen[i]].graphics;
with (_local2) {
lineStyle(1, 8978363);
lineTo(128, 0);
lineTo(128, 128);
lineTo(0, 128);
lineTo(0, 0);
};
box[onscreen[i]].addChildAt(boxborder[onscreen[i]], 0);
boxed.push(onscreen[i]);
i++;
};
colcheck();
stage.addEventListener(MouseEvent.MOUSE_MOVE, addmove);
stage.addEventListener(KeyboardEvent.KEY_DOWN, key2);
stage.addEventListener(MouseEvent.MOUSE_UP, addup);
}
public function messager(_arg1:String, _arg2:Number=8000){
var timerHandler:Function;
var str = _arg1;
var mil = _arg2;
timerHandler = function (_arg1:Event):void{
if (contains(mess)){
removeChild(mess);
};
};
mess.text = str;
centerx(mess);
addChild(mess);
messTimer = new Timer(mil, 1);
messTimer.addEventListener(TimerEvent.TIMER, timerHandler);
messTimer.reset();
messTimer.start();
messaging = true;
}
public function stageon(){
stage.addEventListener(KeyboardEvent.KEY_UP, keyup);
stage.addEventListener(KeyboardEvent.KEY_DOWN, key);
stage.addEventListener(MouseEvent.MOUSE_DOWN, drag);
stage.addEventListener(MouseEvent.MOUSE_MOVE, stagemouse);
}
public function initbigmap(){
stageoff();
blurit();
textoff();
addChild(square);
var _local2 = bigmap;
with (_local2) {
var _local3 = mouse.graphics;
with (_local3) {
lineStyle(1, 0xFFFFFF);
lineTo(0, mousesize);
lineTo(mousesize, mousesize);
lineTo(mousesize, 0);
lineTo(0, 0);
};
current = makesquare(0, 0, mousesize, mousesize, 0xFFFFFF, 0.5);
size = Math.ceil((bigmap.zoom * 128));
squarebit = new BitmapData(bigmap.size, bigmap.size, false, 0);
shape = makesquare(0, 0, bigmap.size, bigmap.size, 7898530);
squarebit.draw(bigmap.shape);
map.y = borderndjkxcv;
mouse.x = (mouseX - bigmap.mousehalf);
mouse.y = 20;
};
i = 0;
while (i < file.length) {
bigmap.squares[i] = new Bitmap(bigmap.squarebit);
bigmap.squares[i].x = Math.floor((posx[i] * bigmap.zoom));
bigmap.squares[i].y = Math.floor((posy[i] * bigmap.zoom));
bigmap.map.addChild(bigmap.squares[i]);
i++;
};
centerx(bigmap.map);
bigmap.current.x = ((screenx * bigmap.zoom) + bigmap.map.x);
bigmap.current.y = ((screeny * bigmap.zoom) + bigmap.map.y);
stage.addEventListener(MouseEvent.MOUSE_MOVE, movex4fcv468);
stage.addEventListener(MouseEvent.MOUSE_DOWN, gotonjskzxc);
addChild(bigmap.txt.spr);
addChild(bigmap.map);
addChild(bigmap.mouse);
addChild(bigmap.current);
}
public function xfhfg(_arg1:Event):void{
_arg1.currentTarget.alpha = 1;
}
public function stageoff(){
stage.removeEventListener(KeyboardEvent.KEY_UP, keyup);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, key);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, drag);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, stagemouse);
}
public function key2(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == 32){
mtimer.start();
cancelall();
};
}
public function modmove():void{
var over:int;
var movenjsdkcv:Function;
var clicknjsdkcv:Function;
over = getover();
if (over != -1){
movenjsdkcv = function (_arg1:Event):void{
box[over].x = mouseX;
box[over].y = mouseY;
};
clicknjsdkcv = function (_arg1:Event):void{
var req2:URLRequest;
var variables:URLVariables;
var ldr:URLLoader;
var delioErrorHandler:Function;
var delmcomplete:Function;
var e = _arg1;
delioErrorHandler = function (_arg1:Event):void{
messager("error");
mtimer.start();
stage.addEventListener(MouseEvent.MOUSE_UP, noDrag);
};
delmcomplete = function (_arg1:Event):void{
messager(("moved - " + ldr.data));
mtimer.start();
stage.addEventListener(MouseEvent.MOUSE_UP, noDrag);
};
posx[over] = (mouseX + screenx);
posy[over] = (mouseY + screeny);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, clicknjsdkcv);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, movenjsdkcv);
stage.removeEventListener(KeyboardEvent.KEY_UP, keyup);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, key);
stageon();
mtimer.stop();
mtimer.reset();
req2 = new URLRequest((dir + "request.php"));
req2.method = URLRequestMethod.POST;
variables = new URLVariables();
variables.mod = "move";
variables.xx = (mouseX + screenx);
variables.yy = (mouseY + screeny);
variables.which = file[over];
req2.data = variables;
ldr = new URLLoader();
ldr.load(req2);
ldr.addEventListener(Event.COMPLETE, delmcomplete);
ldr.addEventListener(IOErrorEvent.IO_ERROR, delioErrorHandler);
};
stageoff();
stage.addEventListener(KeyboardEvent.KEY_UP, keyup);
stage.addEventListener(KeyboardEvent.KEY_DOWN, key);
stage.removeEventListener(MouseEvent.MOUSE_UP, noDrag);
stage.addEventListener(MouseEvent.MOUSE_MOVE, movenjsdkcv);
stage.addEventListener(MouseEvent.MOUSE_DOWN, clicknjsdkcv);
};
}
public function coordgoto(){
coordout();
screenx = int(coord1.txt.text);
screeny = int(coord2.txt.text);
updatepos();
coordgo.spr.visible = false;
ongo = false;
pausecoords = false;
}
public function ongo1(_arg1:Event):void{
ongo = true;
}
public function chatupdate():void{
chat.txt.text = "";
i = 1;
while ((((i <= chat.messages.length)) && ((i <= 7)))) {
if (chat.messages[(chat.messages.length - i)] != null){
chat.messages[(chat.messages.length - i)] = rep(chat.messages[(chat.messages.length - i)], "%c", ",");
chat.messages[(chat.messages.length - i)] = rep(chat.messages[(chat.messages.length - i)], "%s", ";");
chat.txt.text = (chat.txt.text + (((chat.nam[(chat.messages.length - i)] + ": ") + chat.messages[(chat.messages.length - i)]) + "\n"));
};
i++;
};
}
public function downclick(_arg1:Event):void{
navigateToURL(new URLRequest(((dir + "dl.php?u=") + file[ondisplay])), "_self");
}
public function jkfhjhfjh(_arg1:Event):void{
if (dismap.txt.text == "disable backmap"){
dismap.txt.text = "enable backmap";
removeChild(map);
mapon = false;
so.data.map = null;
} else {
dismap.txt.text = "disable backmap";
addChildAt(map, 0);
mapon = true;
so.data.map = 1;
updatepos();
};
}
public function key(_arg1:KeyboardEvent):void{
if ((((stage.focus == chat.intext.txt)) || ((stage.focus == chat.inname.txt)))){
if (_arg1.keyCode == 13){
chat.sending = chat.intext.txt.text;
update();
};
} else {
if ((((stage.focus == coord1.txt)) || ((stage.focus == coord2.txt)))){
if (_arg1.keyCode == 13){
coordgoto();
};
} else {
if (mod == 1){
if (_arg1.keyCode == 68){
moddelete();
};
if (_arg1.keyCode == 79){
modmove();
};
};
if (_arg1.keyCode == 71){
screenx = ((64 + int(posx[(posx.length - 1)])) - (stage.stageWidth / 2));
screeny = ((64 + int(posy[(posy.length - 1)])) - (stage.stageHeight / 2));
updatepos();
};
if (_arg1.keyCode == 72){
togglehelp();
};
if (_arg1.keyCode == 189){
stagezoom = (stagezoom / 2);
updatezoom();
};
if ((((_arg1.keyCode > 36)) && ((_arg1.keyCode < 41)))){
if (!elisten){
addEventListener(Event.ENTER_FRAME, eframe);
elisten = true;
};
if (_arg1.keyCode == 38){
keycode[0] = true;
};
if (_arg1.keyCode == 39){
keycode[1] = true;
};
if (_arg1.keyCode == 40){
keycode[2] = true;
};
if (_arg1.keyCode == 37){
keycode[3] = true;
};
};
if ((((_arg1.keyCode == 32)) && ((adding == false)))){
addpic();
};
};
};
}
public function stopclicks(_arg1):void{
_arg1.addEventListener(MouseEvent.MOUSE_OVER, stopover);
_arg1.addEventListener(MouseEvent.MOUSE_OUT, stopout);
}
public function unblur(){
i = 0;
while (i < blurred.length) {
box[blurred[i]].filters = [];
i++;
};
}
public function noDrag(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, stagemove);
stage.addEventListener(MouseEvent.MOUSE_MOVE, stagemouse);
stage.removeEventListener(MouseEvent.MOUSE_UP, noDrag);
movestage = false;
if (ondown == false){
if (adding == false){
if ((difference(mouseX, downx) + difference(mouseY, downy)) < 4){
i = 0;
while (i < onscreen.length) {
if ((((box[onscreen[i]].x > (mouseX - 128))) && ((box[onscreen[i]].x < mouseX)))){
if ((((box[onscreen[i]].y > (mouseY - 128))) && ((box[onscreen[i]].y < mouseY)))){
overlay(onscreen[i]);
break;
};
};
i++;
};
};
};
};
}
public function offgo(_arg1:Event):void{
ongo = false;
}
public function offbigmap(){
unblur();
stage.removeEventListener(MouseEvent.MOUSE_DOWN, gotonjskzxc);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, movex4fcv468);
removeChild(bigmap.mouse);
removeChild(bigmap.txt.spr);
removeChild(bigmap.map);
removeChild(bigmap.current);
removeChild(square);
texton();
stageon();
}
public function makeinput(_arg1:int=70):Object{
var obj:Object;
var size = _arg1;
obj = {spr:new Sprite(), shape:new Shape(), txt:new TextField()};
var _local3 = obj.txt;
with (_local3) {
antiAliasType = AntiAliasType.ADVANCED;
width = size;
type = TextFieldType.INPUT;
wordWrap = false;
height = 17;
};
_local3 = obj.shape;
with (_local3) {
graphics.beginFill(0xFFFFFF, 1);
graphics.drawRect(0, 0, size, 17);
graphics.endFill();
};
_local3 = obj.spr;
with (_local3) {
addEventListener(MouseEvent.MOUSE_OVER, fxgh);
addEventListener(MouseEvent.MOUSE_OUT, ghcjb);
addEventListener(FocusEvent.FOCUS_OUT, cvhnbv);
addEventListener(FocusEvent.FOCUS_IN, xfhfg);
alpha = 0.5;
addChild(obj.shape);
addChild(obj.txt);
};
return (obj);
}
public function eraseclick(_arg1:Event):void{
_arg1.currentTarget.text = "";
_arg1.currentTarget.removeEventListener(MouseEvent.MOUSE_DOWN, eraseclick);
}
public function centerx(_arg1){
_arg1.x = ((stage.stageWidth / 2) - (_arg1.width / 2));
}
public function centery(_arg1){
_arg1.y = ((stage.stageHeight / 2) - (_arg1.height / 2));
}
public function sendout(_arg1:Event):void{
sendtext.setTextFormat(format);
onsend = false;
}
public function cvhnbv(_arg1:Event):void{
_arg1.currentTarget.alpha = 0.5;
}
public function coordin(_arg1:Event):void{
pausecoords = true;
coordgo.spr.visible = true;
stageoff();
stage.addEventListener(KeyboardEvent.KEY_DOWN, key);
}
public function makelink(_arg1:String=""):Object{
var _local2:Object;
_local2 = {spr:new Sprite(), txt:maketext(_arg1)};
_local2.spr.addChild(_local2.txt);
_local2.spr.addEventListener(MouseEvent.MOUSE_OVER, linkover);
_local2.spr.addEventListener(MouseEvent.MOUSE_OUT, linkout);
stopclicks(_local2.spr);
return (_local2);
}
public function boxadd(_arg1:int){
var pictLdr:Loader;
var pictURLReq:URLRequest;
var ioErrorHandler:Function;
var imgLoaded:Function;
var a = _arg1;
ioErrorHandler = function (_arg1:IOErrorEvent):void{
};
imgLoaded = function (_arg1:Event):void{
box[a].addChild(pictLdr.content);
pictLdr.content.x = (Math.ceil((64 - (box[a].width / 2))) + imgborder);
pictLdr.content.y = (Math.ceil((64 - (box[a].height / 2))) + imgborder);
box[a].width = (box[a].width * stagezoom);
box[a].height = (box[a].height * stagezoom);
};
added[a] = true;
box[a] = new Sprite();
if (mapon){
addChildAt(box[a], 2);
} else {
addChildAt(box[a], 0);
};
pictLdr = new Loader();
pictURLReq = new URLRequest(((dir + "prev/") + file[a].replace(".png", ".jpg")));
pictLdr.load(pictURLReq);
pictLdr.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoaded);
pictLdr.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
}
public function moveit2(){
if ((((((((mouseX > 0)) && ((mouseX < stage.stageWidth)))) && ((mouseY > 0)))) && ((mouseY < stage.stageHeight)))){
if ((mover.width + border) > stage.stageWidth){
mover.x = (-(((mouseX / stage.stageWidth) * ((mover.width + (border * 2)) - stage.stageWidth))) + border);
};
if ((mover.height + border) > stage.stageHeight){
mover.y = (-(((mouseY / stage.stageHeight) * ((mover.height + (border * 2)) - stage.stageHeight))) + border);
};
};
if ((mover.width + border) < stage.stageWidth){
mover.x = Math.ceil(((stage.stageWidth - mover.width) / 2));
} else {
mover.x = (-(((mouseX / stage.stageWidth) * ((mover.width + (border * 2)) - stage.stageWidth))) + border);
};
if ((mover.height + border) < stage.stageHeight){
mover.y = Math.ceil(((stage.stageHeight - mover.height) / 2));
} else {
mover.y = (-(((mouseY / stage.stageHeight) * ((mover.height + (border * 2)) - stage.stageHeight))) + border);
};
}
public function addup(_arg1:Event):void{
var imageFilter:FileFilter;
var req:URLRequest;
var variables:URLVariables;
var ref:FileReference;
var addcancel:Function;
var addselect:Function;
var addprogress:Function;
var addcomplete:Function;
var event = _arg1;
if (collide == false){
addcancel = function (_arg1:Event):void{
mtimer.start();
cancelall();
stageon();
};
addselect = function (_arg1:Event):void{
var event = _arg1;
if (ref.size > 1500000){
mess.text = "file must be under 1.5 MB";
mtimer.start();
cancelall();
} else {
lmousex = mouseX;
lmousey = mouseY;
mess.text = "sending";
centerx(mess);
addChild(mess);
cancelall();
stageon();
ref.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA, addcomplete);
ref.addEventListener(ProgressEvent.PROGRESS, addprogress);
try {
ref.upload(req);
} catch(e:ArgumentError) {
mess.text = "upload fuckup";
mtimer.start();
};
};
};
addprogress = function (_arg1:ProgressEvent):void{
if (_arg1.bytesLoaded == _arg1.bytesTotal){
mess.text = "checking file...";
} else {
mess.text = ((("sending - " + _arg1.bytesLoaded) + " of ") + _arg1.bytesTotal);
};
};
addcomplete = function (_arg1:DataEvent):void{
var myTimer:Timer;
var timerHandler:Function;
var e = _arg1;
if (e.data.length == 2){
timerHandler = function (_arg1:Event):void{
var myTimer2:Timer;
var timerHandler2:Function;
var event = _arg1;
timerHandler2 = function (_arg1:Event):void{
if (contains(mess)){
removeChild(mess);
};
mtimer.start();
};
update(true);
myTimer2 = new Timer(8000, 1);
myTimer2.addEventListener(TimerEvent.TIMER, timerHandler2);
myTimer2.start();
};
mess.text = "updating the Grid";
myTimer = new Timer(2000, 1);
myTimer.addEventListener(TimerEvent.TIMER, timerHandler);
myTimer.start();
} else {
messager(e.data);
};
};
mtimer.reset();
stage.removeEventListener(MouseEvent.MOUSE_UP, addup);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, addmove);
imageFilter = new FileFilter("Image Files (*.jpg, *.jpeg, *.gif, *.png)", "*.jpg; *.jpeg; *.gif; *.png");
req = new URLRequest((dir + "request.php"));
req.method = URLRequestMethod.POST;
variables = new URLVariables();
variables.vx = (addbox.x + screenx);
variables.vy = (addbox.y + screeny);
variables.ip = ip;
req.data = variables;
ref = new FileReference();
ref.browse([imageFilter]);
ref.addEventListener(Event.CANCEL, addcancel);
ref.addEventListener(Event.SELECT, addselect);
};
}
public function coordout2(_arg1:Event):void{
coordout();
}
public function moddelete():void{
var over:int;
var req2:URLRequest;
var variables:URLVariables;
var ldr:URLLoader;
var delioErrorHandler:Function;
var delmcomplete:Function;
over = getover();
if (over != -1){
delioErrorHandler = function (_arg1:Event):void{
messager("error");
mtimer.start();
};
delmcomplete = function (_arg1:Event):void{
messager(("delete -" + ldr.data));
mtimer.start();
};
mtimer.stop();
mtimer.reset();
req2 = new URLRequest((dir + "request.php"));
req2.method = URLRequestMethod.POST;
variables = new URLVariables();
variables.mod = "del";
variables.which = file[over];
req2.data = variables;
ldr = new URLLoader();
ldr.load(req2);
ldr.addEventListener(Event.COMPLETE, delmcomplete);
ldr.addEventListener(IOErrorEvent.IO_ERROR, delioErrorHandler);
};
}
public function collision(_arg1:int, _arg2:int, _arg3:int, _arg4:int){
if ((((((((_arg1 >= (_arg3 - 128))) && ((_arg1 <= (_arg3 + 128))))) && ((_arg2 <= (_arg4 + 128))))) && ((_arg2 >= (_arg4 - 128))))){
return (true);
};
return (false);
}
public function dfghgdh(_arg1:Event):void{
if (so.data.chat == null){
chat.box.visible = false;
so.data.chat = 1;
chat.disable.txt.text = "enable chat";
} else {
chat.box.visible = true;
so.data.chat = null;
chat.disable.txt.text = "disable chat";
};
}
public function colcheck(){
collide = false;
i = 0;
while (i < onscreen.length) {
if (collision((posx[onscreen[i]] - screenx), (posy[onscreen[i]] - screeny), addbox.x, addbox.y)){
collide = true;
break;
};
i++;
};
if (collide){
addbox.transform.colorTransform = red;
} else {
addbox.transform.colorTransform = neutral;
};
if (((addbox.x + screenx) + addbox.width) > spacex){
addbox.x = ((spacex - addbox.width) - screenx);
};
if (((addbox.y + screeny) + addbox.height) > spacey){
addbox.y = ((spacey - addbox.height) - screeny);
};
}
public function texton(){
mapnjkscxz.spr.visible = true;
chat.inname.spr.visible = true;
chat.intext.spr.visible = true;
chat.disable.spr.visible = true;
dismap.spr.visible = true;
sendit.visible = true;
coords.visible = true;
coordclick.spr.visible = true;
helptext.visible = true;
}
public function alignhelp(){
helptext.x = (stage.stageWidth - helptext.width);
helptext.y = ((stage.stageHeight - helptext.height) - 20);
helptext.setTextFormat(right);
}
public function stagemove(_arg1:MouseEvent):void{
imgisdown = false;
screenx = (screenx - (mouseX - lmousex));
screeny = (screeny - (mouseY - lmousey));
updatepos();
lmousex = mouseX;
lmousey = mouseY;
}
public function blurit(){
blurred.length = 0;
i = 0;
while (i < onscreen.length) {
box[onscreen[i]].filters = [blur];
blurred.push(onscreen[i]);
i++;
};
}
public function linkover(_arg1:Event):void{
_arg1.currentTarget.getChildAt(0).setTextFormat(underline);
}
public function stopover(_arg1:Event):void{
ondown = true;
}
public function addmove(_arg1:Event):void{
addbox.x = mouseX;
addbox.y = mouseY;
colcheck();
}
public function cxgvb547(_arg1:Event):void{
if (contains(coords)){
removeChild(coords);
so.data.coord = null;
coordclick.txt.text = "show coordinates";
} else {
addChild(coords);
so.data.coord = 1;
coordclick.txt.text = "hide coordinates";
};
}
}
}//package image_fla
Section 2
//usermouse_1 (image_fla.usermouse_1)
package image_fla {
import flash.display.*;
public dynamic class usermouse_1 extends MovieClip {
public function usermouse_1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package image_fla