Frame 1
Application.main();
Symbol 2 MovieClip [__Packages.Application] Frame 0
class Application extends MovieClip
{
var getNextHighestDepth, st;
function Application () {
super();
}
function init() {
var _local6;
var _local9 = 0;
var _local4 = 16777215 /* 0xFFFFFF */;
var _local8 = 0.6;
if ((_level0.up_backgroundColor != null) && (_level0.up_backgroundColor != "")) {
_local4 = parseInt("0x" + _level0.up_backgroundColor);
}
if ((_level0.up_stingrayColor != null) && (_level0.up_stingrayColor != "")) {
_local9 = parseInt("0x" + _level0.up_stingrayColor);
}
if (((_level0.up_backgroundImage != null) && (_level0.up_backgroundImage != "")) && (_level0.up_backgroundImage != "http://")) {
createBackgroundImage(_level0.up_backgroundImage);
}
if ((_level0.up_speed != null) && (_level0.up_speed != "")) {
_local8 = _level0.up_speed;
}
var _local3 = new ContextMenu();
_local3.hideBuiltInItems();
var _local5 = new ContextMenuItem("Find more creatures at aBowman.com", function () {
this.getURL("http://aBowman.com/google-modules/", "_top");
});
_local3.customItems.push(_local5);
_root.menu = _local3;
var _local7 = com.abowman.graphics.Draw.calcGradient(_local4, 80);
_local6 = ABowmanLink2.create(this, getNextHighestDepth(), "http://aBowman.com/google-modules/stingray", _local7);
_local6._x = 1;
Stage.align = "TL";
Stage.scaleMode = "noScale";
st = Stingray.create(this, getNextHighestDepth(), {x:Math.random() * Stage.width, y:Math.random() * Stage.height, color:_local9, speed:_local8});
}
function createBackgroundImage(path) {
_root.createEmptyMovieClip("backgroundImage", -200);
_root.backgroundImage.createEmptyMovieClip("container_mc", 0);
_root.backgroundImage.container_mc.loadMovie(path);
_root.backgroundImage.onEnterFrame = function () {
if (this.container_mc._width > 0) {
this._x = Math.max((Stage.width / 2) - (this.container_mc._width / 2), 0);
this._y = Math.max((Stage.height / 2) - (this.container_mc._height / 2), 0);
delete this.onEnterFrame;
}
};
}
function onEnterFrame() {
if (Stage.height > 2) {
if (getMouseAng) {
st.rotateToPoint(st._xmouse, st._ymouse);
} else {
st.moveRandom();
}
st.update();
}
}
function onMouseMove() {
if ((((_root._xmouse > 15) && (_root._xmouse < (Stage.width - 15))) && (_root._ymouse > 15)) && (_root._ymouse < (Stage.height - 15))) {
getMouseAng = true;
} else {
getMouseAng = false;
}
}
static function createMovie(parent, depth) {
var _local1 = Application(parent.attachMovie(symbolName, "Application" + depth, depth));
_local1.init();
return(_local1);
}
static function main(mc) {
createMovie(_root, _root.getNextHighestDepth());
}
static var symbolName = "__Packages.Application";
static var symbolLinked = Object.registerClass(symbolName, Application);
var getMouseAng = false;
}
Symbol 3 MovieClip [__Packages.Stingray] Frame 0
class Stingray extends MovieClip
{
var segments, x, y, createEmptyMovieClip, getNextHighestDepth;
function Stingray () {
super();
}
static function create(parent, depth, args) {
var _local1 = Stingray(parent.attachMovie(symbolName, "Stingray" + depth, depth));
_local1.init(args);
return(_local1);
}
function init(args) {
segments = new Array();
x = args.x;
y = args.y;
var _local3 = 1.4;
var _local4 = 1.2;
if (args.speed != null) {
speed = (Math.max(Math.min(1, args.speed), 0) * _local4) + _local3;
}
createBody(args.color);
}
function createBody(color) {
var _local4 = createEmptyMovieClip("mSegment", getNextHighestDepth());
angle = (Math.random() * Math.PI) * 2;
var _local8 = [16777215, color];
var _local6 = [100, 100];
var _local9 = [0, 220];
var _local7 = {matrixType:"box", x:-5, y:-6, w:10, h:10, r:4.71238898038469};
_local4.beginGradientFill("linear", _local8, _local6, _local9, _local7);
com.abowman.graphics.Draw.drawOval(_local4, 0, 0, 5, 5);
_local4.endFill();
_local4._visible = false;
var _local2;
var _local5 = getNextHighestDepth() + 200;
var _local3 = 0;
while (_local3 < numSegments) {
_local2 = _local4.duplicateMovieClip("segment" + _local3, _local5 - _local3);
if ((_local3 < 10) && (_local3 != 0)) {
_local2._xscale = (segments[_local3 - 1]._xscale + ((_local3 - 8.5) * (_local3 - 8.5))) + 60;
} else if (_local3 < 20) {
_local2._xscale = segments[_local3 - 1]._xscale - ((_local3 - 6.5) * (_local3 - 6.5));
} else {
_local2._xscale = segments[_local3 - 1]._xscale - ((_local3 - 6.5) * (_local3 - 6.5));
_local2._width = segments[_local3 - 1]._width - 0.5;
_local2._height = segments[_local3 - 1]._height - 0.5;
}
segments.push(_local2);
_local3++;
}
_local3 = 0;
while (_local3 < numSegments) {
update();
moveRandom();
_local3++;
}
}
function update() {
x = x + (Math.cos(angle) * speed);
y = y + (Math.sin(angle) * speed);
var _local2 = numSegments;
while (_local2 > 0) {
segments[_local2]._x = segments[_local2 - 1]._x;
segments[_local2]._y = segments[_local2 - 1]._y;
_local2--;
}
segments[0]._x = x;
segments[0]._y = y;
}
function rotateToPoint(px, py) {
var _local3 = px - x;
var _local4 = py - y;
var _local5 = Math.atan2(_local4, _local3);
var _local2 = angle - _local5;
_local2 = _local2 % 6.28318531;
if (_local2 < 0) {
_local2 = _local2 + 6.28318531;
}
var _local6 = Math.sqrt((_local3 * _local3) + (_local4 * _local4));
if (_local6 > 5) {
if ((_local2 > 0.698131701) && (_local2 < 3.14159265)) {
angle = angle - angleSpeed;
} else if ((_local2 < 5.58505361) && (_local2 > 3.14159265)) {
angle = angle + angleSpeed;
} else {
count = count + 0.2;
angle = (Math.sin(count) * 0.52) + _local5;
}
}
}
function moveRandom() {
var _local2 = 40;
var _local6 = -_local2;
var _local5 = -_local2;
var _local4 = Stage.width + _local2;
var _local3 = Stage.height + _local2;
((x < _local6) ? ((x = _local4)) : null);
((x > _local4) ? ((x = _local6)) : null);
((y > _local3) ? ((y = _local5)) : null);
((y < _local5) ? ((y = _local3)) : null);
if (int(Math.random() * 5) == 4) {
((((Math.random() * 2) - 1) < 0) ? ((hDir = hDir * -1)) : null);
}
angle = angle + (hDir * angleSpeed);
angle = angle % 6.28318531;
if (angle < 0) {
angle = angle + 6.28318531;
}
}
static var symbolName = "__Packages.Stingray";
static var symbolLinked = Object.registerClass(symbolName, Stingray);
var hDir = 1;
var speed = 2;
var angle = 0;
var angleSpeed = 0.087;
var numSegments = 35;
var count = 0;
}
Symbol 4 MovieClip [__Packages.com.abowman.graphics.Draw] Frame 0
class com.abowman.graphics.Draw
{
function Draw () {
}
static function drawOval(mc, x, y, rx, ry) {
mc.moveTo(x + rx, y);
mc.curveTo(rx + x, (0.4142 * ry) + y, (0.7071 * rx) + x, (0.7071 * ry) + y);
mc.curveTo((0.4142 * rx) + x, ry + y, x, ry + y);
mc.curveTo((-0.4142 * rx) + x, ry + y, (-0.7071 * rx) + x, (0.7071 * ry) + y);
mc.curveTo((-rx) + x, (0.4142 * ry) + y, (-rx) + x, y);
mc.curveTo((-rx) + x, (-0.4142 * ry) + y, (-0.7071 * rx) + x, (-0.7071 * ry) + y);
mc.curveTo((-0.4142 * rx) + x, (-ry) + y, x, (-ry) + y);
mc.curveTo((0.4142 * rx) + x, (-ry) + y, (0.7071 * rx) + x, (-0.7071 * ry) + y);
mc.curveTo(rx + x, (-0.4142 * ry) + y, rx + x, y);
}
static function drawRect(mc, x1, y1, width, height) {
mc.moveTo(x1, y1);
mc.lineTo(x1 + width, y1);
mc.lineTo(x1 + width, y1 + height);
mc.lineTo(x1, y1 + height);
mc.lineTo(x1, y1);
}
static function drawWedge(mc, x, y, startAngle, arc, radius, yRadius) {
if (arguments.length < 5) {
return(undefined);
}
mc.moveTo(x, y);
if (yRadius == undefined) {
yRadius = radius;
}
var _local20;
var _local2;
var _local3;
var _local5;
var _local14;
var _local19;
var _local18;
var _local13;
var _local11;
var _local12;
var _local10;
if (Math.abs(arc) > 360) {
arc = 360;
}
_local14 = Math.ceil(Math.abs(arc) / 45);
_local20 = arc / _local14;
_local2 = (-(_local20 / 180)) * Math.PI;
_local3 = (-(startAngle / 180)) * Math.PI;
if (_local14 > 0) {
_local19 = x + (Math.cos((startAngle / 180) * Math.PI) * radius);
_local18 = y + (Math.sin(((-startAngle) / 180) * Math.PI) * yRadius);
mc.lineTo(_local19, _local18);
var _local4 = 0;
while (_local4 < _local14) {
_local3 = _local3 + _local2;
_local5 = _local3 - (_local2 / 2);
_local13 = x + (Math.cos(_local3) * radius);
_local11 = y + (Math.sin(_local3) * yRadius);
_local12 = x + (Math.cos(_local5) * (radius / Math.cos(_local2 / 2)));
_local10 = y + (Math.sin(_local5) * (yRadius / Math.cos(_local2 / 2)));
mc.curveTo(_local12, _local10, _local13, _local11);
_local4++;
}
mc.lineTo(x, y);
}
}
static function drawArc(mc, x, y, radius, arc, startAngle, yRadius) {
if (arguments.length < 5) {
return(null);
}
if (yRadius == undefined) {
yRadius = radius;
}
var _local17;
var _local3;
var _local2;
var _local5;
var _local14;
var _local10;
var _local8;
var _local9;
var _local7;
var _local13;
var _local12;
if (Math.abs(arc) > 360) {
arc = 360;
}
_local14 = Math.ceil(Math.abs(arc) / 45);
_local17 = arc / _local14;
_local3 = (-(_local17 / 180)) * Math.PI;
_local2 = (-(startAngle / 180)) * Math.PI;
_local10 = x - (Math.cos(_local2) * radius);
_local8 = y - (Math.sin(_local2) * yRadius);
if (_local14 > 0) {
var _local4 = 0;
while (_local4 < _local14) {
_local2 = _local2 + _local3;
_local5 = _local2 - (_local3 / 2);
_local9 = _local10 + (Math.cos(_local2) * radius);
_local7 = _local8 + (Math.sin(_local2) * yRadius);
_local13 = _local10 + (Math.cos(_local5) * (radius / Math.cos(_local3 / 2)));
_local12 = _local8 + (Math.sin(_local5) * (yRadius / Math.cos(_local3 / 2)));
mc.curveTo(_local13, _local12, _local9, _local7);
_local4++;
}
}
return({x:_local9, y:_local7});
}
static function calcGradient(hex, percent) {
var _local2 = hexToRGB(hex);
var _local1 = RGBToHLS(_local2.r, _local2.g, _local2.b);
_local1.l = _local1.l * (percent / 100);
if (_local1.l > 240) {
_local1.l = 240;
}
if (_local1.l < 0) {
_local1.l = 0;
}
_local2 = HLSToRGB(_local1.h, _local1.l, _local1.s);
return(RGBToHex(_local2.r, _local2.g, _local2.b));
}
static function hexToRGB(hex) {
var _local1 = new Object();
_local1.r = hex >> 16;
var _local2 = hex ^ (_local1.r << 16);
_local1.g = _local2 >> 8;
_local1.b = _local2 ^ (_local1.g << 8);
return(_local1);
}
static function RGBToHex(r, g, b) {
var _local1 = ((r << 16) ^ (g << 8)) ^ b;
return(_local1);
}
static function RGBToHLS(r, g, b) {
var _local9;
var _local8;
var _local7;
var _local1 = Math.max(Math.max(r, g), b) / 255;
var _local5 = Math.min(Math.min(r, g), b) / 255;
var _local2 = _local1 - _local5;
_local8 = (_local1 + _local5) / 2;
_local7 = ((_local1 == _local5) ? 0 : (((_local8 <= 0.5) ? ((_local2 / _local8) / 2) : (_local2 / (2 - (_local8 * 2))))));
if ((r / 255) == _local1) {
_local9 = ((g - b) / _local2) / 255;
} else if ((g / 255) == _local1) {
_local9 = 2 + (((b - r) / _local2) / 255);
} else if ((b / 255) == _local1) {
_local9 = 4 + (((r - g) / _local2) / 255);
}
_local9 = _local9 * 40;
if (_local9 < 0) {
_local9 = _local9 + 240;
}
_local9 = Math.round(_local9);
return({h:(isNaN(_local9) ? 0 : (_local9)), l:Math.round(_local8 * 240), s:Math.round(_local7 * 240)});
}
static function HLSToRGB(h, l, s) {
var _local10;
var _local11;
var _local9;
if (s == 0) {
_local9 = Math.round((l / 240) * 255);
_local11 = _local9;
_local10 = _local11;
} else {
h = h / 240;
l = l / 240;
s = s / 240;
var _local2;
var _local1;
var _local5 = ((l < 0.5) ? (l * (s + 1)) : ((l + s) - (l * s)));
var _local4 = (l * 2) - _local5;
var _local3 = 0;
while (_local3 < 3) {
switch (_local3) {
case 0 :
_local1 = h + 0.333333333333333;
break;
case 1 :
_local1 = h;
break;
case 2 :
_local1 = h - 0.333333333333333;
}
if (_local1 < 0) {
_local1++;
} else if (_local1 > 1) {
_local1--;
}
if ((_local1 * 6) < 1) {
_local2 = _local4 + (((_local5 - _local4) * 6) * _local1);
} else if ((_local1 * 2) < 1) {
_local2 = _local5;
} else if ((_local1 * 3) < 2) {
_local2 = _local4 + (((_local5 - _local4) * (0.666666666666667 - _local1)) * 6);
} else {
_local2 = _local4;
}
switch (_local3) {
case 0 :
_local10 = Math.round(_local2 * 255);
break;
case 1 :
_local11 = Math.round(_local2 * 255);
break;
case 2 :
_local9 = Math.round(_local2 * 255);
}
_local3++;
}
}
return({r:_local10, g:_local11, b:_local9});
}
}
Symbol 5 MovieClip [__Packages.ABowmanLink2] Frame 0
class ABowmanLink2 extends MovieClip
{
var url, aBowmanCon, createEmptyMovieClip, getNextHighestDepth, aBowman, aBowmanMask;
function ABowmanLink2 () {
super();
}
static function create(parent, depth, url, color) {
var _local1 = ABowmanLink2(parent.attachMovie(symbolName, "Link" + depth, depth));
_local1.init(color, url);
return(_local1);
}
function init(color, url) {
this.url = url;
aBowmanCon = createEmptyMovieClip("aBowmanCon", getNextHighestDepth());
aBowman = aBowmanCon.createEmptyMovieClip("aBowman", aBowmanCon.getNextHighestDepth());
aBowmanMask = aBowmanCon.createEmptyMovieClip("aBowmanMask", aBowmanCon.getNextHighestDepth());
aBowman.onRollOver = function () {
this._parent.aBowmanMask.onEnterFrame = this._parent.aBowmanMask.expand;
};
aBowman.onRollOut = function () {
this._parent.aBowmanMask.onEnterFrame = this._parent.aBowmanMask.shrink;
};
aBowman.onRelease = function () {
this.getURL(url, "_top");
};
aBowmanMask.maxWidth = mask_maxWidth;
aBowmanMask.minWidth = mask_minWidth;
aBowmanMask.height = mask_height;
aBowmanMask.width = aBowmanMask.minWidth;
aBowmanMask.boxX = -2;
aBowmanMask.expand = function () {
this.width = this.width + ((this.maxWidth - this.width) * 0.2);
if ((this.maxWidth - this.width) < 0.1) {
delete this.onEnterFrame;
}
this.render();
};
aBowmanMask.shrink = function () {
this.width = this.width - ((this.width - this.minWidth) * 0.2);
if ((this.width - this.minWidth) < 0.1) {
delete this.onEnterFrame;
}
this.render();
};
aBowmanMask.render = function () {
this.clear();
this.beginFill(0);
this.lineTo(this.boxX, 0);
this.lineTo(this.boxX + this.width, 0);
this.lineTo(this.boxX + this.width, this.height);
this.lineTo(this.boxX, this.height);
this.lineTo(this.boxX, 0);
this.endFill();
};
aBowmanMask.render();
aBowman.setMask(aBowmanMask);
var _local2 = new TextFormat();
_local2.size = 20;
_local2.font = "Pupcat";
_local2.color = color;
aBowman.createTextField("txt", aBowman.getNextHighestDepth(), 0, 0, 50, 50);
aBowman.txt.antiAliasType = "advanced";
aBowman.txt.gridFitType = "subpixel";
aBowman.txt.autoSize = true;
aBowman.txt.text = "aBowman";
aBowman.txt.embedFonts = true;
aBowman.txt.setTextFormat(_local2);
}
static var symbolName = "__Packages.ABowmanLink2";
static var symbolLinked = Object.registerClass(symbolName, ABowmanLink2);
var mask_maxWidth = 80;
var mask_minWidth = 23;
var mask_height = 25;
}
Symbol 6 MovieClip [__Packages.Logo] Frame 0
class Logo extends MovieClip
{
var lineStyle, beginFill, endFill, moveTo, curveTo, lineTo, _rotation;
function Logo () {
super();
}
function render() {
lineStyle(4, lineColor);
beginFill(fillColor, 0);
com.abowman.graphics.Draw.drawOval(this, -13, 30, 10, 7);
com.abowman.graphics.Draw.drawOval(this, 13, 30, 10, 7);
com.abowman.graphics.Draw.drawOval(this, 0, 43, 7, 10);
endFill();
moveTo(0, 30);
curveTo(1, 16, -6, 9);
moveTo(0, 30);
curveTo(1, 16, -10, 13);
moveTo(-6, 9);
lineTo(-10, 13);
_rotation = -45;
}
static function create(parent, depth, lineColor, fillColor) {
var _local1 = Logo(parent.attachMovie(symbolName, "Logo" + depth, depth));
_local1.init(lineColor, fillColor);
return(_local1);
}
function init(lineColor, fillColor) {
if (lineColor != null) {
this.lineColor = lineColor;
}
if (fillColor != null) {
this.fillColor = fillColor;
}
render();
}
static var symbolName = "__Packages.Logo";
static var symbolLinked = Object.registerClass(symbolName, Logo);
var lineColor = 8421504;
var fillColor = 16777215;
}