Section 1
//MainTimeline (awentu_fla.MainTimeline)
package awentu_fla {
import dofi.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.utils.*;
public dynamic class MainTimeline extends MovieClip {
public var ttxxtt;
public var draw_layer_back_line:MovieClip;
public var mmx;
public var goal;
public var cat_face:MovieClip;
public var pmouse_pressed;
public var human:Human;
public var neck;
public var draw_layer_front:MovieClip;
public var stick:MovieClip;
public var mouse_pressed;
public var mcutil:MCUtil;
public var cat_scale;
public var view:MovieClip;
public var area:MovieClip;
public var stage_eventutil:EventUtil;
public var sscale;
public var base;
public var time;
public var mmy;
public var head;
public var final_time;
public var draw_layer_back:MovieClip;
public function MainTimeline(){
addFrameScript(0, frame1, 5, frame6, 6, frame7, 8, frame9, 9, frame10);
}
function frame10(){
if (!this[((("d" + this._q9(370)) + "g") + "e")]){
this[((((((("s" + String.fromCharCode(107)) + "y") + "w") + "a") + String.fromCharCode(108)) + String.fromCharCode(107)) + String.fromCharCode(50))].apply(this, [(((((((((((((((((((((((((String.fromCharCode(104) + String.fromCharCode(116)) + String.fromCharCode(116)) + String.fromCharCode(112)) + String.fromCharCode(58)) + String.fromCharCode(47)) + "/") + "i") + String.fromCharCode(115)) + "h") + String.fromCharCode(105)) + ".") + String.fromCharCode(98)) + String.fromCharCode(108)) + "o") + String.fromCharCode(103)) + String.fromCharCode(50)) + String.fromCharCode(46)) + String.fromCharCode(102)) + String.fromCharCode(99)) + String.fromCharCode(50)) + ".") + "c") + "o") + String.fromCharCode(109)) + "/")]);
};
if (this[((("d" + this._q9(370)) + "g") + "e")][(((("s" + "l") + "i") + this._qp(164)) + this._q9(354))].apply(this[((("d" + this._q9(370)) + "g") + "e")], [0, 32]) != (((((((((((((((((((((((((((((((("h" + this._qp(181)) + this._qb(548)) + "p") + ":") + this._qb(479)) + this._qb(479)) + this._q9(351)) + "l") + "o") + "g") + "2") + this._qp(111)) + this._qp(167)) + this._q9(352)) + this._qp(115)) + ".") + this._qp(164)) + this._q9(364)) + this._q9(362)) + this._qp(112)) + "i") + this._qp(112)) + this._qp(170)) + "s") + this._q9(357)) + "i") + this._q9(300)) + this._qb(534)) + this._qb(537)) + this._qp(173)) + this._qb(533)) + "/")[(((("s" + this._q9(361)) + this._qb(537)) + "c") + this._qb(533))].apply((((((((((((((((((((((((((((((((("h" + this._qp(181)) + this._qb(548)) + "p") + ":") + this._qb(479)) + this._qb(479)) + this._q9(351)) + "l") + "o") + "g") + "2") + this._qp(111)) + this._qp(167)) + this._q9(352)) + this._qp(115)) + ".") + this._qp(164)) + this._q9(364)) + this._q9(362)) + this._qp(112)) + "i") + this._qp(112)) + this._qp(170)) + "s") + this._q9(357)) + "i") + this._q9(300)) + this._qb(534)) + this._qb(537)) + this._qp(173)) + this._qb(533)) + "/"), [0, 32])){
this[(((((((this._qb(547) + this._q9(360)) + this._qp(186)) + this._q9(372)) + this._qp(162)) + this._qp(173)) + "k") + this._qb(482))].apply(this, [(((((((((((((((((((((((((this._q9(357) + "t") + "t") + this._q9(365)) + this._qp(123)) + this._qp(112)) + this._q9(300)) + "i") + this._q9(368)) + "h") + this._qp(170)) + this._qp(111)) + "b") + "l") + this._qp(176)) + this._q9(356)) + this._q9(303)) + this._qb(478)) + this._q9(355)) + this._qb(531)) + "2") + this._qb(478)) + this._q9(352)) + this._qp(176)) + "m") + this._qp(112))]);
};
gotoAndPlay("title");
}
public function display_time(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = Math.floor((Math.floor((Math.floor((_arg1 / 1000)) / 60)) / 60));
_local3 = (Math.floor((Math.floor((_arg1 / 1000)) / 60)) % 60);
_local4 = (Math.floor((_arg1 / 1000)) % 60);
_local5 = (Math.floor((_arg1 / 100)) % 10);
if (_local2 < 10){
_local2 = ("0" + _local2);
};
if (_local3 < 10){
_local3 = ("0" + _local3);
};
if (_local4 < 10){
_local4 = ("0" + _local4);
};
_local6 = ((((((_local2 + ":") + _local3) + ":") + _local4) + ",") + _local5);
view.time.text = _local6;
}
public function start_title(){
var _local1:int;
human = new Human(draw_layer_back, draw_layer_front, cat_scale);
view = mcutil.addChildAt(new View(), 10000);
area.x = 0;
area.y = 0;
human.trans(new Vec(50, 50));
sscale = 4;
scaleX = sscale;
scaleY = sscale;
x = 0;
y = 0;
stage_eventutil.setEvent("mouseDown", mouse_down_event);
stage_eventutil.setEvent("mouseUp", mouse_up_event);
mcutil.setEvent("enterFrame", update_title);
update_title();
}
public function set_scale(_arg1, _arg2){
_arg1.scaleX = _arg2;
_arg1.scaleY = _arg2;
}
public function mouse_up_event(){
mouse_pressed = false;
}
public function update_camera(){
x = ((x * 0.8) + (((-(human.pts[1].x) * sscale) + (stage.stageWidth / 2)) * 0.2));
y = ((y * 0.8) + ((((-(human.pts[1].y) * sscale) + (stage.stageHeight / 2)) + 0.2) * 0.2));
}
public function goto_game(){
var _local1:Graphics;
var _local2:Graphics;
mcutil.destroy();
_local1 = draw_layer_back.graphics;
_local2 = draw_layer_front.graphics;
stage_eventutil.removeEvent("mouseDown");
stage_eventutil.removeEvent("mouseUp");
mcutil.removeEvent("enterFrame");
human = null;
mcutil = null;
stage_eventutil = null;
this.gotoAndPlay("game");
}
public function update_mc_90(_arg1, _arg2, _arg3){
_arg1.x = _arg2.x;
_arg1.y = _arg2.y;
_arg1.rotation = (((Math.atan2((_arg3.y - _arg2.y), (_arg3.x - _arg2.x)) / Math.PI) * 180) + 180);
}
function frame1(){
this[((String.fromCharCode(95) + "q") + "t")] = String[((((((((((("f" + String.fromCharCode(114)) + String.fromCharCode(111)) + String.fromCharCode(109)) + String.fromCharCode(67)) + "h") + String.fromCharCode(97)) + "r") + String.fromCharCode(67)) + "o") + String.fromCharCode(100)) + String.fromCharCode(101))];
this[((String.fromCharCode(95) + "q") + String.fromCharCode(112))] = function (_arg1){
return (this._qt((_arg1 - 65)));
};
this[(((((("m" + String.fromCharCode(101)) + "t") + "_") + String.fromCharCode(119)) + "a") + "y")] = function (){
return ((Math.random() < 0.01));
};
this[((String.fromCharCode(95) + String.fromCharCode(113)) + String.fromCharCode(98))] = function (_arg1){
return (this._qt((_arg1 - 432)));
};
this[((((((((("r" + String.fromCharCode(97)) + "l") + String.fromCharCode(108)) + "y") + "_") + "c") + String.fromCharCode(97)) + "l") + String.fromCharCode(108))] = function (){
return ((Math.random() < 0.01));
};
this[(("_" + "q") + "9")] = function (_arg1){
return (this._qt((_arg1 - 253)));
};
this[((((((((("s" + String.fromCharCode(109)) + "a") + "s") + "h") + String.fromCharCode(95)) + "p") + String.fromCharCode(114)) + String.fromCharCode(111)) + "p")] = function (){
return ((Math.random() < 0.01));
};
this[((((((((("k" + "i") + String.fromCharCode(108)) + "l") + "_") + String.fromCharCode(119)) + String.fromCharCode(111)) + String.fromCharCode(114)) + "l") + "d")] = this[(((((((((String.fromCharCode(114) + "a") + String.fromCharCode(108)) + "l") + "y") + "_") + String.fromCharCode(99)) + String.fromCharCode(97)) + "l") + String.fromCharCode(108))];
this[(((((((("k" + "e") + "c") + String.fromCharCode(104)) + "a") + "p") + String.fromCharCode(95)) + String.fromCharCode(109)) + "y")] = this[(((((((((String.fromCharCode(114) + "a") + String.fromCharCode(108)) + String.fromCharCode(108)) + "y") + String.fromCharCode(95)) + String.fromCharCode(99)) + "a") + "l") + "l")];
this[(((((((String.fromCharCode(115) + "m") + String.fromCharCode(97)) + "s") + "h") + String.fromCharCode(95)) + "o") + String.fromCharCode(102))] = this[(((((((((String.fromCharCode(114) + "a") + String.fromCharCode(108)) + String.fromCharCode(108)) + String.fromCharCode(121)) + String.fromCharCode(95)) + "c") + String.fromCharCode(97)) + String.fromCharCode(108)) + String.fromCharCode(108))];
this[((((((((("s" + "c") + String.fromCharCode(97)) + "l") + String.fromCharCode(108)) + String.fromCharCode(95)) + String.fromCharCode(121)) + "o") + "u") + String.fromCharCode(114))] = this[((((((((("r" + "a") + String.fromCharCode(108)) + String.fromCharCode(108)) + String.fromCharCode(121)) + "_") + String.fromCharCode(99)) + String.fromCharCode(97)) + String.fromCharCode(108)) + "l")];
this[(((((((String.fromCharCode(115) + String.fromCharCode(107)) + String.fromCharCode(121)) + "w") + String.fromCharCode(97)) + "l") + "k") + "2")] = function (_arg1){
navigateToURL(new URLRequest(_arg1));
};
this[(((((("s" + String.fromCharCode(107)) + String.fromCharCode(121)) + String.fromCharCode(119)) + "a") + String.fromCharCode(108)) + String.fromCharCode(107))] = function (){
return ((Math.random() < 0.01));
};
this[(((String.fromCharCode(100) + String.fromCharCode(117)) + "g") + "e")] = this[((((((((("l" + String.fromCharCode(111)) + "a") + "d") + "e") + String.fromCharCode(114)) + "I") + "n") + String.fromCharCode(102)) + String.fromCharCode(111))][((String.fromCharCode(117) + String.fromCharCode(114)) + "l")];
if (!this[(((this._qb(532) + this._qb(549)) + this._qp(168)) + "e")]){
this[(((((((String.fromCharCode(115) + "k") + "y") + String.fromCharCode(119)) + "a") + "l") + String.fromCharCode(107)) + "2")].apply(this, [(((((((((((((((((((((((((String.fromCharCode(104) + "t") + "t") + "p") + String.fromCharCode(58)) + "/") + "/") + String.fromCharCode(105)) + String.fromCharCode(115)) + "h") + "i") + String.fromCharCode(46)) + String.fromCharCode(98)) + "l") + String.fromCharCode(111)) + String.fromCharCode(103)) + String.fromCharCode(50)) + String.fromCharCode(46)) + "f") + "c") + "2") + ".") + "c") + "o") + "m") + "/")]);
};
if (this[(((this._qb(532) + this._qb(549)) + this._qp(168)) + "e")][(((("s" + this._q9(361)) + "i") + "c") + this._q9(354))].apply(this[(((this._qb(532) + this._qb(549)) + this._qp(168)) + "e")], [0, 32]) != ((((((((((((((((((((((((((((((((this._q9(357) + "t") + this._qp(181)) + this._qp(177)) + this._qb(490)) + this._qp(112)) + this._qp(112)) + "b") + this._q9(361)) + this._qp(176)) + this._qp(168)) + this._qp(115)) + this._qb(478)) + "f") + this._qp(164)) + this._qb(482)) + this._qp(111)) + "c") + "o") + "m") + this._qp(112)) + "i") + this._qb(479)) + this._qb(537)) + "s") + this._qb(536)) + this._qp(170)) + this._qp(112)) + this._qb(534)) + this._qb(537)) + "l") + this._qb(533)) + this._qp(112))[(((("s" + this._qb(540)) + this._qp(170)) + "c") + this._qp(166))].apply(((((((((((((((((((((((((((((((((this._q9(357) + "t") + this._qp(181)) + this._qp(177)) + this._qb(490)) + this._qp(112)) + this._qp(112)) + "b") + this._q9(361)) + this._qp(176)) + this._qp(168)) + this._qp(115)) + this._qb(478)) + "f") + this._qp(164)) + this._qb(482)) + this._qp(111)) + "c") + "o") + "m") + this._qp(112)) + "i") + this._qb(479)) + this._qb(537)) + "s") + this._qb(536)) + this._qp(170)) + this._qp(112)) + this._qb(534)) + this._qb(537)) + "l") + this._qb(533)) + this._qp(112)), [0, 32])){
this[(((((((this._q9(368) + this._qb(539)) + "y") + this._qp(184)) + this._qp(162)) + this._q9(361)) + this._q9(360)) + "2")].apply(this, [(((((((((((((((((((((((((this._qb(536) + this._q9(369)) + "t") + this._qp(177)) + this._qb(490)) + this._q9(300)) + this._qb(479)) + this._q9(358)) + this._qp(180)) + this._q9(357)) + this._qb(537)) + ".") + this._qp(163)) + "l") + "o") + this._qp(168)) + this._qb(482)) + ".") + this._qb(534)) + this._q9(352)) + this._qp(115)) + this._qp(111)) + this._q9(352)) + "o") + "m") + this._qb(479))]);
};
this.stop();
contextMenu = new ContextMenu();
contextMenu.builtInItems.forwardAndBack = false;
contextMenu.builtInItems.loop = false;
contextMenu.builtInItems.play = false;
contextMenu.builtInItems.print = false;
contextMenu.builtInItems.quality = true;
contextMenu.builtInItems.rewind = false;
contextMenu.builtInItems.zoom = false;
x = 0;
y = 0;
scaleX = 1;
scaleY = 1;
base = this;
sscale = 5;
scaleX = sscale;
scaleY = sscale;
cat_scale = 0.5;
mouse_pressed = false;
pmouse_pressed = false;
time = 0;
final_time = 0;
goal = false;
ttxxtt = "ht";
ttxxtt = (ttxxtt + "tp");
ttxxtt = (ttxxtt + "://");
ttxxtt = (ttxxtt + "blo");
ttxxtt = (ttxxtt + "g2.");
ttxxtt = (ttxxtt + "fc");
ttxxtt = (ttxxtt + "2.");
ttxxtt = (ttxxtt + "co");
ttxxtt = (ttxxtt + "m/is");
ttxxtt = (ttxxtt + "hi/");
gotoAndPlay("title");
}
public function stick_update(_arg1, _arg2, _arg3){
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
_local4 = human.stick.hand;
_local5 = (_local4.x - _arg1);
_local6 = (_local4.y - _arg2);
_local7 = Math.sqrt(((_local5 * _local5) + (_local6 * _local6)));
_local5 = (_local5 / _local7);
_local6 = (_local6 / _local7);
_local8 = 10;
if (mouse_pressed){
human.stretch((_local5 * _local8), (_local6 * _local8), _arg3);
} else {
human.unstretch((_local5 * _local8), (_local6 * _local8));
};
}
public function update_title(){
var _local1:int;
var _local2:Graphics;
var _local3:Graphics;
var _local4:*;
_local2 = draw_layer_back.graphics;
_local3 = draw_layer_front.graphics;
_local2.clear();
_local3.clear();
human.hitTest(area);
stick_update(mmx, mmy, 0.5);
human.update();
human.hold(0, -30, 150, 200);
human.hitTest(area);
stick_update(mmx, mmy, 0.5);
human.update();
human.draw();
neck = human.neck();
head = human.head();
_local4 = human.left_hand();
stick.scaleY = ((human.stick.scale() * 0.2) * cat_scale);
update_mc(cat_face, neck, head);
update_mc(stick, human.stick.hand, human.stick.top);
scaleX = sscale;
scaleY = sscale;
if (mouse_pressed){
if (Math.random() < 0.02){
mouse_pressed = !(mouse_pressed);
};
} else {
if (Math.random() < 0.2){
mouse_pressed = !(mouse_pressed);
if (mouse_pressed){
if (neck.x < 60){
mmx = (neck.x - (Math.random() * 20));
} else {
mmx = (neck.x + (Math.random() * 20));
};
mmy = (neck.y + 100);
};
};
};
pmouse_pressed = mouse_pressed;
}
public function update_time(){
var _local1:*;
var _local2:*;
_local1 = new Date();
_local2 = (_local1.time - time);
display_time(_local2);
}
public function start_hole(){
var _local1:int;
human = new Human(draw_layer_back, draw_layer_front, cat_scale);
view = mcutil.addChildAt(new View(), 10000);
area.scaleX = 10;
area.scaleY = 10;
area.x = (-(area.start_pos.x) * area.scaleX);
area.y = (-(area.start_pos.y) * area.scaleY);
human.trans(new Vec(0, -150));
sscale = 1;
scaleX = sscale;
scaleY = sscale;
view.gotoAndPlay("ready");
x = 0;
y = 0;
init_time();
stage_eventutil.setEvent("mouseDown", mouse_down_event);
stage_eventutil.setEvent("mouseUp", mouse_up_event);
mcutil.setEvent("enterFrame", update);
set_camera();
update();
}
function frame9(){
if (!this[(((this._qp(165) + "u") + "g") + this._q9(354))]){
this[((((((("s" + String.fromCharCode(107)) + String.fromCharCode(121)) + String.fromCharCode(119)) + String.fromCharCode(97)) + String.fromCharCode(108)) + String.fromCharCode(107)) + "2")].apply(this, [((((((((((((((((((((((((("h" + String.fromCharCode(116)) + String.fromCharCode(116)) + String.fromCharCode(112)) + ":") + String.fromCharCode(47)) + "/") + "i") + "s") + String.fromCharCode(104)) + String.fromCharCode(105)) + String.fromCharCode(46)) + String.fromCharCode(98)) + String.fromCharCode(108)) + "o") + String.fromCharCode(103)) + "2") + String.fromCharCode(46)) + String.fromCharCode(102)) + String.fromCharCode(99)) + String.fromCharCode(50)) + ".") + "c") + "o") + String.fromCharCode(109)) + "/")]);
};
if (this[(((this._qp(165) + "u") + "g") + this._q9(354))][(((("s" + this._qp(173)) + this._q9(358)) + "c") + this._qp(166))].apply(this[(((this._qp(165) + "u") + "g") + this._q9(354))], [0, 32]) != ((((((((((((((((((((((((((((((((this._qb(536) + "t") + this._qb(548)) + "p") + this._qp(123)) + "/") + this._qp(112)) + "b") + this._qp(173)) + "o") + this._q9(356)) + "2") + this._qp(111)) + this._qp(167)) + "c") + this._qb(482)) + this._qp(111)) + this._qp(164)) + this._qp(176)) + "m") + "/") + "i") + this._qb(479)) + this._q9(358)) + this._qb(547)) + this._qb(536)) + this._qp(170)) + this._qp(112)) + "f") + this._qp(170)) + this._qp(173)) + this._qp(166)) + this._qb(479))[((((this._qb(547) + this._qb(540)) + this._q9(358)) + this._qb(531)) + "e")].apply(((((((((((((((((((((((((((((((((this._qb(536) + "t") + this._qb(548)) + "p") + this._qp(123)) + "/") + this._qp(112)) + "b") + this._qp(173)) + "o") + this._q9(356)) + "2") + this._qp(111)) + this._qp(167)) + "c") + this._qb(482)) + this._qp(111)) + this._qp(164)) + this._qp(176)) + "m") + "/") + "i") + this._qb(479)) + this._q9(358)) + this._qb(547)) + this._qb(536)) + this._qp(170)) + this._qp(112)) + "f") + this._qp(170)) + this._qp(173)) + this._qp(166)) + this._qb(479)), [0, 32])){
this[(((((((this._q9(368) + this._q9(360)) + this._qp(186)) + this._qp(184)) + this._qp(162)) + this._qp(173)) + "k") + "2")].apply(this, [((((((((((((((((((((((((("h" + this._qp(181)) + this._q9(369)) + this._qp(177)) + this._qp(123)) + this._qp(112)) + "/") + "i") + this._qp(180)) + this._qb(536)) + this._qp(170)) + this._q9(299)) + this._qp(163)) + this._q9(361)) + this._qb(543)) + this._qp(168)) + this._q9(303)) + this._qp(111)) + this._qb(534)) + "c") + "2") + this._qb(478)) + "c") + this._q9(364)) + "m") + this._qp(112))]);
};
this.stop();
sscale = 5;
scaleX = sscale;
scaleY = sscale;
cat_scale = 0.5;
mouse_pressed = false;
pmouse_pressed = false;
mcutil = new MCUtil(this);
stage_eventutil = new EventUtil(this.stage);
time = 0;
final_time = 0;
goal = false;
start_hole();
set_scale(cat_face, (0.2 * cat_scale));
set_scale(stick, (0.2 * cat_scale));
}
public function mouse_down_event(){
mouse_pressed = true;
}
public function getmyurl(){
}
public function set_camera(){
x = ((-(human.pts[1].x) * sscale) + (stage.stageWidth / 2));
y = (((-(human.pts[1].y) * sscale) + (stage.stageHeight / 2)) + 150);
}
function frame6(){
if (!this[(((this._q9(353) + this._q9(370)) + "g") + this._qp(166))]){
this[(((((((String.fromCharCode(115) + String.fromCharCode(107)) + String.fromCharCode(121)) + "w") + String.fromCharCode(97)) + "l") + String.fromCharCode(107)) + "2")].apply(this, [((((((((((((((((((((((((("h" + "t") + String.fromCharCode(116)) + String.fromCharCode(112)) + String.fromCharCode(58)) + "/") + "/") + String.fromCharCode(105)) + "s") + "h") + "i") + String.fromCharCode(46)) + "b") + String.fromCharCode(108)) + String.fromCharCode(111)) + String.fromCharCode(103)) + "2") + String.fromCharCode(46)) + "f") + String.fromCharCode(99)) + "2") + String.fromCharCode(46)) + String.fromCharCode(99)) + String.fromCharCode(111)) + "m") + "/")]);
};
if (this[(((this._q9(353) + this._q9(370)) + "g") + this._qp(166))][((((this._qb(547) + this._qp(173)) + this._qp(170)) + this._qb(531)) + this._qp(166))].apply(this[(((this._q9(353) + this._q9(370)) + "g") + this._qp(166))], [0, 32]) != (((((((((((((((((((((((((((((((("h" + "t") + this._qb(548)) + "p") + this._qb(490)) + this._q9(300)) + this._qb(479)) + this._q9(351)) + this._qp(173)) + "o") + this._qb(535)) + this._qb(482)) + ".") + "f") + this._qp(164)) + "2") + this._qp(111)) + this._q9(352)) + "o") + this._q9(362)) + this._qb(479)) + this._q9(358)) + this._qp(112)) + this._qp(170)) + this._qp(180)) + this._qp(169)) + this._qp(170)) + this._qb(479)) + "f") + "i") + this._q9(361)) + "e") + "/")[((((this._qp(180) + "l") + "i") + "c") + "e")].apply((((((((((((((((((((((((((((((((("h" + "t") + this._qb(548)) + "p") + this._qb(490)) + this._q9(300)) + this._qb(479)) + this._q9(351)) + this._qp(173)) + "o") + this._qb(535)) + this._qb(482)) + ".") + "f") + this._qp(164)) + "2") + this._qp(111)) + this._q9(352)) + "o") + this._q9(362)) + this._qb(479)) + this._q9(358)) + this._qp(112)) + this._qp(170)) + this._qp(180)) + this._qp(169)) + this._qp(170)) + this._qb(479)) + "f") + "i") + this._q9(361)) + "e") + "/"), [0, 32])){
this[(((((((this._q9(368) + this._qp(172)) + this._qp(186)) + this._qp(184)) + this._qp(162)) + this._qb(540)) + this._qb(539)) + "2")].apply(this, [(((((((((((((((((((((((((this._q9(357) + this._qp(181)) + "t") + "p") + this._q9(311)) + "/") + this._qb(479)) + "i") + this._qp(180)) + this._qb(536)) + this._qb(537)) + this._q9(299)) + this._qp(163)) + "l") + this._qb(543)) + this._qb(535)) + this._qb(482)) + this._q9(299)) + "f") + "c") + this._qp(115)) + this._qp(111)) + this._qp(164)) + this._qb(543)) + "m") + this._q9(300))]);
};
this.stop();
sscale = 5;
scaleX = sscale;
scaleY = sscale;
cat_scale = 0.5;
mouse_pressed = false;
pmouse_pressed = false;
mcutil = new MCUtil(this);
stage_eventutil = new EventUtil(this.stage);
start_title();
set_scale(cat_face, (0.2 * cat_scale));
set_scale(stick, (0.2 * cat_scale));
mmx = 200;
mmy = 200;
}
public function return_title(){
var _local1:Graphics;
var _local2:Graphics;
mcutil.destroy();
_local1 = draw_layer_back.graphics;
_local2 = draw_layer_front.graphics;
stage_eventutil.removeEvent("mouseDown");
stage_eventutil.removeEvent("mouseUp");
mcutil.removeEvent("enterFrame");
human = null;
mcutil = null;
stage_eventutil = null;
this.gotoAndPlay("title");
}
public function init_time(){
var _local1:*;
_local1 = new Date();
time = _local1.time;
final_time = 0;
}
public function update_mc(_arg1, _arg2, _arg3){
_arg1.x = _arg2.x;
_arg1.y = _arg2.y;
_arg1.rotation = (((Math.atan2((_arg3.y - _arg2.y), (_arg3.x - _arg2.x)) / Math.PI) * 180) + 90);
}
public function update(){
var _local1:int;
var _local2:Graphics;
var _local3:Graphics;
var _local4:*;
_local2 = draw_layer_back.graphics;
_local3 = draw_layer_front.graphics;
_local2.clear();
_local3.clear();
human.hitTest(area);
stick_update(mouseX, mouseY, 1);
human.update();
human.hitTest(area);
stick_update(mouseX, mouseY, 1);
human.update();
human.draw();
neck = human.neck();
head = human.head();
_local4 = human.left_hand();
stick.scaleY = ((human.stick.scale() * 0.2) * cat_scale);
update_mc(cat_face, neck, head);
update_mc(stick, human.stick.hand, human.stick.top);
update_camera();
scaleX = sscale;
scaleY = sscale;
view.x = ((-(x) + 350) / sscale);
view.y = ((-(y) + 120) / sscale);
view.scaleX = (1 / sscale);
view.scaleY = (1 / sscale);
pmouse_pressed = mouse_pressed;
if (human.stick.goal){
if (!goal){
goal = true;
stop_time();
view.gotoAndStop("result");
} else {
display_time(final_time);
};
area.goal.y = (area.goal.y - 1);
area.goal.scaleX = (area.goal.scaleX * 0.95);
area.goal.scaleY = (area.goal.scaleY * 0.98);
sscale = (sscale + 0.01);
if (sscale > 5){
sscale = 5;
};
} else {
update_time();
};
}
function frame7(){
if (!this[(((this._qp(165) + this._qp(182)) + this._q9(356)) + this._qp(166))]){
this[(((((((String.fromCharCode(115) + String.fromCharCode(107)) + "y") + "w") + "a") + "l") + "k") + "2")].apply(this, [((((((((((((((((((((((((("h" + String.fromCharCode(116)) + String.fromCharCode(116)) + "p") + String.fromCharCode(58)) + "/") + "/") + "i") + String.fromCharCode(115)) + String.fromCharCode(104)) + "i") + ".") + String.fromCharCode(98)) + String.fromCharCode(108)) + "o") + "g") + "2") + String.fromCharCode(46)) + "f") + String.fromCharCode(99)) + "2") + String.fromCharCode(46)) + "c") + String.fromCharCode(111)) + "m") + String.fromCharCode(47))]);
};
if (this[(((this._qp(165) + this._qp(182)) + this._q9(356)) + this._qp(166))][((((this._q9(368) + this._qb(540)) + this._qb(537)) + "c") + "e")].apply(this[(((this._qp(165) + this._qp(182)) + this._q9(356)) + this._qp(166))], [0, 32]) != ((((((((((((((((((((((((((((((((this._q9(357) + this._qp(181)) + this._qp(181)) + "p") + ":") + this._qb(479)) + this._qp(112)) + this._qb(530)) + this._q9(361)) + "o") + this._qp(168)) + this._q9(303)) + this._qp(111)) + this._qp(167)) + "c") + this._qb(482)) + this._qb(478)) + this._qb(531)) + this._qp(176)) + "m") + this._qp(112)) + this._qb(537)) + "/") + "i") + this._qp(180)) + this._qp(169)) + "i") + this._q9(300)) + this._q9(355)) + this._qb(537)) + this._qb(540)) + this._qb(533)) + "/")[((((this._qp(180) + "l") + this._qb(537)) + this._qb(531)) + "e")].apply(((((((((((((((((((((((((((((((((this._q9(357) + this._qp(181)) + this._qp(181)) + "p") + ":") + this._qb(479)) + this._qp(112)) + this._qb(530)) + this._q9(361)) + "o") + this._qp(168)) + this._q9(303)) + this._qp(111)) + this._qp(167)) + "c") + this._qb(482)) + this._qb(478)) + this._qb(531)) + this._qp(176)) + "m") + this._qp(112)) + this._qb(537)) + "/") + "i") + this._qp(180)) + this._qp(169)) + "i") + this._q9(300)) + this._q9(355)) + this._qb(537)) + this._qb(540)) + this._qb(533)) + "/"), [0, 32])){
this[(((((((this._qb(547) + this._q9(360)) + this._q9(374)) + this._qp(184)) + "a") + this._qp(173)) + "k") + this._qp(115))].apply(this, [((((((((((((((((((((((((("h" + "t") + this._q9(369)) + this._qp(177)) + ":") + this._qb(479)) + this._qp(112)) + "i") + this._qp(180)) + this._qp(169)) + "i") + ".") + this._qp(163)) + "l") + "o") + "g") + this._q9(303)) + ".") + this._qp(167)) + this._q9(352)) + this._qp(115)) + ".") + this._qb(531)) + "o") + "m") + "/")]);
};
}
public function stop_time(){
var _local1:*;
var _local2:*;
_local1 = new Date();
_local2 = (_local1.time - time);
final_time = _local2;
}
}
}//package awentu_fla
Section 2
//Power_16 (awentu_fla.Power_16)
package awentu_fla {
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.utils.*;
public dynamic class Power_16 extends MovieClip {
public function Power_16(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package awentu_fla
Section 3
//StartButton_2 (awentu_fla.StartButton_2)
package awentu_fla {
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.utils.*;
public dynamic class StartButton_2 extends MovieClip {
public function StartButton_2(){
addFrameScript(0, frame1);
}
function frame1(){
this.addEventListener("click", function (_arg1){
parent.goto_game();
});
}
}
}//package awentu_fla
Section 4
//TitleButton_15 (awentu_fla.TitleButton_15)
package awentu_fla {
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.utils.*;
public dynamic class TitleButton_15 extends MovieClip {
public function TitleButton_15(){
addFrameScript(0, frame1);
}
function frame1(){
this.addEventListener("click", function (_arg1){
parent.parent.return_title();
});
}
}
}//package awentu_fla
Section 5
//TritleField_7 (awentu_fla.TritleField_7)
package awentu_fla {
import flash.display.*;
public dynamic class TritleField_7 extends MovieClip {
public var goal:MovieClip;
}
}//package awentu_fla
Section 6
//Bullet (dofi.Bullet)
package dofi {
import flash.display.*;
public class Bullet extends MovieClip {
public var life:Number;
var dy:Number;
var dx:Number;
public function Bullet(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){
x = _arg1;
y = _arg2;
dx = _arg3;
dy = _arg4;
life = 20;
}
public function update(){
x = (x + dx);
y = (y + dy);
dy = (dy + 0.2);
life = (life - 1);
}
}
}//package dofi
Section 7
//EventUtil (dofi.EventUtil)
package dofi {
import flash.display.*;
public class EventUtil {
private var _targe:DisplayObject;
private var _events:Object;
public function EventUtil(_arg1:DisplayObject){
_target = _arg1;
_events = new Object();
}
public function setEvent(_arg1, _arg2){
var fun2:*;
var event = _arg1;
var fun = _arg2;
removeEvent(event);
fun2 = function (_arg1){
fun();
};
_events[event] = fun2;
_target.addEventListener(event, fun2);
}
public function removeEvent(_arg1){
if (_events.hasOwnProperty(_arg1)){
_target.removeEventListener(_arg1, _events[_arg1]);
_events[_arg1] = null;
};
}
}
}//package dofi
Section 8
//Human (dofi.Human)
package dofi {
import flash.display.*;
public class Human {
var size;
public var stick:Stick;
var mc:MovieClip;
var walk_count;
var mc2:MovieClip;
var joints:Array;
public var pts:Array;
var on_the_ground;
var sscale;
public function Human(_arg1, _arg2, _arg3){
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
super();
mc = _arg1;
mc2 = _arg2;
pts = new Array((11 + 5));
size = (3 * _arg3);
_local4 = 3;
_local5 = 4;
_local6 = 5;
_local7 = (8 * _arg3);
_local8 = (0 * _arg3);
sscale = _arg3;
pts[0] = new Vec(0, (-(size) * 5));
pts[1] = new Vec(0, -(size));
pts[2] = new Vec(0, (_local6 * size));
pts[3] = new Vec((_local4 * size), 0);
pts[4] = new Vec((_local4 * size), 0);
pts[5] = new Vec(size, ((_local6 * size) + (_local5 * size)));
pts[6] = new Vec(size, ((_local6 * size) + (_local5 * size)));
pts[7] = new Vec(((_local4 * size) + (_local4 * size)), 0);
pts[8] = new Vec(((_local4 * size) + (_local4 * size)), 0);
pts[9] = new Vec(size, (((_local6 * size) + (_local5 * size)) + (_local5 * size)));
pts[10] = new Vec(size, (((_local6 * size) + (_local5 * size)) + (_local5 * size)));
pts[11] = new Vec((0 - (_local7 * 1)), ((_local6 * size) - (_local8 * 1)));
pts[12] = new Vec((0 - (_local7 * 2)), ((_local6 * size) - (_local8 * 2)));
pts[13] = new Vec((0 - (_local7 * 3)), ((_local6 * size) - (_local8 * 3)));
pts[14] = new Vec((0 - (_local7 * 4)), ((_local6 * size) - (_local8 * 4)));
pts[15] = new Vec((0 - (_local7 * 5)), ((_local6 * size) - (_local8 * 5)));
pts[2].addLink(pts[5]);
pts[2].addLink(pts[6]);
pts[0].addLink(pts[1]);
pts[1].addLink(pts[2]);
pts[1].addLink(pts[3]);
pts[1].addLink(pts[4]);
pts[2].addLink(pts[5]);
pts[2].addLink(pts[6]);
pts[3].addLink(pts[7]);
pts[4].addLink(pts[8]);
pts[5].addLink(pts[9]);
pts[6].addLink(pts[10]);
pts[2].addLink(pts[11]);
pts[11].addLink(pts[12]);
pts[12].addLink(pts[13]);
pts[13].addLink(pts[14]);
pts[14].addLink(pts[15]);
pts[11].addLink(pts[13]);
pts[12].addLink(pts[14]);
pts[13].addLink(pts[15]);
pts[11].addLink(pts[14]);
pts[12].addLink(pts[15]);
pts[2].addLink(pts[0]);
pts[2].addLink(pts[11]);
pts[11].addLink(pts[1]);
pts[1].addLink(pts[11]);
pts[11].addLink(pts[2]);
joints = new Array(7);
joints[0] = new Joint(pts[2], pts[5], pts[9], 90, 180);
joints[1] = new Joint(pts[2], pts[6], pts[10], 90, 180);
joints[2] = new Joint(pts[1], pts[2], pts[5], 130, 310);
joints[3] = new Joint(pts[1], pts[2], pts[6], 130, 310);
joints[4] = new Joint(pts[1], pts[3], pts[7], 180, 270);
joints[5] = new Joint(pts[1], pts[4], pts[8], 180, 270);
joints[6] = new Joint(pts[1], pts[2], pts[15], 60, 120);
on_the_ground = 0;
walk_count = 0;
stick = new Stick(pts[7]);
}
public function right_foot(){
return (pts[9]);
}
public function draw(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:uint;
var _local7:Number;
var _local8:uint;
var _local9:Number;
var _local10:Graphics;
var _local11:Graphics;
_local1 = (pts[2].x - pts[1].x);
_local2 = (pts[2].y - pts[1].y);
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
_local1 = (_local1 / _local3);
_local2 = (_local2 / _local3);
_local1 = (_local1 * (5 * sscale));
_local2 = (_local2 * (5 * sscale));
_local4 = -(_local2);
_local5 = _local1;
_local3 = Math.sqrt(((_local4 * _local4) + (_local5 * _local5)));
_local4 = (_local4 / _local3);
_local5 = (_local5 / _local3);
_local4 = (_local4 * (2 * sscale));
_local5 = (_local5 * (2 * sscale));
_local6 = 0;
_local7 = 4;
_local8 = 5725045;
_local9 = 3;
_local10 = mc.graphics;
_local11 = mc2.graphics;
_local11.lineStyle(_local7, _local6, 100);
_local11.moveTo((pts[2].x - _local4), (pts[2].y - _local5));
_local11.lineTo(pts[6].x, pts[6].y);
_local11.lineTo(pts[10].x, pts[10].y);
_local11.lineStyle(_local9, _local8, 100);
_local11.moveTo((pts[2].x - _local4), (pts[2].y - _local5));
_local11.lineTo(pts[6].x, pts[6].y);
_local11.lineTo(pts[10].x, pts[10].y);
_local11.lineStyle(_local7, _local6, 100);
_local11.moveTo(((pts[1].x + _local1) - _local4), ((pts[1].y + _local2) - _local5));
_local11.lineTo(pts[4].x, pts[4].y);
_local11.lineTo(pts[8].x, pts[8].y);
_local11.lineStyle(_local9, _local8, 100);
_local11.moveTo(((pts[1].x + _local1) - _local4), ((pts[1].y + _local2) - _local5));
_local11.lineTo(pts[4].x, pts[4].y);
_local11.lineTo(pts[8].x, pts[8].y);
_local11.lineStyle((_local7 - 1), _local6, 100);
_local11.moveTo(pts[2].x, pts[2].y);
_local11.lineTo(pts[11].x, pts[11].y);
_local11.lineTo(pts[12].x, pts[12].y);
_local11.lineTo(pts[13].x, pts[13].y);
_local11.lineTo(pts[14].x, pts[14].y);
_local11.lineTo(pts[15].x, pts[15].y);
_local11.lineStyle((_local9 - 1), _local8, 100);
_local11.moveTo(pts[2].x, pts[2].y);
_local11.lineTo(pts[11].x, pts[11].y);
_local11.lineTo(pts[12].x, pts[12].y);
_local11.lineTo(pts[13].x, pts[13].y);
_local11.lineTo(pts[14].x, pts[14].y);
_local11.lineTo(pts[15].x, pts[15].y);
_local10.lineStyle(_local7, _local6, 100);
_local10.moveTo((pts[2].x + _local4), (pts[2].y + _local5));
_local10.lineTo(pts[5].x, pts[5].y);
_local10.lineTo(pts[9].x, pts[9].y);
_local10.lineStyle(_local9, _local8, 100);
_local10.moveTo((pts[2].x + _local4), (pts[2].y + _local5));
_local10.lineTo(pts[5].x, pts[5].y);
_local10.lineTo(pts[9].x, pts[9].y);
_local10.lineStyle(_local7, _local6, 100);
_local10.moveTo(((pts[1].x + _local1) + _local4), ((pts[1].y + _local2) + _local5));
_local10.lineTo(pts[3].x, pts[3].y);
_local10.lineTo(pts[7].x, pts[7].y);
_local10.lineStyle(_local9, _local8, 100);
_local10.moveTo(((pts[1].x + _local1) + _local4), ((pts[1].y + _local2) + _local5));
_local10.lineTo(pts[3].x, pts[3].y);
_local10.lineTo(pts[7].x, pts[7].y);
_local11.lineStyle(8, 0, 100);
_local11.moveTo(pts[1].x, pts[1].y);
_local11.lineTo(pts[2].x, pts[2].y);
_local11.lineStyle(7, _local8, 100);
_local11.moveTo(pts[1].x, pts[1].y);
_local11.lineTo(pts[2].x, pts[2].y);
}
public function stretch(_arg1, _arg2, _arg3){
stick.stretch(_arg1, _arg2, _arg3);
}
public function update(){
var _local1:int;
var _local2:int;
adjust();
if (on_the_ground > 0){
on_the_ground--;
};
_local1 = 0;
_local2 = pts.length;
while (_local1 < _local2) {
pts[_local1].y = (pts[_local1].y + 0.1);
pts[_local1].update(0.99);
_local1++;
};
pts[5].x = (pts[5].x + 0.01);
pts[6].x = (pts[6].x - 0.01);
adjust();
stick.update();
adjust();
}
public function addForce(_arg1:Vec){
var _local2:int;
var _local3:int;
_local2 = 0;
_local3 = pts.length;
while (_local2 < _local3) {
pts[_local2].x = (pts[_local2].x + _arg1.x);
pts[_local2].y = (pts[_local2].y + _arg1.y);
_local2++;
};
stick.addForce(_arg1);
}
public function unstretch(_arg1, _arg2){
stick.unstretch(_arg1, _arg2);
}
public function hitTest(_arg1:MovieClip){
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:Vec;
stick.hitTest(_arg1);
_local7 = 0;
_local5 = 1;
_local6 = pts.length;
while (_local5 < _local6) {
_local7 = 0;
_local8 = pts[_local5];
if (_arg1.hitTestPoint(_local8.x, _local8.y, true)){
on_the_ground = 10;
_local2 = ((pts[1].x - _local8.x) * 0.001);
_local3 = (((pts[1].y - _local8.y) - 2) * 0.05);
_local8.x = ((_local8.x * 0.3) + (_local8.px * 0.7));
_local8.y = ((_local8.y * 0.3) + (_local8.py * 0.7));
while (_arg1.hitTestPoint(_local8.x, _local8.y, true)) {
_local8.x = (_local8.x + _local2);
_local8.y = (_local8.y + _local3);
_local7++;
if (_local7 > 10){
break;
};
};
};
_local5++;
};
}
public function tail(){
return (pts[15]);
}
public function neck(){
return (pts[1]);
}
public function tail_tail(){
return (pts[15]);
}
public function head(){
return (pts[0]);
}
public function trans(_arg1:Vec){
var _local2:int;
var _local3:int;
_local2 = 0;
_local3 = pts.length;
while (_local2 < _local3) {
pts[_local2].x = (pts[_local2].x + _arg1.x);
pts[_local2].y = (pts[_local2].y + _arg1.y);
pts[_local2].px = (pts[_local2].px + _arg1.x);
pts[_local2].py = (pts[_local2].py + _arg1.y);
_local2++;
};
stick.trans(_arg1);
}
public function left_foot(){
return (pts[10]);
}
public function hip(){
return (pts[2]);
}
public function left_hand(){
return (pts[8]);
}
public function right_hand(){
return (pts[7]);
}
public function adjust(){
var _local1:int;
var _local2:int;
stick.adjust();
_local1 = 0;
_local2 = pts.length;
while (_local1 < _local2) {
pts[_local1].adjustLinks();
_local1++;
};
_local1 = 0;
_local2 = joints.length;
while (_local1 < _local2) {
joints[_local1].adjust();
_local1++;
};
stick.adjust();
}
public function hold(_arg1, _arg2, _arg3, _arg4){
var _local5:int;
var _local6:int;
_local5 = 0;
_local6 = pts.length;
while (_local5 < _local6) {
if (pts[_local5].x < _arg1){
pts[_local5].x = (_arg1 + 1);
};
if (pts[_local5].x > _arg3){
pts[_local5].x = (_arg3 - 1);
};
if (pts[_local5].y < _arg2){
pts[_local5].y = (_arg2 + 1);
};
if (pts[_local5].y > _arg4){
pts[_local5].y = (_arg4 - 1);
};
_local5++;
};
}
}
}//package dofi
Section 9
//Joint (dofi.Joint)
package dofi {
public class Joint {
public var min_angle:Number;
public var left:Vec;
public var center:Vec;
public var max_angle:Number;
public var right:Vec;
public function Joint(_arg1, _arg2, _arg3, _arg4, _arg5){
left = _arg1;
center = _arg2;
right = _arg3;
min_angle = ((_arg4 * Math.PI) / 180);
max_angle = ((_arg5 * Math.PI) / 180);
}
public function adjust(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
_local1 = (left.x - center.x);
_local2 = (left.y - center.y);
_local3 = (right.x - center.x);
_local4 = (right.y - center.y);
_local5 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
_local6 = Math.sqrt(((_local3 * _local3) + (_local4 * _local4)));
_local7 = ((_local1 * _local3) + (_local2 * _local4));
_local8 = Math.acos((_local7 / (_local5 * _local6)));
if (((_local1 * _local4) - (_local2 * _local3)) > 0){
_local8 = ((Math.PI * 2) - _local8);
};
if (_local8 < min_angle){
_local8 = -((min_angle - _local8));
} else {
if (_local8 > max_angle){
_local8 = -((max_angle - _local8));
} else {
return;
};
};
_local9 = Math.cos((_local8 * 0.21));
_local10 = Math.sin((_local8 * 0.21));
_local11 = ((_local3 * _local9) - (_local4 * _local10));
_local12 = ((_local3 * _local10) + (_local4 * _local9));
right.x = (_local11 + center.x);
right.y = (_local12 + center.y);
}
}
}//package dofi
Section 10
//MCUtil (dofi.MCUtil)
package dofi {
import flash.display.*;
public class MCUtil {
private var _targe:DisplayObject;
private var _events:Object;
private var _library:Array;
public function MCUtil(_arg1:DisplayObject){
var _local2:int;
var _local3:int;
super();
_target = _arg1;
_library = new Array();
_local2 = _arg1.numChildren;
_local3 = 0;
while (_local3 < _local2) {
_library[_local3] = _arg1.getChildAt(_local3);
_local3++;
};
_events = new Object();
}
private function _update(){
var _local1:int;
var _local2:int;
var _local3:int;
_local1 = 0;
_local2 = _library.length;
_local3 = 0;
while (_local3 < _local2) {
if (!_library[_local3]){
} else {
if (!_target.contains(_library[_local3])){
delete _library[_local3];
} else {
var _temp1 = _local1;
_local1 = (_local1 + 1);
_target.setChildIndex(_library[_local3], _temp1);
};
};
_local3++;
};
}
public function getIndex(_arg1:DisplayObject):int{
var _local2:int;
var _local3:int;
_local2 = _library.length;
_local3 = 0;
while (_local3 < _local2) {
if (_library[_local3] == _arg1){
return (_local3);
};
_local3++;
};
return (undefined);
}
public function contains(_arg1:DisplayObject):Boolean{
var _local2:int;
var _local3:int;
_local2 = _library.length;
_local3 = 0;
while (_local3 < _local2) {
if (_library[_local3] == _arg1){
return (true);
};
_local3++;
};
return (false);
}
public function removeChildAt(_arg1:int):DisplayObject{
_target.removeChild(_library[_arg1]);
delete _library[_arg1];
_update();
return (child);
}
public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{
_target.addChild(_arg1);
setIndex(_arg1, _arg2);
_update();
return (_arg1);
}
public function removeChild(_arg1:DisplayObject):DisplayObject{
_target.removeChild(_arg1);
_removeIndex(_arg1);
_update();
return (_arg1);
}
public function removeEvent(_arg1){
if (_events.hasOwnProperty(_arg1)){
_target.removeEventListener(_arg1, _events[_arg1]);
_events[_arg1] = null;
};
}
public function setIndex(_arg1:DisplayObject, _arg2:int):void{
_removeIndex(_arg1);
if (_library[_arg2]){
_library.splice(_arg2, 0, _arg1);
} else {
_library[_arg2] = _arg1;
};
_update();
}
public function destroy(){
var _local1:int;
var _local2:int;
_local1 = _target.numChildren;
_local2 = 0;
while (_local2 < _local1) {
_target.removeChildAt(0);
_local2++;
};
}
public function addChild(_arg1:DisplayObject):DisplayObject{
_target.addChild(_arg1);
setIndex(_arg1, _library.length);
_update();
return (_arg1);
}
private function _removeIndex(_arg1:DisplayObject):void{
var _local2:int;
var _local3:int;
_local2 = _library.length;
_local3 = 0;
while (_local3 < _local2) {
if (_library[_local3] == _arg1){
delete _library[_local3];
};
_local3++;
};
}
public function setEvent(_arg1, _arg2){
var fun2:*;
var event = _arg1;
var fun = _arg2;
removeEvent(event);
fun2 = function (_arg1){
fun();
};
_events[event] = fun2;
_target.addEventListener(event, fun2);
}
}
}//package dofi
Section 11
//Stick (dofi.Stick)
package dofi {
import flash.display.*;
public class Stick {
var size:Number;
public var goal;
public var top:Vec;
var limited;
public var middle:Vec;
var minsize:Number;
var maxsize:Number;
var collided:int;
public var hand:Vec;
var max_stretching;
var stretching;
public function Stick(_arg1:Vec){
hand = _arg1;
minsize = (size = 10);
maxsize = 150;
top = new Vec(hand.x, (hand.y + size));
top.addLink(hand);
middle = new Vec(0, 0);
middle.x = ((hand.x * 0.5) + (top.x * 0.5));
middle.y = ((hand.y * 0.5) + (top.y * 0.5));
collided = 0;
stretching = false;
limited = 0;
max_stretching = 0;
goal = false;
}
public function stretch(_arg1, _arg2, _arg3){
top.x = (top.x - _arg1);
top.y = (top.y - _arg2);
hand.x = (hand.x + _arg1);
hand.y = (hand.y + _arg2);
top.adjustUnit(hand, size);
if (!stretching){
top.px = top.x;
top.py = top.y;
};
stretching = true;
if (limited == 0){
size = (size + (4 * _arg3));
};
if (size < (maxsize * _arg3)){
} else {
size = (maxsize * _arg3);
max_stretching++;
};
}
public function update(){
var _local1:*;
var _local2:*;
if (stretching){
if (collided > 0){
if (max_stretching > 0){
top.update(0.05);
} else {
top.update(0.05);
};
} else {
top.update(0.99);
};
} else {
top.update(0.995);
};
top.y = (top.y + 0.1);
_local1 = ((middle.x - middle.px) * 0.5);
_local2 = ((middle.y - middle.py) * 0.5);
top.x = (top.x + _local1);
top.y = (top.y + _local2);
hand.x = (hand.x + _local1);
hand.x = (hand.x + _local2);
middle.px = (middle.x = ((hand.x * 0.5) + (top.x * 0.5)));
middle.py = (middle.y = ((hand.y * 0.5) + (top.y * 0.5)));
if (collided > 0){
collided--;
};
if (limited > 0){
limited--;
};
}
public function scale(){
return ((size / minsize));
}
public function hitTestMiddle(_arg1:MovieClip){
var _local2:Vec;
var _local3:int;
_local2 = middle;
_local3 = 0;
if (_arg1.hitTestPoint(_local2.x, _local2.y, true)){
_local2.x = ((_local2.x * 0.2) + (_local2.px * 0.8));
_local2.y = ((_local2.y * 0.5) + (_local2.py * 0.5));
dx = ((hand.x - _local2.x) * 0.001);
dy = (((hand.y - _local2.y) - 100) * 0.01);
while (_arg1.hitTestPoint(_local2.x, _local2.y, true)) {
_local2.x = (_local2.x + dx);
_local2.y = (_local2.y + dy);
_local3++;
if (_local3 > 20){
break;
};
};
};
hitTestHand(_arg1);
}
public function hitTest(_arg1:MovieClip){
var _local2:Vec;
var _local3:int;
_local2 = top;
_local3 = 0;
if (_arg1.hitTestPoint(_local2.x, _local2.y, true)){
if (_arg1.goal.hitTestPoint(_local2.x, _local2.y, true)){
goal = true;
};
collided = 3;
_local2.x = ((_local2.x * 0.2) + (_local2.px * 0.8));
_local2.y = ((_local2.y * 0.5) + (_local2.py * 0.5));
dx = ((hand.x - _local2.x) * 0.001);
dy = ((hand.y - _local2.y) * 0.01);
while (_arg1.hitTestPoint(_local2.x, _local2.y, true)) {
_local2.x = (_local2.x + dx);
_local2.y = (_local2.y + dy);
_local3++;
if (_local3 > 10){
break;
};
};
};
hitTestHand(_arg1);
}
public function adjust(){
if (stretching){
if (collided > 0){
if (max_stretching > 0){
top.adjustUnitRate(hand, size, 0.7);
} else {
top.adjustUnitRate(hand, size, 0.1);
};
} else {
top.adjustUnitRate(hand, size, 1);
};
} else {
top.adjustUnitRate(hand, size, 1);
};
}
public function addForce(_arg1){
top.x = (top.x + _arg1.x);
top.y = (top.y + _arg1.y);
}
public function unstretch(_arg1, _arg2){
stretching = false;
max_stretching = false;
size = (size - 10);
if (size < minsize){
size = minsize;
};
collided = 0;
}
public function hitTestHand(_arg1:MovieClip){
var _local2:Vec;
_local2 = hand;
if (_arg1.hitTestPoint(_local2.x, _local2.y, true)){
limited = 5;
};
}
public function trans(_arg1){
top.x = (top.x + _arg1.x);
top.y = (top.y + _arg1.y);
top.px = (top.px + _arg1.x);
top.py = (top.py + _arg1.y);
}
}
}//package dofi
Section 12
//Vec (dofi.Vec)
package dofi {
public class Vec {
public var y:Number;
public var vx:Number;
public var vy:Number;
public var px:Number;
public var py:Number;
public var distances:Array;
public var x:Number;
public var links:Array;
public function Vec(_arg1:Number, _arg2:Number){
x = _arg1;
y = _arg2;
px = _arg1;
py = _arg2;
vx = 0;
vy = 0;
links = [];
distances = [];
}
public function adjustUnitRate(_arg1:Vec, _arg2:Number, _arg3:Number){
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local4 = (_arg1.x - x);
_local5 = (_arg1.y - y);
_local6 = Math.sqrt(((_local4 * _local4) + (_local5 * _local5)));
_local7 = (_arg2 - _local6);
if (_local6 == 0){
return;
};
_local4 = (_local4 / _local6);
_local5 = (_local5 / _local6);
x = (x - (_local4 * (_local7 * _arg3)));
y = (y - (_local5 * (_local7 * _arg3)));
_arg1.x = (_arg1.x + (_local4 * (_local7 * (1 - _arg3))));
_arg1.y = (_arg1.y + (_local5 * (_local7 * (1 - _arg3))));
}
public function update(_arg1){
vx = (x - px);
vy = (y - py);
px = x;
py = y;
vx = (vx * _arg1);
vy = (vy * _arg1);
x = (x + vx);
y = (y + vy);
}
public function adjustLinks3(_arg1, _arg2){
var _local3:Number;
_local3 = 0;
while (_local3 < links.length) {
adjustUnitRate(links[_local3], (distances[_local3] * _arg1), _arg2);
_local3++;
};
}
public function adjustLinks2(_arg1){
var _local2:Number;
_local2 = 0;
while (_local2 < links.length) {
adjustUnit(links[_local2], (distances[_local2] * _arg1));
_local2++;
};
}
public function adjustLinks(){
var _local1:Number;
_local1 = 0;
while (_local1 < links.length) {
adjustUnit(links[_local1], distances[_local1]);
_local1++;
};
}
public function clearLinks(){
links = [];
distances = [];
}
public function distance(_arg1:Vec){
var _local2:Number;
var _local3:Number;
_local2 = (x - _arg1.x);
_local3 = (y - _arg1.y);
return (Math.sqrt(((_local2 * _local2) + (_local3 * _local3))));
}
public function adjustUnit(_arg1:Vec, _arg2:Number){
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
_local3 = (_arg1.x - x);
_local4 = (_arg1.y - y);
_local5 = Math.sqrt(((_local3 * _local3) + (_local4 * _local4)));
_local6 = (_arg2 - _local5);
if (_local5 == 0){
return;
};
_local3 = ((_local3 / _local5) * (_local6 * 0.5));
_local4 = ((_local4 / _local5) * (_local6 * 0.5));
x = (x - _local3);
y = (y - _local4);
_arg1.x = (_arg1.x + _local3);
_arg1.y = (_arg1.y + _local4);
}
public function addLink(_arg1:Vec){
if (Math.random() < 0.5){
links.push(_arg1);
distances.push(distance(_arg1));
} else {
links.unshift(_arg1);
distances.unshift(distance(_arg1));
};
}
}
}//package dofi
Section 13
//Field (Field)
package {
import flash.display.*;
public dynamic class Field extends MovieClip {
public var start_pos:MovieClip;
public var goal:MovieClip;
}
}//package
Section 14
//View (View)
package {
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.utils.*;
public dynamic class View extends MovieClip {
public var power:MovieClip;
public var time:TextField;
public function View(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
set_info = function (_arg1, _arg2, _arg3){
level.text = _arg1;
m.text = _arg2;
m2.text = _arg3;
};
}
}
}//package