Frame 1
_root.flasheffect = true;
_root.smokeeffect = true;
if (_root.getBytesLoaded() >= _root.getBytesTotal()) {
gotoAndStop (3);
} else {
_root.loadedtext = String(Math.ceil((_root.getBytesLoaded() / _root.getBytesTotal()) * 100)) + "%";
}
Instance of Symbol 250 MovieClip in Frame 1
onClipEvent (load) {
myColorTransform = new Object();
myColorTransform = {rb:random(40) - random(40), gb:random(40) - random(40), bb:random(40) - random(40)};
myColor = new Color(this);
myColor.setTransform(myColorTransform);
}
Instance of Symbol 273 MovieClip "crosshair" in Frame 1
onClipEvent (load) {
startDrag (this, true);
Mouse.hide();
}
Frame 2
gotoAndPlay (1);
Frame 3
level = 0;
planetlevel = 1;
startweapon = 2;
story = false;
lives = 3;
strWeapons = "";
strAmmo = "";
strWeapons = (strWeapons + "Level 1 Laser Pistol") + "|";
strAmmo = (strAmmo + "90") + "|";
strWeapons = (strWeapons + "Level 2 Laser Pistol") + "|";
strAmmo = (strAmmo + "50") + "|";
strWeapons = (strWeapons + "Level 3 Laser Pistol") + "|";
strAmmo = (strAmmo + "50") + "|";
strWeapons = (strWeapons + "Level 1 Laser Rifle") + "|";
strAmmo = (strAmmo + "20") + "|";
strWeapons = (strWeapons + "Level 1 Auto Cannon") + "|";
strAmmo = (strAmmo + "50") + "|";
strWeapons = (strWeapons + "Level 1 Scatter Cannon") + "|";
strAmmo = (strAmmo + "10") + "|";
strWeapons = (strWeapons + "Level 2 Laser Rifle") + "|";
strAmmo = (strAmmo + "20") + "|";
strWeapons = (strWeapons + "Level 2 Scatter Cannon") + "|";
strAmmo = (strAmmo + "10") + "|";
strWeapons = (strWeapons + "Level 2 Auto Cannon") + "|";
strAmmo = (strAmmo + "75") + "|";
strWeapons = (strWeapons + "Level 3 Laser Rifle") + "|";
strAmmo = (strAmmo + "20") + "|";
strWeapons = (strWeapons + "Level 1 Plasma Cannon") + "|";
strAmmo = (strAmmo + "10") + "|";
strWeapons = (strWeapons + "Charged Plasma Launcher") + "|";
strAmmo = (strAmmo + "15") + "|";
strWeapons = (strWeapons + "Level 3 Scatter Cannon") + "|";
strAmmo = (strAmmo + "10") + "|";
strWeapons = (strWeapons + "Particle Rifle") + "|";
strAmmo = (strAmmo + "20") + "|";
strWeapons = (strWeapons + "Level 2 Plasma Cannon") + "|";
strAmmo = (strAmmo + "10") + "|";
strWeapons = (strWeapons + "Rocket Propelled Grenade Launcher") + "|";
strAmmo = (strAmmo + "10") + "|";
strWeapons = (strWeapons + "Level 3 Auto Cannon") + "|";
strAmmo = (strAmmo + "100") + "|";
strWeapons = (strWeapons + "Level 3 Plasma Cannon") + "|";
strAmmo = (strAmmo + "25") + "|";
strWeapons = strWeapons + "Particle Auto Cannon";
strAmmo = strAmmo + "50";
arrWeapons = strWeapons.split("|");
arrAmmo = strAmmo.split("|");
_root.weapon = arrWeapons[startweapon];
_root.ammo = arrAmmo[startweapon];
function getlevelcode(moon) {
if (moon > 1) {
return(levelcodes[moon - 2]);
}
return("start");
}
function loadlevel(code) {
intReturn = 0;
i = 0;
while (i < levelcodes.length) {
if (code.toLowerCase() == levelcodes[i]) {
intReturn = (i + 1) * 3;
_root.cheat = "";
}
i++;
}
if (intReturn == 0) {
_root.cheat = code.toLowerCase();
if (_root.cheat != "shineynewgun") {
_root.weapon = arrWeapons[2];
_root.ammo = arrAmmo[2];
} else {
_root.weapon = arrWeapons[18];
_root.ammo = arrAmmo[18];
}
} else {
_root.weapon = arrWeapons[(intReturn / 3) + 1];
_root.ammo = arrAmmo[(intReturn / 3) + 1];
}
return(intReturn);
}
function getangle(obj1, obj2, yoffset) {
x = obj2._x - obj1._x;
y = (obj2._y - obj1._y) - yoffset;
if (x > 0) {
angle = ((Math.atan(y / x) / Math.PI) * 180) + 90;
} else {
angle = 180 - (((Math.atan(y / x) / Math.PI) * 180) + 90);
}
return(angle);
}
function SetWeapon(component) {
_root.weapon = arrWeapons[component.getSelectedIndex()];
_root.ammo = arrAmmo[component.getSelectedIndex()];
}
function SwapWeapon() {
target = _root.game.player.topickup;
if (String(target) != "") {
targetweapon = target.weapon;
targetammo = target.ammo;
target.weapon = game.player.weapon;
target.ammo = game.player.ammo;
game.player.weapon = targetweapon;
game.player.ammo = targetammo;
}
}
function setrandomcolours() {
_root.rb = random(40) - random(80);
_root.gb = random(40) - random(80);
_root.bb = random(40) - random(80);
_root.bgrb = random(40) - random(40);
_root.bggb = random(40) - random(40);
_root.bgbb = random(40) - random(40);
}
function RandomWeapon(obj) {
max = _root.level + 1;
min = 0;
if (max > arrWeapons.length) {
max = arrWeapons.length;
min = _root.level - arrWeapons.length;
}
max = random(max - min) + min;
if (max > (arrWeapons.length - 1)) {
max = arrWeapons.length - 1;
}
if (obj.level < Math.floor(max / 3)) {
obj.level = Math.floor(max / 3);
}
obj.weapon = arrWeapons[max];
obj.ammo = arrAmmo[max];
}
function collision(proj, target) {
if (target.man == true) {
twidth = 30;
theight = 50;
} else {
twidth = target._width;
theight = target._height;
}
if ((((proj._x <= (target._x + (twidth / 2))) && (proj._x >= (target._x - (twidth / 2)))) && (proj._y >= (target._y - theight))) && (proj._y <= target._y)) {
return(proj.hitTest(target));
}
return(false);
}
function hittarget(obj) {
target = "";
for (object in game) {
if ((object == "player") || (object.indexOf("enemy") > -1)) {
if (((eval ("game." + object).dead != true) && (eval ("game." + object).team != obj.firerteam)) && (collision(obj, eval ("game." + object)))) {
target = eval ("game." + object);
}
}
}
return(target);
}
function explode(obj, damage, range) {
target = "";
for (object in game) {
if ((object == "player") || (object.indexOf("enemy") > -1)) {
if (eval ("game." + object).dead != true) {
dist = Math.abs(eval ("game." + object)._x - obj._x);
if (dist < range) {
target = eval ("game." + object);
if (!((_root.cheat == "wellard") && (object == "player"))) {
target.shield = target.shield - Math.ceil(damage * ((range - dist) / range));
}
target.alert = true;
} else if (dist < (range * 2)) {
target.alert = true;
}
}
}
}
}
function gravity(obj) {
obj.framescharged = obj.framescharged + 1;
if (obj.gravitystartset != true) {
obj.gravitystartset = true;
i = 0;
while (i <= 200) {
gravity(obj);
i++;
}
}
if (_root.game.surface.hittest(obj._x + _root.game._x, obj._y + obj.upspeed, true) && (obj.upspeed < 0)) {
obj.upspeed = 0;
obj.onground = true;
} else {
if (_root.game.surface.hittest(obj._x + _root.game._x, obj._y + 10, true)) {
obj.onground = true;
} else {
obj.onground = false;
}
if ((obj.upspeed > -3) && (_root.game.surface.hittest(obj._x + _root.game._x, obj._y + 2, true) == false)) {
obj.upspeed = obj.upspeed - 0.1;
}
setProperty(obj, _y , obj._y - obj.upspeed);
}
}
function move(obj, amount) {
if (_root.game.surface.hittest((obj._x + _root.game._x) + amount, obj._y + obj.upspeed, true)) {
obj.onground = true;
moveup = -1;
i = 0;
while (i <= 15) {
if (_root.game.surface.hitTest((obj._x + _root.game._x) + amount, obj._y - i, true) || (moveup > -1)) {
} else {
moveup = i;
}
i++;
}
if (moveup > -1) {
setProperty(obj, _x , obj._x + amount);
setProperty(obj, _y , obj._y - moveup);
}
} else if (((obj._x + amount) > 10) && ((obj._x + ((amount < 2355) && (obj == game.player))) || (obj._x + ((amount < 2300) && (obj != game.player))))) {
setProperty(obj, _x , obj._x + amount);
}
}
function shoot(obj, angle, yoffset, weapon) {
amount = 1;
firesound = "";
if (weapon == "Level 3 Laser Pistol") {
weaponmcid = "Laser";
weaponmcolour = 4;
accuracy = 10;
firingrate = 20;
firesound = "pistol";
} else if (weapon == "Level 1 Laser Pistol") {
weaponmcid = "Laser";
weaponmcolour = 1;
accuracy = 30;
firingrate = 30;
firesound = "pistol";
} else if (weapon == "Level 2 Laser Pistol") {
weaponmcid = "Laser";
weaponmcolour = 3;
accuracy = 20;
firingrate = 20;
firesound = "pistol";
} else if (weapon == "Level 1 Auto Cannon") {
weaponmcid = "Laser";
weaponmcolour = 1;
accuracy = 30;
firingrate = 4;
firesound = "pistol";
} else if (weapon == "Level 2 Auto Cannon") {
weaponmcid = "Laser";
weaponmcolour = 2;
accuracy = 15;
firingrate = 2;
firesound = "pistol";
} else if (weapon == "Level 3 Auto Cannon") {
weaponmcid = "Laser";
weaponmcolour = 3;
accuracy = 5;
firingrate = 1;
firesound = "pistol";
} else if (weapon == "Particle Auto Cannon") {
weaponmcid = "Ultra Laser";
weaponmcolour = 3;
accuracy = 5;
firingrate = 3;
firesound = "particle";
} else if (weapon == "Turret Laser") {
weaponmcid = "Laser";
weaponmcolour = 2;
accuracy = 1;
firingrate = 20;
firesound = "pistol";
} else if (weapon == "Level 1 Laser Rifle") {
weaponmcid = "Laser";
weaponmcolour = 5;
accuracy = 0;
firingrate = 30;
firesound = "rifle";
} else if (weapon == "Level 2 Laser Rifle") {
weaponmcid = "Laser";
weaponmcolour = 5;
accuracy = 0;
firingrate = 20;
firesound = "rifle";
} else if (weapon == "Level 3 Laser Rifle") {
weaponmcid = "Fast Laser";
weaponmcolour = 5;
accuracy = 0;
firingrate = 20;
firesound = "rifle";
} else if (weapon == "Particle Rifle") {
weaponmcid = "Ultra Laser";
weaponmcolour = 5;
accuracy = 0;
firingrate = 30;
firesound = "particle";
} else if (weapon == "Level 1 Scatter Cannon") {
amount = 4;
weaponmcid = "Laser";
weaponmcolour = 1;
accuracy = 20;
firingrate = 30;
firesound = "shotgun";
} else if (weapon == "Level 2 Scatter Cannon") {
amount = 7;
weaponmcid = "Laser";
weaponmcolour = 2;
accuracy = 15;
firingrate = 30;
firesound = "shotgun";
} else if (weapon == "Particle Scatter Cannon") {
amount = 7;
weaponmcid = "Ultra Laser";
weaponmcolour = 2;
accuracy = 15;
firingrate = 30;
firesound = "shotgun";
} else if (weapon == "Level 3 Scatter Cannon") {
amount = 10;
weaponmcid = "Laser";
weaponmcolour = 3;
accuracy = 20;
firingrate = 30;
firesound = "shotgun";
} else if (weapon == "Grenade") {
weaponmcid = "Grenade";
weaponmcolour = 1;
accuracy = 5;
firingrate = 30;
} else if (weapon == "Charged Plasma Launcher") {
weaponmcid = "Plasma";
weaponmcolour = 1;
accuracy = 5;
firingrate = 40;
firesound = "launch";
} else if (weapon == "Level 1 Plasma Cannon") {
weaponmcid = "Phased Plasma";
weaponmcolour = 1;
accuracy = 0;
firingrate = 30;
firesound = "Plasma";
} else if (weapon == "Level 2 Plasma Cannon") {
weaponmcid = "Phased Plasma";
weaponmcolour = 2;
accuracy = 0;
firingrate = 20;
firesound = "Plasma";
} else if (weapon == "Level 3 Plasma Cannon") {
weaponmcid = "Phased Plasma";
weaponmcolour = 3;
accuracy = 0;
firingrate = 7;
firesound = "Plasma";
} else if (weapon == "Plasma Minor") {
weaponmcid = "PlasmaMinor";
weaponmcolour = 1;
accuracy = 5;
firingrate = -1;
firesound = "Plasma";
} else if (weapon == "Rocket Propelled Grenade Launcher") {
weaponmcid = "RPG";
weaponmcolour = 1;
accuracy = 5;
firingrate = 40;
} else if (weapon == "losd") {
weaponmcid = "losd";
weaponmcolour = 1;
accuracy = 2;
firingrate = 5;
} else {
trace("Unknown Weapon: " + weapon);
}
if (((obj.framescharged > firingrate) && ((obj.ammo > 0) && (weapon != "Grenade"))) || ((obj.grenadeammo > 0) && (weapon == "Grenade"))) {
if (_root.cheat != "wellstocked") {
if (weapon == "Grenade") {
obj.grenadeammo = obj.grenadeammo - 1;
} else {
obj.ammo = obj.ammo - 1;
}
}
if (firesound != "") {
_root.sound.gotoAndPlay(firesound);
}
obj.framescharged = 0;
i = 0;
while (i < amount) {
lasernum = lasernum + 1;
if (lasernum > 400) {
lasernum = 1;
}
newName = "laser" + lasernum;
game.attachMovie(weaponmcid, newName, lasernum + 100);
setProperty("_root.game." + newName, _rotation , (angle + random(accuracy)) - random(accuracy));
setProperty("_root.game." + newName, _x , obj._x);
setProperty("_root.game." + newName, _y , obj._y - yoffset);
Set(("_root.game." + newName) + ".firer", obj);
Set(("_root.game." + newName) + ".colour", weaponmcolour);
Set(("_root.game." + newName) + ".firerteam", obj.team);
i++;
}
}
}
function smoke(x, y) {
if (_root.smokeeffect == true) {
smokenum = smokenum + 1;
if (smokenum > 30) {
smokenum = 0;
}
newName = "smoke" + smokenum;
game.attachMovie("Smoke", newName, smokenum + 1000);
setProperty("_root.game." + newName, _x , x);
setProperty("_root.game." + newName, _y , y);
}
}
levelcodes = new Array("plasma", "photon", "xenon", "apollo", "xenomorph", "spock", "quasar", "velocity", "dalek", "sputnik", "armstrong");
setrandomcolours();
lasernum = 1;
stop();
stopAllSounds();
setProperty("_root", _quality , "medium");
Instance of Symbol 250 MovieClip in Frame 3
onClipEvent (load) {
myColorTransform = new Object();
myColorTransform = {rb:_root.bgrb, gb:_root.bggb, bb:_root.bgbb};
myColor = new Color(this);
myColor.setTransform(myColorTransform);
}
Instance of Symbol 282 MovieClip "game" in Frame 3
onClipEvent (enterFrame) {
setProperty(this, _x , _x - 1);
}
Instance of Symbol 363 MovieClip "game" in Frame 4
onClipEvent (enterFrame) {
dragSq = new Object();
dragSq.x = player._x;
dragSq.y = player._y;
this.localToGlobal(dragSq);
globalX = dragSq.x;
globalY = dragSq.y;
xscrollspeed = ((globalX + _root._xmouse) - 375) - 375;
_root.thexscroll = _x;
_root.thewidth = _width;
if (((_x - (xscrollspeed / 50)) < 0) && ((-(_x - (xscrollspeed / 50))) < 1600)) {
setProperty(this, _x , _x - (xscrollspeed / 50));
_root.goarrow.show = false;
} else {
_root.goarrow.show = true;
}
}
Instance of Symbol 367 MovieClip "goarrow" in Frame 4
onClipEvent (enterFrame) {
if (show == false) {
if (_alpha > 0) {
setProperty(this, _alpha , _alpha - 2);
}
} else if (_alpha < 100) {
setProperty(this, _alpha , _alpha + 2);
}
}
Instance of Symbol 409 MovieClip in Frame 4
onClipEvent (enterFrame) {
if (_alpha > 0) {
setProperty(this, _alpha , _alpha - 5);
}
}
Frame 5
gotoAndPlay (1);
Frame 6
game.player.shield = 100;
if ((level == 0) && (story != true)) {
story = true;
gotoAndStop (11);
} else {
level = level + 1;
if (level > 36) {
gotoAndStop (13);
} else if (((level - 1) / 3) == Math.ceil((level - 1) / 3)) {
setrandomcolours();
gotoAndStop (8);
} else {
gotoAndStop (4);
}
}
Frame 7
gotoAndPlay (1);
Frame 8
grenadeammo = 3;
planetnum = Math.ceil((level - 1) / 3) + 1;
moonname1 = new Array("Xi", "Lo", "Li", "Ba", "Bo", "Cra", "Ni", "Spa", "La");
moonname2 = new Array("vi", "li", "go", "ni", "fo", "chi", "ka", "bra", "sla", "pro");
moonname3 = new Array("vium", "lon", "brium", "gun", "thon", "tan", "xion", "tham", "baan", "kin");
moonname4 = new Array("I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII", "XIII", "Alpha", "Beta", "Gamma", "Delta", "Prime", "Epsilon");
moonname = (((moonname1[random(moonname1.length)] + moonname2[random(moonname2.length)]) + moonname3[random(moonname3.length)]) + " ") + moonname4[random(moonname4.length)];
levelcode = getlevelcode(planetnum);
tips = "";
tips = (tips + "If an enemies visor isn't flashing red, then they haven't seen you.") + "|";
tips = (tips + "Inaccurate guns work better at close range. Creep up on your enemy.") + "|";
tips = (tips + "Grenades can be very helpful, but painful if you are too close.") + "|";
tips = (tips + "Enemies are less likely to spot you if they are facing the other direction.") + "|";
tips = (tips + "Enemies will eventually run out of ammo making them easy to kill. But then you can't take their weapon.") + "|";
tips = (tips + "Don't use level 1 or level 2 lasers unless you absolutely have to.") + "|";
tips = (tips + "Keep an eye on your ammunition.") + "|";
tips = (tips + "Standing still charges your antigrav suit quicker.") + "|";
tips = (tips + "Headshots do more damage.") + "|";
tips = (tips + "Pressing down while jumping will use your antigrav to push you downwards.") + "|";
tips = (tips + "You antigrav suit must be charged at at least 30 in order to 're-jump' while in the air.") + "|";
tips = (tips + "Shooting at someone will alert them to your presence.") + "|";
arrtips = tips.split("|");
thetip = "Tip: " + arrtips[random(arrtips.length - 1)];
Instance of Symbol 246 MovieClip in Frame 8
onClipEvent (load) {
myColorTransform = new Object();
myColorTransform = {rb:_root.bgrb, gb:_root.bggb, bb:_root.bgbb};
myColor = new Color(this);
myColor.setTransform(myColorTransform);
}
Instance of Symbol 249 MovieClip in Frame 8
onClipEvent (load) {
myColorTransform = new Object();
myColorTransform = {rb:_root.rb, gb:_root.gb, bb:_root.bb};
myColor = new Color(this);
myColor.setTransform(myColorTransform);
setProperty(this, _rotation , random(360));
scale = 50;
setProperty(this, _xscale , scale);
setProperty(this, _yscale , scale);
}
onClipEvent (enterFrame) {
if (scale < 100) {
scale = scale + 1;
setProperty(this, _xscale , scale);
setProperty(this, _yscale , scale);
}
}
Instance of Symbol 249 MovieClip in Frame 9
onClipEvent (load) {
myColorTransform = new Object();
myColorTransform = {rb:_root.rb, gb:_root.gb, bb:_root.bb};
myColor = new Color(this);
myColor.setTransform(myColorTransform);
}
Frame 10
gotoAndPlay (1);
Instance of Symbol 246 MovieClip in Frame 11
onClipEvent (load) {
myColorTransform = new Object();
myColorTransform = {rb:_root.bgrb, gb:_root.bggb, bb:_root.bgbb};
myColor = new Color(this);
myColor.setTransform(myColorTransform);
}
Instance of Symbol 423 MovieClip in Frame 11
onClipEvent (enterFrame) {
setProperty(this, _y , _y - 1);
if (_y < 0) {
_root.gotoAndStop("nextlevel");
}
}
Frame 12
gotoAndPlay (1);
Instance of Symbol 426 MovieClip in Frame 13
onClipEvent (enterFrame) {
setProperty(this, _y , _y - 1);
if (_y < 0) {
_root.gotoAndStop("menu");
}
}
Symbol 4 MovieClip [FLabelSymbol] Frame 1
#initclip 3
_global.FLabelClass = function () {
if (this.hostComponent == undefined) {
this.hostComponent = ((this._parent.controller == undefined) ? (this._parent) : (this._parent.controller));
}
if (this.customTextStyle == undefined) {
if (this.hostComponent.textStyle == undefined) {
this.hostComponent.textStyle = new TextFormat();
}
this.textStyle = this.hostComponent.textStyle;
this.enable = true;
}
};
FLabelClass.prototype = new MovieClip();
Object.registerClass("FLabelSymbol", FLabelClass);
FLabelClass.prototype.setLabel = function (label) {
var val = this.hostComponent.styleTable.embedFonts.value;
if (val != undefined) {
this.labelField.embedFonts = val;
}
this.labelField.setNewTextFormat(this.textStyle);
this.labelField.text = label;
this.labelField._height = this.labelField.textHeight + 2;
};
FLabelClass.prototype.setSize = function (width) {
this.labelField._width = width;
};
FLabelClass.prototype.setEnabled = function (enable) {
this.enable = enable;
var tmpColor = this.hostComponent.styleTable[(enable ? "textColor" : "textDisabled")].value;
if (tmpColor == undefined) {
tmpColor = (enable ? 0 : 8947848);
}
this.setColor(tmpColor);
};
FLabelClass.prototype.getLabel = function () {
return(this.labelField.text);
};
FLabelClass.prototype.setColor = function (col) {
this.labelField.textColor = col;
};
#endinitclip
Symbol 7 MovieClip [FHighlightSymbol] Frame 1
var component = _parent.controller;
component.registerSkinElement(highlight_mc, "selection");
stop();
Symbol 7 MovieClip [FHighlightSymbol] Frame 2
component.registerSkinElement(highlight_mc2, "selectionDisabled");
stop();
Symbol 7 MovieClip [FHighlightSymbol] Frame 3
component.registerSkinElement(highlight_mc3, "selectionUnfocused");
stop();
Symbol 8 MovieClip [FUIComponentSymbol] Frame 1
#initclip 1
function FUIComponentClass() {
this.init();
}
FUIComponentClass.prototype = new MovieClip();
FUIComponentClass.prototype.init = function () {
this.enable = true;
this.focused = false;
this.useHandCursor = false;
this._accImpl = new Object();
this._accImpl.stub = true;
this.styleTable = new Array();
if (_global.globalStyleFormat == undefined) {
_global.globalStyleFormat = new FStyleFormat();
globalStyleFormat.isGlobal = true;
_global._focusControl = new Object();
_global._focusControl.onSetFocus = function (oldFocus, newFocus) {
oldFocus.myOnKillFocus();
newFocus.myOnSetFocus();
};
Selection.addListener(_global._focusControl);
}
if (this._name != undefined) {
this._focusrect = false;
this.tabEnabled = true;
this.focusEnabled = true;
this.tabChildren = false;
this.tabFocused = true;
if (this.hostStyle == undefined) {
globalStyleFormat.addListener(this);
} else {
this.styleTable = this.hostStyle;
}
this.deadPreview._visible = false;
this.deadPreview._width = (this.deadPreview._height = 1);
this.methodTable = new Object();
this.keyListener = new Object();
this.keyListener.controller = this;
this.keyListener.onKeyDown = function () {
this.controller.myOnKeyDown();
};
this.keyListener.onKeyUp = function () {
this.controller.myOnKeyUp();
};
for (var i in this.styleFormat_prm) {
this.setStyleProperty(i, this.styleFormat_prm[i]);
}
}
};
FUIComponentClass.prototype.setEnabled = function (enabledFlag) {
this.enable = ((arguments.length > 0) ? (enabledFlag) : true);
this.tabEnabled = (this.focusEnabled = enabledFlag);
if ((!this.enable) && (this.focused)) {
Selection.setFocus(undefined);
}
};
FUIComponentClass.prototype.getEnabled = function () {
return(this.enable);
};
FUIComponentClass.prototype.setSize = function (w, h) {
this.width = w;
this.height = h;
this.focusRect.removeMovieClip();
};
FUIComponentClass.prototype.setChangeHandler = function (chng, obj) {
this.handlerObj = ((obj == undefined) ? (this._parent) : (obj));
this.changeHandler = chng;
};
FUIComponentClass.prototype.invalidate = function (methodName) {
this.methodTable[methodName] = true;
this.onEnterFrame = this.cleanUI;
};
FUIComponentClass.prototype.cleanUI = function () {
if (this.methodTable.setSize) {
this.setSize(this.width, this.height);
} else {
this.cleanUINotSize();
}
this.methodTable = new Object();
delete this.onEnterFrame;
};
FUIComponentClass.prototype.cleanUINotSize = function () {
for (var funct in this.methodTable) {
this[funct]();
}
};
FUIComponentClass.prototype.drawRect = function (x, y, w, h) {
var inner = this.styleTable.focusRectInner.value;
var outer = this.styleTable.focusRectOuter.value;
if (inner == undefined) {
inner = 16777215 /* 0xFFFFFF */;
}
if (outer == undefined) {
outer = 0;
}
this.createEmptyMovieClip("focusRect", 1000);
this.focusRect.controller = this;
this.focusRect.lineStyle(1, outer);
this.focusRect.moveTo(x, y);
this.focusRect.lineTo(x + w, y);
this.focusRect.lineTo(x + w, y + h);
this.focusRect.lineTo(x, y + h);
this.focusRect.lineTo(x, y);
this.focusRect.lineStyle(1, inner);
this.focusRect.moveTo(x + 1, y + 1);
this.focusRect.lineTo((x + w) - 1, y + 1);
this.focusRect.lineTo((x + w) - 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, y + 1);
};
FUIComponentClass.prototype.pressFocus = function () {
this.tabFocused = false;
this.focusRect.removeMovieClip();
Selection.setFocus(this);
};
FUIComponentClass.prototype.drawFocusRect = function () {
this.drawRect(-2, -2, this.width + 4, this.height + 4);
};
FUIComponentClass.prototype.myOnSetFocus = function () {
this.focused = true;
Key.addListener(this.keyListener);
if (this.tabFocused) {
this.drawFocusRect();
}
};
FUIComponentClass.prototype.myOnKillFocus = function () {
this.tabFocused = true;
this.focused = false;
this.focusRect.removeMovieClip();
Key.removeListener(this.keyListener);
};
FUIComponentClass.prototype.executeCallBack = function () {
this.handlerObj[this.changeHandler](this);
};
FUIComponentClass.prototype.updateStyleProperty = function (styleFormat, propName) {
this.setStyleProperty(propName, styleFormat[propName], styleFormat.isGlobal);
};
FUIComponentClass.prototype.setStyleProperty = function (propName, value, isGlobal) {
if (value == "") {
return(undefined);
}
var tmpValue = parseInt(value);
if (!isNaN(tmpValue)) {
value = tmpValue;
}
var global = ((arguments.length > 2) ? (isGlobal) : false);
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].useGlobal || (!global)) {
this.styleTable[propName].value = value;
if (this.setCustomStyleProperty(propName, value)) {
} else if (propName == "embedFonts") {
this.invalidate("setSize");
} else if (propName.subString(0, 4) == "text") {
if (this.textStyle == undefined) {
this.textStyle = new TextFormat();
}
var textProp = propName.subString(4, propName.length);
this.textStyle[textProp] = value;
this.invalidate("setSize");
} else {
for (var j in this.styleTable[propName].coloredMCs) {
var myColor = new Color(this.styleTable[propName].coloredMCs[j]);
if (this.styleTable[propName].value == undefined) {
var myTObj = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
myColor.setTransform(myTObj);
} else {
myColor.setRGB(value);
}
}
}
this.styleTable[propName].useGlobal = global;
}
};
FUIComponentClass.prototype.registerSkinElement = function (skinMCRef, propName) {
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].coloredMCs == undefined) {
this.styleTable[propName].coloredMCs = new Object();
}
this.styleTable[propName].coloredMCs[skinMCRef] = skinMCRef;
if (this.styleTable[propName].value != undefined) {
var myColor = new Color(skinMCRef);
myColor.setRGB(this.styleTable[propName].value);
}
};
_global.FStyleFormat = function () {
this.nonStyles = {listeners:true, isGlobal:true, isAStyle:true, addListener:true, removeListener:true, nonStyles:true, applyChanges:true};
this.listeners = new Object();
this.isGlobal = false;
if (arguments.length > 0) {
for (var i in arguments[0]) {
this[i] = arguments[0][i];
}
}
};
_global.FStyleFormat.prototype = new Object();
FStyleFormat.prototype.addListener = function () {
var arg = 0;
while (arg < arguments.length) {
var mcRef = arguments[arg];
this.listeners[arguments[arg]] = mcRef;
for (var i in this) {
if (this.isAStyle(i)) {
mcRef.updateStyleProperty(this, i.toString());
}
}
arg++;
}
};
FStyleFormat.prototype.removeListener = function (component) {
this.listeners[component] = undefined;
for (var prop in this) {
if (this.isAStyle(prop)) {
if (component.styleTable[prop].useGlobal == this.isGlobal) {
component.styleTable[prop].useGlobal = true;
var value = (this.isGlobal ? undefined : (globalStyleFormat[prop]));
component.setStyleProperty(prop, value, true);
}
}
}
};
FStyleFormat.prototype.applyChanges = function () {
var count = 0;
for (var i in this.listeners) {
var component = this.listeners[i];
if (arguments.length > 0) {
var j = 0;
while (j < arguments.length) {
if (this.isAStyle(arguments[j])) {
component.updateStyleProperty(this, arguments[j]);
}
j++;
}
} else {
for (var j in this) {
if (this.isAStyle(j)) {
component.updateStyleProperty(this, j.toString());
}
}
}
}
};
FStyleFormat.prototype.isAStyle = function (name) {
return((this.nonStyles[name] ? false : true));
};
#endinitclip
Symbol 21 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 31 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 40 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "foregroundDisabled");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 41 MovieClip [UpArrow] Frame 1
stop();
Symbol 41 MovieClip [UpArrow] Frame 2
stop();
Symbol 41 MovieClip [UpArrow] Frame 3
stop();
Symbol 48 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 55 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 60 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(highlight3D_mc, "highlight3D");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
Symbol 61 MovieClip [ScrollThumb] Frame 1
stop();
Symbol 69 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 77 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 85 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "foregroundDisabled");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 86 MovieClip [DownArrow] Frame 1
stop();
Symbol 86 MovieClip [DownArrow] Frame 2
stop();
Symbol 86 MovieClip [DownArrow] Frame 3
stop();
Symbol 89 MovieClip Frame 1
var component = _parent;
component.registerSkinElement(track_mc, "scrollTrack");
Symbol 90 MovieClip [FScrollBarSymbol] Frame 1
#initclip 5
FScrollBarClass = function () {
if (this._height == 4) {
return(undefined);
}
this.init();
this.minPos = (this.maxPos = (this.pageSize = (this.largeScroll = 0)));
this.smallScroll = 1;
this.width = (this.horizontal ? (this._width) : (this._height));
this._xscale = (this._yscale = 100);
this.setScrollPosition(0);
this.tabEnabled = false;
if (this._targetInstanceName.length > 0) {
this.setScrollTarget(this._parent[this._targetInstanceName]);
}
this.tabChildren = false;
this.setSize(this.width);
};
FScrollBarClass.prototype = new FUIComponentClass();
FScrollBarClass.prototype.setHorizontal = function (flag) {
if (this.horizontal && (!flag)) {
this._xscale = 100;
this._rotation = 0;
} else if (flag && (!this.horizontal)) {
this._xscale = -100;
this._rotation = -90;
}
this.horizontal = flag;
};
FScrollBarClass.prototype.setScrollProperties = function (pSize, mnPos, mxPos) {
if (!this.enable) {
return(undefined);
}
this.pageSize = pSize;
this.minPos = Math.max(mnPos, 0);
this.maxPos = Math.max(mxPos, 0);
this.scrollPosition = Math.max(this.minPos, this.scrollPosition);
this.scrollPosition = Math.min(this.maxPos, this.scrollPosition);
if ((this.maxPos - this.minPos) <= 0) {
this.scrollThumb_mc.removeMovieClip();
this.upArrow_mc.gotoAndStop(3);
this.downArrow_mc.gotoAndStop(3);
this.downArrow_mc.onPress = (this.downArrow_mc.onRelease = (this.downArrow_mc.onDragOut = null));
this.upArrow_mc.onPress = (this.upArrow_mc.onRelease = (this.upArrow_mc.onDragOut = null));
this.scrollTrack_mc.onPress = (this.scrollTrack_mc.onRelease = null);
this.scrollTrack_mc.onDragOut = (this.scrollTrack_mc.onRollOut = null);
this.scrollTrack_mc.useHandCursor = false;
} else {
var tmp = this.getScrollPosition();
this.upArrow_mc.gotoAndStop(1);
this.downArrow_mc.gotoAndStop(1);
this.upArrow_mc.onPress = (this.upArrow_mc.onDragOver = this.startUpScroller);
this.upArrow_mc.onRelease = (this.upArrow_mc.onDragOut = this.stopScrolling);
this.downArrow_mc.onPress = (this.downArrow_mc.onDragOver = this.startDownScroller);
this.downArrow_mc.onRelease = (this.downArrow_mc.onDragOut = this.stopScrolling);
this.scrollTrack_mc.onPress = (this.scrollTrack_mc.onDragOver = this.startTrackScroller);
this.scrollTrack_mc.onRelease = this.stopScrolling;
this.scrollTrack_mc.onDragOut = this.stopScrolling;
this.scrollTrack_mc.onRollOut = this.stopScrolling;
this.scrollTrack_mc.useHandCursor = false;
this.attachMovie("ScrollThumb", "scrollThumb_mc", 3);
this.scrollThumb_mc._x = 0;
this.scrollThumb_mc._y = this.upArrow_mc._height;
this.scrollThumb_mc.onPress = this.startDragThumb;
this.scrollThumb_mc.controller = this;
this.scrollThumb_mc.onRelease = (this.scrollThumb_mc.onReleaseOutside = this.stopDragThumb);
this.scrollThumb_mc.useHandCursor = false;
this.thumbHeight = (this.pageSize / ((this.maxPos - this.minPos) + this.pageSize)) * this.trackSize;
this.thumbMid_mc = this.scrollThumb_mc.mc_sliderMid;
this.thumbTop_mc = this.scrollThumb_mc.mc_sliderTop;
this.thumbBot_mc = this.scrollThumb_mc.mc_sliderBot;
this.thumbHeight = Math.max(this.thumbHeight, 6);
this.midHeight = (this.thumbHeight - this.thumbTop_mc._height) - this.thumbBot_mc._height;
this.thumbMid_mc._yScale = (this.midHeight * 100) / this.thumbMid_mc._height;
this.thumbMid_mc._y = this.thumbTop_mc._height;
this.thumbBot_mc._y = this.thumbTop_mc._height + this.midHeight;
this.scrollTop = this.scrollThumb_mc._y;
this.trackHeight = this.trackSize - this.thumbHeight;
this.scrollBot = this.trackHeight + this.scrollTop;
tmp = Math.min(tmp, this.maxPos);
this.setScrollPosition(Math.max(tmp, this.minPos));
}
};
FScrollBarClass.prototype.getScrollPosition = function () {
return(this.scrollPosition);
};
FScrollBarClass.prototype.setScrollPosition = function (pos) {
this.scrollPosition = pos;
if (this.scrollThumb_mc != undefined) {
pos = Math.min(pos, this.maxPos);
pos = Math.max(pos, this.minPos);
}
this.scrollThumb_mc._y = (((pos - this.minPos) * this.trackHeight) / (this.maxPos - this.minPos)) + this.scrollTop;
this.executeCallBack();
};
FScrollBarClass.prototype.setLargeScroll = function (lScroll) {
this.largeScroll = lScroll;
};
FScrollBarClass.prototype.setSmallScroll = function (sScroll) {
this.smallScroll = sScroll;
};
FScrollBarClass.prototype.setEnabled = function (enabledFlag) {
var wasEnabled = this.enable;
if (enabledFlag && (!wasEnabled)) {
this.enable = enabledFlag;
if (this.textField != undefined) {
this.setScrollTarget(this.textField);
} else {
this.setScrollProperties(this.pageSize, this.cachedMinPos, this.cachedMaxPos);
this.setScrollPosition(this.cachedPos);
}
this.clickFilter = undefined;
} else if ((!enabledFlag) && (wasEnabled)) {
this.textField.removeListener(this);
this.cachedPos = this.getScrollPosition();
this.cachedMinPos = this.minPos;
this.cachedMaxPos = this.maxPos;
if (this.clickFilter == undefined) {
this.setScrollProperties(this.pageSize, 0, 0);
} else {
this.clickFilter = true;
}
this.enable = enabledFlag;
}
};
FScrollBarClass.prototype.setSize = function (hgt) {
if (this._height == 1) {
return(undefined);
}
this.width = hgt;
this.scrollTrack_mc._yscale = 100;
this.scrollTrack_mc._yscale = (100 * this.width) / this.scrollTrack_mc._height;
if (this.upArrow_mc == undefined) {
this.attachMovie("UpArrow", "upArrow_mc", 1);
this.attachMovie("DownArrow", "downArrow_mc", 2);
this.downArrow_mc.controller = (this.upArrow_mc.controller = this);
this.upArrow_mc.useHandCursor = (this.downArrow_mc.useHandCursor = false);
this.upArrow_mc._x = (this.upArrow_mc._y = 0);
this.downArrow_mc._x = 0;
}
this.scrollTrack_mc.controller = this;
this.downArrow_mc._y = this.width - this.downArrow_mc._height;
this.trackSize = this.width - (2 * this.downArrow_mc._height);
if (this.textField != undefined) {
this.onTextChanged();
} else {
this.setScrollProperties(this.pageSize, this.minPos, this.maxPos);
}
};
FScrollBarClass.prototype.scrollIt = function (inc, mode) {
var delt = this.smallScroll;
if (inc != "one") {
delt = ((this.largeScroll == 0) ? (this.pageSize) : (this.largeScroll));
}
var newPos = (this.getScrollPosition() + (mode * delt));
if (newPos > this.maxPos) {
newPos = this.maxPos;
} else if (newPos < this.minPos) {
newPos = this.minPos;
}
this.setScrollPosition(newPos);
};
FScrollBarClass.prototype.startDragThumb = function () {
this.lastY = this._ymouse;
this.onMouseMove = this.controller.dragThumb;
};
FScrollBarClass.prototype.dragThumb = function () {
this.scrollMove = this._ymouse - this.lastY;
this.scrollMove = this.scrollMove + this._y;
if (this.scrollMove < this.controller.scrollTop) {
this.scrollMove = this.controller.scrollTop;
} else if (this.scrollMove > this.controller.scrollBot) {
this.scrollMove = this.controller.scrollBot;
}
this._y = this.scrollMove;
var c = this.controller;
c.scrollPosition = Math.round(((c.maxPos - c.minPos) * (this._y - c.scrollTop)) / c.trackHeight) + c.minPos;
this.controller.isScrolling = true;
updateAfterEvent();
this.controller.executeCallBack();
};
FScrollBarClass.prototype.stopDragThumb = function () {
this.controller.isScrolling = false;
this.onMouseMove = null;
};
FScrollBarClass.prototype.startTrackScroller = function () {
this.controller.trackScroller();
this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "page", -1);
};
FScrollBarClass.prototype.scrollInterval = function (inc, mode) {
clearInterval(this.scrolling);
if (inc == "page") {
this.trackScroller();
} else {
this.scrollIt(inc, mode);
}
this.scrolling = setInterval(this, "scrollInterval", 35, inc, mode);
};
FScrollBarClass.prototype.trackScroller = function () {
if ((this.scrollThumb_mc._y + this.thumbHeight) < this._ymouse) {
this.scrollIt("page", 1);
} else if (this.scrollThumb_mc._y > this._ymouse) {
this.scrollIt("page", -1);
}
};
FScrollBarClass.prototype.stopScrolling = function () {
this.controller.downArrow_mc.gotoAndStop(1);
this.controller.upArrow_mc.gotoAndStop(1);
clearInterval(this.controller.scrolling);
};
FScrollBarClass.prototype.startUpScroller = function () {
this.controller.upArrow_mc.gotoAndStop(2);
this.controller.scrollIt("one", -1);
this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "one", -1);
};
FScrollBarClass.prototype.startDownScroller = function () {
this.controller.downArrow_mc.gotoAndStop(2);
this.controller.scrollIt("one", 1);
this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "one", 1);
};
FScrollBarClass.prototype.setScrollTarget = function (tF) {
if (tF == undefined) {
this.textField.removeListener(this);
delete this.textField[(this.horizontal ? "hScroller" : "vScroller")];
if ((this.textField.hScroller != undefined) && (this.textField.vScroller != undefined)) {
this.textField.unwatch("text");
this.textField.unwatch("htmltext");
}
}
this.textField = undefined;
if (!(tF instanceof TextField)) {
return(undefined);
}
this.textField = tF;
this.textField[(this.horizontal ? "hScroller" : "vScroller")] = this;
this.onTextChanged();
this.onChanged = function () {
this.onTextChanged();
};
this.onScroller = function () {
if (!this.isScrolling) {
if (!this.horizontal) {
this.setScrollPosition(this.textField.scroll);
} else {
this.setScrollPosition(this.textField.hscroll);
}
}
};
this.textField.addListener(this);
this.textField.watch("text", this.callback);
this.textField.watch("htmlText", this.callback);
};
FScrollBarClass.prototype.callback = function (prop, oldVal, newVal) {
clearInterval(this.hScroller.synchScroll);
clearInterval(this.vScroller.synchScroll);
this.hScroller.synchScroll = setInterval(this.hScroller, "onTextChanged", 50);
this.vScroller.synchScroll = setInterval(this.vScroller, "onTextChanged", 50);
return(newVal);
};
FScrollBarClass.prototype.onTextChanged = function () {
if ((!this.enable) || (this.textField == undefined)) {
return(undefined);
}
clearInterval(this.synchScroll);
if (this.horizontal) {
var pos = this.textField.hscroll;
this.setScrollProperties(this.textField._width, 0, this.textField.maxhscroll);
this.setScrollPosition(Math.min(pos, this.textField.maxhscroll));
} else {
var pos = this.textField.scroll;
var pageSize = (this.textField.bottomScroll - this.textField.scroll);
this.setScrollProperties(pageSize, 1, this.textField.maxscroll);
this.setScrollPosition(Math.min(pos, this.textField.maxscroll));
}
};
FScrollBarClass.prototype.executeCallBack = function () {
if (this.textField == undefined) {
super.executeCallBack();
} else if (this.horizontal) {
this.textField.hscroll = this.getScrollPosition();
} else {
this.textField.scroll = this.getScrollPosition();
}
};
Object.registerClass("FScrollBarSymbol", FScrollBarClass);
#endinitclip
Symbol 91 MovieClip [DataProviderSymbol] Frame 1
#initclip 2
_global.DataProviderClass = function () {
this.init();
};
DataProviderClass.prototype.init = function () {
this.items = new Array();
this.uniqueID = 0;
this.views = new Array();
};
DataProviderClass.prototype.addView = function (viewRef) {
this.views.push(viewRef);
var eventObj = {event:"updateAll"};
viewRef.modelChanged(eventObj);
};
DataProviderClass.prototype.addItemAt = function (index, value) {
if (index < this.getLength()) {
this.items.splice(index, 0, "tmp");
}
this.items[index] = new Object();
if (typeof(value) == "object") {
this.items[index] = value;
} else {
this.items[index].label = value;
}
this.items[index].__ID__ = this.uniqueID++;
var eventObj = {event:"addRows", firstRow:index, lastRow:index};
this.updateViews(eventObj);
};
DataProviderClass.prototype.addItem = function (value) {
this.addItemAt(this.getLength(), value);
};
DataProviderClass.prototype.removeItemAt = function (index) {
var tmpItm = this.items[index];
this.items.splice(index, 1);
var eventObj = {event:"deleteRows", firstRow:index, lastRow:index};
this.updateViews(eventObj);
return(tmpItm);
};
DataProviderClass.prototype.removeAll = function () {
this.items = new Array();
this.updateViews({event:"deleteRows", firstRow:0, lastRow:this.getLength() - 1});
};
DataProviderClass.prototype.replaceItemAt = function (index, itemObj) {
if ((index < 0) || (index >= this.getLength())) {
return(undefined);
}
var tmpID = this.getItemID(index);
if (typeof(itemObj) == "object") {
this.items[index] = itemObj;
} else {
this.items[index].label = itemObj;
}
this.items[index].__ID__ = tmpID;
this.updateViews({event:"updateRows", firstRow:index, lastRow:index});
};
DataProviderClass.prototype.getLength = function () {
return(this.items.length);
};
DataProviderClass.prototype.getItemAt = function (index) {
return(this.items[index]);
};
DataProviderClass.prototype.getItemID = function (index) {
return(this.items[index].__ID__);
};
DataProviderClass.prototype.sortItemsBy = function (fieldName, order) {
this.items.sortOn(fieldName);
if (order == "DESC") {
this.items.reverse();
}
this.updateViews({event:"sort"});
};
DataProviderClass.prototype.updateViews = function (eventObj) {
var i = 0;
while (i < this.views.length) {
this.views[i].modelChanged(eventObj);
i++;
}
};
#endinitclip
Symbol 92 MovieClip [FSelectableItemSymbol] Frame 1
#initclip 7
function FSelectableItemClass() {
this.init();
}
FSelectableItemClass.prototype = new FUIComponentClass();
FSelectableItemClass.prototype.init = function () {
if (this._name != "itemAsset") {
this.highlighted = false;
this.layoutContent(100);
}
};
FSelectableItemClass.prototype.drawItem = function (itmObj, selected) {
this.displayContent(itmObj, selected);
if ((this.highlighted != selected) || ((this.controller.focused != this.oldFocus) && (selected))) {
this.setHighlighted(selected);
}
this.oldFocus = this.controller.focused;
};
FSelectableItemClass.prototype.setSize = function (width, height) {
var LOWEST_DEPTH = -16384;
this.width = width;
this.layoutContent(width);
this.attachMovie("FHighlightSymbol", "highlight_mc", LOWEST_DEPTH);
this.highlight_mc._x = 0.5;
this.highlight_mc._width = width - 0.5;
this.highlight_mc._height = height;
this.highlight_mc.controller = this;
this.highlight_mc._alpha = 0;
this.highlight_mc.trackAsMenu = true;
this.highlight_mc.onPress = function () {
if (this.controller.enable) {
this.controller.controller.clickHandler(this.controller.itemNum);
}
};
this.highlight_mc.onDragOver = function () {
if (this.controller.controller.focused) {
this.onPress();
}
};
this.highlight_mc.useHandCursor = false;
this.highlight_mc.trackAsMenu = true;
};
FSelectableItemClass.prototype.setEnabled = function (enabledFlag) {
this.enable = enabledFlag;
this.fLabel_mc.setEnabled(enabledFlag);
this.highlight_mc.gotoAndStop((enabledFlag ? "unfocused" : "disabled"));
};
FSelectableItemClass.prototype.layoutContent = function (width) {
this.attachMovie("FLabelSymbol", "fLabel_mc", 2, {hostComponent:this.controller});
this.fLabel_mc._x = 2;
this.fLabel_mc._y = 0;
this.fLabel_mc.setSize(width - 2);
this.fLabel_mc.labelField.selectable = false;
};
FSelectableItemClass.prototype.displayContent = function (itmObj, selected) {
var tmpLabel = "";
if (itmObj.label != undefined) {
tmpLabel = itmObj.label;
} else if (typeof(itmObj) == "object") {
for (var i in itmObj) {
if (i != "__ID__") {
tmpLabel = (itmObj[i] + ", ") + tmpLabel;
}
}
tmpLabel = tmpLabel.substring(0, tmpLabel.length - 2);
} else {
tmpLabel = itmObj;
}
if (this.fLabel_mc.labelField.text != tmpLabel) {
this.fLabel_mc.setLabel(tmpLabel);
}
var clr = (selected ? (this.controller.styleTable.textSelected.value) : (this.controller.styleTable.textColor.value));
if (clr == undefined) {
clr = (selected ? 16777215 : 0);
}
this.fLabel_mc.setColor(clr);
};
FSelectableItemClass.prototype.getItemIndex = function () {
return(this.controller.getScrollPosition() + this.itemNum);
};
FSelectableItemClass.prototype.getItemModel = function () {
return(this.controller.getItemAt(this.getItemIndex()));
};
FSelectableItemClass.prototype.getHostDataProvider = function () {
return(this.controller.dataProvider);
};
FSelectableItemClass.prototype.setHighlighted = function (flag) {
fade = this.controller.styleTable.fadeRate.value;
if (((fade == undefined) || (fade == 0)) || (!flag)) {
this.highlight_mc._alpha = (flag ? 100 : 0);
delete this.onEnterFrame;
} else {
this.fadeN = fade;
this.fadeX = 1;
this.highLight_mc._alpha = 20;
this.onEnterFrame = function () {
this.highLight_mc._alpha = (60 * Math.sqrt((this.fadeX++) / this.fadeN)) + 40;
if (this.fadeX > this.fadeN) {
delete this.onEnterFrame;
}
};
}
this.highlighted = flag;
};
#endinitclip
Symbol 93 MovieClip [FSelectableListSymbol] Frame 1
#initclip 4
function FSelectableListClass() {
this.init();
}
FSelectableListClass.prototype = new FUIComponentClass();
FSelectableListClass.prototype.init = function () {
super.init();
this.enable = true;
this.selected = new Array();
this.topDisplayed = (this.numDisplayed = 0);
this.lastSelected = 0;
this.tabChildren = false;
if (this._name != undefined) {
this.dataProvider = new DataProviderClass();
this.dataProvider.addView(this);
}
};
FSelectableListClass.prototype.addItemAt = function (index, label, data) {
if ((index < 0) || (!this.enable)) {
return(undefined);
}
this.dataProvider.addItemAt(index, {label:label, data:data});
};
FSelectableListClass.prototype.addItem = function (label, data) {
if (!this.enable) {
return(undefined);
}
this.dataProvider.addItem({label:label, data:data});
};
FSelectableListClass.prototype.removeItemAt = function (index) {
this.selectHolder = this.getSelectedIndex();
var item = this.getItemAt(index);
this.dataProvider.removeItemAt(index);
return(item);
};
FSelectableListClass.prototype.removeAll = function () {
this.dataProvider.removeAll();
};
FSelectableListClass.prototype.replaceItemAt = function (index, newLabel, newData) {
this.dataProvider.replaceItemAt(index, {label:newLabel, data:newData});
};
FSelectableListClass.prototype.sortItemsBy = function (fieldName, order) {
this.lastSelID = this.dataProvider.getItemID(this.lastSelected);
this.dataProvider.sortItemsBy(fieldName, order);
};
FSelectableListClass.prototype.getLength = function () {
return(this.dataProvider.getLength());
};
FSelectableListClass.prototype.getSelectedIndex = function () {
for (var uniqueID in this.selected) {
var tmpInd = this.selected[uniqueID].sIndex;
if (tmpInd != undefined) {
return(tmpInd);
}
}
};
FSelectableListClass.prototype.getSelectedItem = function () {
return(this.getItemAt(this.getSelectedIndex()));
};
FSelectableListClass.prototype.getItemAt = function (index) {
return(this.dataProvider.getItemAt(index));
};
FSelectableListClass.prototype.getEnabled = function () {
return(this.enable);
};
FSelectableListClass.prototype.getValue = function () {
var item = this.getSelectedItem();
return(((item.data == undefined) ? (item.label) : (item.data)));
};
FSelectableListClass.prototype.setSelectedIndex = function (index, flag) {
if (((index >= 0) && (index < this.getLength())) && (this.enable)) {
this.clearSelected();
this.selectItem(index, true);
this.lastSelected = index;
this.invalidate("updateControl");
if (flag != false) {
this.executeCallBack();
}
}
};
FSelectableListClass.prototype.setDataProvider = function (obj) {
this.setScrollPosition(0);
this.clearSelected();
if (obj instanceof Array) {
this.dataProvider = new DataProviderClass();
var i = 0;
while (i < obj.length) {
var value = ((typeof(obj[i]) == "string") ? ({label:obj[i]}) : (obj[i]));
this.dataProvider.addItem(value);
i++;
}
} else {
this.dataProvider = obj;
}
this.dataProvider.addView(this);
};
FSelectableListClass.prototype.setItemSymbol = function (linkID) {
this.tmpPos = this.getScrollPosition();
this.itemSymbol = linkID;
this.invalidate("setSize");
this.setScrollPosition(this.tmpPos);
};
FSelectableListClass.prototype.setEnabled = function (enabledFlag) {
this.cleanUI();
super.setEnabled(enabledFlag);
this.enable = enabledFlag;
this.boundingBox_mc.gotoAndStop((this.enable ? "enabled" : "disabled"));
var limit = Math.min(this.numDisplayed, this.getLength());
var i = 0;
while (i < limit) {
this.container_mc[("fListItem" + i) + "_mc"].setEnabled(this.enable);
i++;
}
if (this.enable) {
this.invalidate("updateControl");
}
};
FSelectableListClass.prototype.updateControl = function () {
var i = 0;
while (i < this.numDisplayed) {
this.container_mc[("fListItem" + i) + "_mc"].drawItem(this.getItemAt(this.topDisplayed + i), this.isSelected(this.topDisplayed + i));
i++;
}
};
FSelectableListClass.prototype.setSize = function (w, h) {
super.setSize(w, h);
this.boundingBox_mc._xscale = (this.boundingBox_mc._yscale = 100);
this.boundingBox_mc._xscale = (this.width * 100) / this.boundingBox_mc._width;
this.boundingBox_mc._yscale = (this.height * 100) / this.boundingBox_mc._height;
var i = 0;
while (i < this.numDisplayed) {
this.container_mc.attachMovie(this.itemSymbol, ("fListItem" + i) + "_mc", 10 + i, {controller:this, itemNum:i});
var item_mc = this.container_mc[("fListItem" + i) + "_mc"];
var offset = ((this.scrollOffset == undefined) ? 0 : (this.scrollOffset));
item_mc.setSize(this.width - offset, this.itmHgt);
item_mc._y = (this.itmHgt - 2) * i;
i++;
}
this.updateControl();
};
FSelectableListClass.prototype.modelChanged = function (eventObj) {
var firstRow = eventObj.firstRow;
var lastRow = eventObj.lastRow;
var event = eventObj.event;
if (event == "addRows") {
for (var i in this.selected) {
if ((this.selected[i].sIndex != undefined) && (this.selected[i].sIndex >= firstRow)) {
this.selected[i].sIndex = this.selected[i].sIndex + ((lastRow - firstRow) + 1);
this.setSelectedIndex(this.selected[i].sIndex, false);
}
}
} else if (event == "deleteRows") {
if (firstRow == lastRow) {
var index = firstRow;
if (this.selectHolder == index) {
this.selectionDeleted = true;
}
if (((this.topDisplayed + this.numDisplayed) >= this.getLength()) && (this.topDisplayed > 0)) {
this.topDisplayed--;
if (this.selectionDeleted && ((index - 1) >= 0)) {
this.setSelectedIndex(index - 1, false);
}
} else if (this.selectionDeleted) {
var len = this.getLength();
if (((index == (len - 1)) && (len > 1)) || (index > (len / 2))) {
this.setSelectedIndex(index - 1, false);
} else {
this.setSelectedIndex(index, false);
}
}
for (var i in this.selected) {
if (this.selected[i].sIndex > firstRow) {
this.selected[i].sIndex--;
}
}
} else {
this.clearSelected();
this.topDisplayed = 0;
}
} else if (event == "sort") {
var len = this.getLength();
var i = 0;
while (i < len) {
if (this.isSelected(i)) {
var id = this.dataProvider.getItemID(i);
if (id == this.lastSelID) {
this.lastSelected = i;
}
this.selected[String(id)].sIndex = i;
}
i++;
}
}
this.invalidate("updateControl");
};
FSelectableListClass.prototype.measureItmHgt = function () {
this.attachMovie(this.itemSymbol, "tmpItem_mc", 0, {controller:this});
this.tmpItem_mc.drawItem({label:"Sizer: PjtTopg"}, false);
this.itmHgt = this.tmpItem_mc._height;
this.tmpItem_mc.removeMovieClip();
};
FSelectableListClass.prototype.selectItem = function (index, selectedFlag) {
if (selectedFlag && (!this.isSelected(index))) {
this.selected[String(this.dataProvider.getItemID(index))] = {sIndex:index};
} else if (!selectedFlag) {
delete this.selected[String(this.dataProvider.getItemID(index))];
}
};
FSelectableListClass.prototype.isSelected = function (index) {
return(this.selected[String(this.dataProvider.getItemID(index))].sIndex != undefined);
};
FSelectableListClass.prototype.clearSelected = function () {
for (var uniqueID in this.selected) {
var index = this.selected[uniqueID].sIndex;
if (((index != undefined) && (this.topDisplayed <= index)) && (index < (this.topDisplayed + this.numDisplayed))) {
this.container_mc[("fListItem" + (index - this.topDisplayed)) + "_mc"].drawItem(this.getItemAt(index), false);
}
}
delete this.selected;
this.selected = new Array();
};
FSelectableListClass.prototype.selectionHandler = function (itemNum) {
var tmpInd = (this.topDisplayed + itemNum);
if (this.getItemAt(tmpInd == undefined)) {
this.changeFlag = false;
return(undefined);
}
this.changeFlag = true;
this.clearSelected();
this.selectItem(tmpInd, true);
this.container_mc[("fListItem" + itemNum) + "_mc"].drawItem(this.getItemAt(tmpInd), this.isSelected(tmpInd));
};
FSelectableListClass.prototype.moveSelBy = function (incr) {
var itmNum = this.getSelectedIndex();
var newItm = (itmNum + incr);
newItm = Math.max(0, newItm);
newItm = Math.min(this.getLength() - 1, newItm);
if (newItm == itmNum) {
return(undefined);
}
if ((itmNum < this.topDisplayed) || (itmNum >= (this.topDisplayed + this.numDisplayed))) {
this.setScrollPosition(itmNum);
}
if ((newItm >= (this.topDisplayed + this.numDisplayed)) || (newItm < this.topDisplayed)) {
this.setScrollPosition(this.topDisplayed + incr);
}
this.selectionHandler(newItm - this.topDisplayed);
};
FSelectableListClass.prototype.clickHandler = function (itmNum) {
this.focusRect.removeMovieClip();
if (!this.focused) {
this.pressFocus();
}
this.selectionHandler(itmNum);
this.onMouseUp = this.releaseHandler;
};
FSelectableListClass.prototype.releaseHandler = function () {
if (this.changeFlag) {
this.executeCallBack();
}
this.changeFlag = false;
this.onMouseUp = undefined;
};
FSelectableListClass.prototype.myOnSetFocus = function () {
super.myOnSetFocus();
var i = 0;
while (i < this.numDisplayed) {
this.container_mc[("fListItem" + i) + "_mc"].highlight_mc.gotoAndStop("enabled");
i++;
}
};
FSelectableListClass.prototype.myOnKillFocus = function () {
super.myOnKillFocus();
var i = 0;
while (i < this.numDisplayed) {
this.container_mc[("fListItem" + i) + "_mc"].highlight_mc.gotoAndStop("unfocused");
i++;
}
};
#endinitclip
Instance of Symbol 91 MovieClip [DataProviderSymbol] "dPAsset" in Symbol 93 MovieClip [FSelectableListSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
}
Instance of Symbol 92 MovieClip [FSelectableItemSymbol] "ItemAsset" in Symbol 93 MovieClip [FSelectableListSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
}
Symbol 94 MovieClip [FScrollSelectListSymbol] Frame 1
#initclip 6
function FScrollSelectListClass() {
this.init();
}
FScrollSelectListClass.prototype = new FSelectableListClass();
FScrollSelectListClass.prototype.getScrollPosition = function () {
return(this.topDisplayed);
};
FScrollSelectListClass.prototype.setScrollPosition = function (pos) {
if (this.enable) {
pos = Math.min(pos, this.getLength() - this.numDisplayed);
pos = Math.max(pos, 0);
this.scrollBar_mc.setScrollPosition(pos);
}
};
FScrollSelectListClass.prototype.setAutoHideScrollBar = function (flag) {
this.permaScrollBar = !flag;
this.setSize(this.width, this.height);
};
FScrollSelectListClass.prototype.setEnabled = function (enabledFlag) {
super.setEnabled(enabledFlag);
this.scrollBar_mc.setEnabled(this.enable);
};
FScrollSelectListClass.prototype.setSize = function (w, h) {
var pos = this.getScrollPosition();
super.setSize(w, h);
if (this.scrollBar_mc != undefined) {
this.removed = true;
}
this.scrollBar_mc = undefined;
this.initScrollBar();
this.setScrollPosition(pos);
};
FScrollSelectListClass.prototype.modelChanged = function (eventObj) {
super.modelChanged(eventObj);
this.invalidate("initScrollBar");
};
FScrollSelectListClass.prototype.initScrollBar = function () {
if ((!this.permaScrollBar) && (this.getLength() <= this.numDisplayed)) {
if (this.removed) {
this.scrollBar_mc.removeMovieClip();
this.scrollBar_mc = undefined;
this.scrollOffset = undefined;
this.invalidate("setSize");
}
} else {
if (this.scrollBar_mc == undefined) {
this.container_mc.attachMovie("FScrollBarSymbol", "scrollBar_mc", 3000, {hostStyle:this.styleTable});
this.scrollBar_mc = this.container_mc.scrollBar_mc;
this.scrollBar_mc.setChangeHandler("scrollHandler", this);
this.scrollBar_mc.setSize(this.height);
this.scrollBar_mc._x = this.width - this.scrollBar_mc._width;
this.scrollBar_mc._y = 0;
this.scrollBar_mc.setLargeScroll(this.numDisplayed - 1);
this.scrollOffset = this.scrollBar_mc._width;
this.invalidate("setSize");
}
this.scrollBar_mc.setScrollProperties(this.numDisplayed, 0, this.getLength() - this.numDisplayed);
}
};
FScrollSelectListClass.prototype.scrollHandler = function (scrollBar) {
var pos = scrollBar.getScrollPosition();
this.topDisplayed = pos;
if (this.lastPosition != pos) {
this.updateControl();
}
this.lastPosition = pos;
};
FScrollSelectListClass.prototype.clickHandler = function (itmNum) {
super.clickHandler(itmNum);
if ((this.dragScrolling == undefined) && (this.scrollBar_mc != undefined)) {
this.dragScrolling = setInterval(this, "dragScroll", 15);
}
};
FScrollSelectListClass.prototype.releaseHandler = function () {
clearInterval(this.dragScrolling);
this.dragScrolling = undefined;
super.releaseHandler();
};
FScrollSelectListClass.prototype.dragScroll = function () {
clearInterval(this.dragScrolling);
if (this.container_mc._ymouse < 0) {
this.setScrollPosition(this.getScrollPosition() - 1);
this.selectionHandler(0);
this.scrollInterval = Math.max(25, (-23.8 * (-this.container_mc._ymouse)) + 500);
this.dragScrolling = setInterval(this, "dragScroll", this.scrollInterval);
} else if (this.container_mc._ymouse > ((this.itmHgt - 2) * this.numDisplayed)) {
this.setScrollPosition(this.getScrollPosition() + 1);
this.selectionHandler(this.numDisplayed - 1);
this.scrollInterval = Math.max(25, (-23.8 * Math.abs((this.container_mc._ymouse - ((this.itmHgt - 2) * this.numDisplayed)) - 2)) + 500);
this.dragScrolling = setInterval(this, "dragScroll", this.scrollInterval);
} else {
this.dragScrolling = setInterval(this, "dragScroll", 15);
}
};
FScrollSelectListClass.prototype.myOnKeyDown = function () {
if (this.focused) {
this.keyCodes = new Array(40, 38, 34, 33, 36, 35);
this.keyIncrs = new Array(1, -1, this.numDisplayed - 1, -(this.numDisplayed - 1), -this.getLength(), this.getLength());
var i = 0;
while (i < this.keyCodes.length) {
if (Key.isDown(this.keyCodes[i])) {
this.moveSelBy(this.keyIncrs[i]);
return(undefined);
}
i++;
}
this.findInputText();
}
};
FScrollSelectListClass.prototype.findInputText = function () {
var tmpCode = Key.getAscii();
if ((tmpCode >= 33) && (tmpCode <= 126)) {
this.findString(String.fromCharCode(tmpCode));
}
};
FScrollSelectListClass.prototype.findString = function (str) {
if (this.getLength() == 0) {
return(undefined);
}
var itemNum = this.getSelectedIndex();
var jump = 0;
var i = (itemNum + 1);
while (i != itemNum) {
var itmStr = this.getItemAt(i).label.substring(0, str.length);
if ((str == itmStr) || (str.toUpperCase() == itmStr.toUpperCase())) {
var jump = (i - itemNum);
break;
}
if (i >= (this.getLength() - 1)) {
i = -1;
}
i++;
}
if (jump != 0) {
this.moveSelBy(jump);
}
};
#endinitclip
Instance of Symbol 90 MovieClip [FScrollBarSymbol] "scrollBarAsset" in Symbol 94 MovieClip [FScrollSelectListSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
_targetInstanceName = "";
horizontal = false;
}
onClipEvent (load) {
this._width = (this._height = 1);
}
Instance of Symbol 93 MovieClip [FSelectableListSymbol] "superClassAsset" in Symbol 94 MovieClip [FScrollSelectListSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
}
Symbol 95 MovieClip [FComboBoxItemSymbol] Frame 1
#initclip 9
function FComboBoxItemClass() {
this.init();
}
FComboBoxItemClass.prototype = new FSelectableItemClass();
Object.registerClass("FComboBoxItemSymbol", FComboBoxItemClass);
FComboBoxItemClass.prototype.setSize = function (w, h) {
super.setSize(w, h);
this.highlight_mc.onRollOver = function () {
this.controller.controller.selectionHandler(this.controller.itemNum);
};
};
#endinitclip
Symbol 99 MovieClip [FBoundingBoxSymbol] Frame 1
var component = _parent;
component.registerSkinElement(boundingBox, "background");
stop();
Symbol 99 MovieClip [FBoundingBoxSymbol] Frame 2
component.registerSkinElement(boundingBox2, "backgroundDisabled");
stop();
Symbol 102 MovieClip [FComboBoxSymbol] Frame 1
#initclip 8
function FComboBoxClass() {
_global._popUpLevel = ((_global._popUpLevel == undefined) ? 20000 : (_global._popUpLevel + 1));
this.superHolder = _root.createEmptyMovieClip("superHolder" + _popUpLevel, _popUpLevel);
var testContainer = this.superHolder.createEmptyMovieClip("testCont", 20000);
var testBox = testContainer.attachMovie("FBoundingBoxSymbol", "boundingBox_mc", 0);
if (testBox._name == undefined) {
this.superHolder.removeMovieClip();
this.superHolder = this._parent.createEmptyMovieClip("superHolder" + _popUpLevel, _popUpLevel);
} else {
testContainer.removeMovieClip();
}
if (this.rowCount == undefined) {
this.rowCount = 8;
this.editable = false;
}
this.itemSymbol = "FComboBoxItemSymbol";
this.init();
this.permaScrollBar = false;
this.proxyBox_mc.gotoAndStop(1);
this.width = this._width;
this.height = (this.proxyBox_mc._height * this._yscale) / 100;
var i = 0;
while (i < this.labels.length) {
this.addItem(this.labels[i], this.data[i]);
i++;
}
this.lastSelected = 0;
this.selectItem(0);
this._xscale = (this._yscale = 100);
this.opened = false;
this.setSize(this.width);
this.highlightTop(false);
if (this.changeHandler.length > 0) {
this.setChangeHandler(this.changeHandler);
}
this.onUnload = function () {
this.superHolder.removeMovieClip();
};
this.setSelectedIndex(0, false);
this.value = "";
this.focusEnabled = true;
this.changeFlag = false;
}
FComboBoxClass.prototype = new FScrollSelectListClass();
Object.registerClass("FComboBoxSymbol", FComboBoxClass);
FComboBoxClass.prototype.modelChanged = function (eventObj) {
super.modelChanged(eventObj);
var event = eventObj.event;
if ((event == "addRows") || (event == "deleteRows")) {
var diff = ((eventObj.lastRow - eventObj.firstRow) + 1);
var mode = ((event == "addRows") ? 1 : -1);
var len = this.getLength();
var lenBefore = (len - (mode * diff));
if ((this.rowCount > lenBefore) || (this.rowCount > len)) {
this.invalidate("setSize");
}
if (this.getSelectedIndex() == undefined) {
this.setSelectedIndex(0, false);
}
} else if (event == "updateAll") {
this.invalidate("setSize");
}
};
FComboBoxClass.prototype.removeAll = function () {
if (!this.enable) {
return(undefined);
}
super.removeAll();
if (this.editable) {
this.value = "";
}
this.invalidate("setSize");
};
FComboBoxClass.prototype.setSize = function (w) {
if ((((w == undefined) || (typeof(w) != "number")) || (w <= 0)) || (!this.enable)) {
return(undefined);
}
this.proxyBox_mc._width = w;
this.container_mc.removeMovieClip();
this.measureItmHgt();
this.container_mc = this.superHolder.createEmptyMovieClip("container", 3);
this.container_mc.tabChildren = false;
this.setPopUpLocation(this.container_mc);
this.container_mc.attachMovie("FBoundingBoxSymbol", "boundingBox_mc", 0);
this.boundingBox_mc = this.container_mc.boundingBox_mc;
this.boundingBox_mc.component = this;
this.registerSkinElement(this.boundingBox_mc.boundingBox, "background");
this.proxyBox_mc._height = this.itmHgt;
this.numDisplayed = Math.min(this.rowCount, this.getLength());
if (this.numDisplayed < 3) {
this.numDisplayed = Math.min(3, this.getLength());
}
this.height = (this.numDisplayed * (this.itmHgt - 2)) + 2;
super.setSize(w, this.height);
this.attachMovie("DownArrow", "downArrow", 10);
this.downArrow._y = 0;
this.downArrow._width = this.itmHgt;
this.downArrow._height = this.itmHgt;
this.downArrow._x = this.proxyBox_mc._width - this.downArrow._width;
this.setEditable(this.editable);
this.container_mc._visible = this.opened;
this.highlightTop(false);
this.fader = this.superHolder.attachMovie("FBoundingBoxSymbol", "faderX", 4);
this.registerSkinElement(this.fader.boundingBox, "background");
this.fader._width = this.width;
this.fader._height = this.height;
this.fader._visible = false;
};
FComboBoxClass.prototype.setDataProvider = function (dp) {
super.setDataProvider(dp);
this.invalidate("setSize");
this.setSelectedIndex(0);
};
FComboBoxClass.prototype.getValue = function () {
if (this.editable) {
return(this.fLabel_mc.getLabel());
}
return(super.getValue());
};
FComboBoxClass.prototype.getRowCount = function () {
return(this.rowCount);
};
FComboBoxClass.prototype.setRowCount = function (count) {
this.rowCount = ((this.getLength() > count) ? (Math.max(count, 3)) : (count));
this.setSize(this.width);
var len = this.getLength();
if ((len - this.getScrollPosition()) < this.rowCount) {
this.setScrollPosition(len - Math.min(this.rowCount, len));
this.invalidate("updateControl");
}
};
FComboBoxClass.prototype.setEditable = function (editableFlag) {
if (!this.enable) {
return(undefined);
}
this.editable = editableFlag;
if (!this.editable) {
this.onPress = this.pressHandler;
this.useHandCursor = false;
this.trackAsMenu = true;
this.attachMovie("FComboBoxItemSymbol", "fLabel_mc", 5, {controller:this, itemNum:-1});
this.fLabel_mc.onRollOver = undefined;
this.fLabel_mc.setSize((this.width - this.itmHgt) + 1, this.itmHgt);
this.topLabel = this.getSelectedItem();
this.fLabel_mc.drawItem(this.topLabel, false);
this.highlightTop(false);
} else {
this.attachMovie("FLabelSymbol", "fLabel_mc", 5);
this.fLabel_txt = this.fLabel_mc.labelField;
this.fLabel_txt.type = "input";
this.fLabel_txt._x = 4;
this.fLabel_txt.onSetFocus = this.onLabelFocus;
this.fLabel_mc.setSize((this.width - this.itmHgt) - 3);
delete this.onPress;
this.fLabel_txt.onKillFocus = function () {
this._parent._parent.myOnKillFocus();
};
this.fLabel_mc.setLabel(this.value);
this.fLabel_txt.onChanged = function () {
this._parent._parent.findInputText();
};
this.downArrow.onPress = this.buttonPressHandler;
this.downArrow.useHandCursor = false;
this.downArrow.trackAsMenu = true;
}
};
FComboBoxClass.prototype.setEnabled = function (enabledFlag) {
enabledFlag = (((enabledFlag == undefined) || (typeof(enabledFlag) != "boolean")) ? true : (enabledFlag));
super.setEnabled(enabledFlag);
this.registerSkinElement(this.boundingBox_mc.boundingBox, "background");
this.proxyBox_mc.gotoAndStop((this.enable ? "enabled" : "disabled"));
this.downArrow.gotoAndStop((this.enable ? 1 : 3));
if (this.editable) {
this.fLabel_txt.type = (enabledFlag ? "input" : "dynamic");
this.fLabel_txt.selectable = enabledFlag;
} else if (enabledFlag) {
this.fLabel_mc.drawItem(this.topLabel, false);
this.setSelectedIndex(this.getSelectedIndex(), false);
}
this.fLabel_mc.setEnabled(this.enable);
this.fLabel_txt.onSetFocus = (enabledFlag ? (this.onLabelFocus) : undefined);
};
FComboBoxClass.prototype.setSelectedIndex = function (index, flag) {
super.setSelectedIndex(index, flag);
if (!this.editable) {
this.topLabel = this.getSelectedItem();
this.fLabel_mc.drawItem(this.topLabel, false);
} else {
this.value = ((flag != undefined) ? "" : (this.getSelectedItem().label));
this.fLabel_mc.setLabel(this.value);
}
this.invalidate("updateControl");
};
FComboBoxClass.prototype.setValue = function (value) {
if (this.editable) {
this.fLabel_mc.setLabel(value);
this.value = value;
}
};
FComboBoxClass.prototype.pressHandler = function () {
this.focusRect.removeMovieClip();
if (this.enable) {
if (!this.opened) {
this.onMouseUp = this.releaseHandler;
} else {
this.onMouseUp = undefined;
}
this.changeFlag = false;
if (!this.focused) {
this.pressFocus();
this.clickFilter = (this.editable ? false : true);
}
if (!this.clickFilter) {
this.openOrClose(!this.opened);
} else {
this.clickFilter = false;
}
}
};
FComboBoxClass.prototype.clickHandler = function (itmNum) {
if (!this.focused) {
if (this.editable) {
this.fLabel_txt.onKillFocus = undefined;
}
this.pressFocus();
}
super.clickHandler(itmNum);
this.selectionHandler(itmNum);
this.onMouseUp = this.releaseHandler;
};
FComboBoxClass.prototype.highlightTop = function (flag) {
if (!this.editable) {
this.fLabel_mc.drawItem(this.topLabel, flag);
}
};
FComboBoxClass.prototype.myOnSetFocus = function () {
super.myOnSetFocus();
this.fLabel_mc.highlight_mc.gotoAndStop("enabled");
this.highlightTop(true);
};
FComboBoxClass.prototype.drawFocusRect = function () {
this.drawRect(-2, -2, this.width + 4, this._height + 4);
};
FComboBoxClass.prototype.myOnKillFocus = function () {
if (Selection.getFocus().indexOf("labelField") != -1) {
return(undefined);
}
super.myOnKillFocus();
delete this.fLabel_txt.onKeyDown;
this.openOrClose(false);
this.highlightTop(false);
};
FComboBoxClass.prototype.setPopUpLocation = function (mcRef) {
mcRef._x = this._x;
var point = {x:this._x, y:this._y + this.proxyBox_mc._height};
this._parent.localToGlobal(point);
mcRef._parent.globalToLocal(point);
mcRef._x = point.x;
mcRef._y = point.y;
if ((this.height + mcRef._y) >= Stage.height) {
this.upward = true;
mcRef._y = (point.y - this.height) - this.proxyBox_mc._height;
} else {
this.upward = false;
}
};
FComboBoxClass.prototype.openOrClose = function (flag) {
if (this.getLength() == 0) {
return(undefined);
}
this.setPopUpLocation(this.container_mc);
if ((this.lastSelected != -1) && ((this.lastSelected < this.topDisplayed) || (this.lastSelected > (this.topDisplayed + this.numDisplayed)))) {
super.moveSelBy(this.lastSelected - this.getSelectedIndex());
}
if (!flag) {
(this.downArrow.gotoAndStop(1));// not popped
} else {
(this.downArrow.gotoAndStop(2));// not popped
}
if (flag == this.opened) {
return(undefined);
}
this.highlightTop(!flag);
this.fadeRate = this.styleTable.popUpFade.value;
if (((!flag) || (this.fadeRate == undefined)) || (this.fadeRate == 0)) {
this.opened = (this.container_mc._visible = flag);
return(undefined);
}
this.setPopUpLocation(this.fader);
this.time = 0;
this.const = 85 / Math.sqrt(this.fadeRate);
this.fader._alpha = 85;
this.container_mc._visible = (this.fader._visible = true);
this.onEnterFrame = function () {
this.fader._alpha = 100 - ((this.const * Math.sqrt(++this.time)) + 15);
if (this.time >= this.fadeRate) {
this.fader._visible = false;
delete this.onEnterFrame;
this.opened = true;
}
};
};
FComboBoxClass.prototype.fireChange = function () {
this.lastSelected = this.getSelectedIndex();
if (!this.editable) {
this.topLabel = this.getSelectedItem();
this.fLabel_mc.drawItem(this.topLabel, true);
} else {
this.value = this.getSelectedItem().label;
this.fLabel_mc.setLabel(this.value);
}
this.executeCallback();
};
FComboBoxClass.prototype.releaseHandler = function () {
var onCombo = this.boundingBox_mc.hitTest(_root._xmouse, _root._ymouse);
if (this.changeFlag) {
if (onCombo) {
this.fireChange();
}
this.openOrClose(!this.opened);
} else if (onCombo) {
this.openOrClose(false);
} else {
this.onMouseDown = function () {
if ((!this.boundingBox_mc.hitTest(_root._xmouse, _root._ymouse)) && (!this.hitTest(_root._xmouse, _root._ymouse))) {
this.onMouseDown = undefined;
this.openOrClose(false);
}
};
}
this.changeFlag = false;
this.onMouseUp = undefined;
clearInterval(this.dragScrolling);
this.dragScrolling = undefined;
};
FComboBoxClass.prototype.moveSelBy = function (itemNum) {
if (itemNum != 0) {
super.moveSelBy(itemNum);
if (this.editable) {
this.setValue(this.getSelectedItem().label);
}
if (!this.opened) {
if (this.changeFlag && (!this.isSelected(this.lastSelected))) {
this.fireChange();
}
}
}
};
FComboBoxClass.prototype.myOnKeyDown = function () {
if (!this.focused) {
return(undefined);
}
if (this.editable && (Key.isDown(13))) {
this.setValue(this.fLabel_mc.getLabel());
this.executeCallback();
this.openOrClose(false);
} else if ((Key.isDown(13) || (Key.isDown(32) && (!this.editable))) && (this.opened)) {
if (this.getSelectedIndex() != this.lastSelected) {
this.fireChange();
}
this.openOrClose(false);
this.fLabel_txt.hscroll = 0;
}
super.myOnKeyDown();
};
FComboBoxClass.prototype.findInputText = function () {
if (!this.editable) {
super.findInputText();
}
};
FComboBoxClass.prototype.onLabelFocus = function () {
this._parent._parent.tabFocused = false;
this._parent._parent.focused = true;
this.onKeyDown = function () {
this._parent._parent.myOnKeyDown();
};
Key.addListener(this);
};
FComboBoxClass.prototype.buttonPressHandler = function () {
this._parent.pressHandler();
};
#endinitclip
this.deadPreview._visible = false;
Instance of Symbol 94 MovieClip [FScrollSelectListSymbol] "superClassAsset" in Symbol 102 MovieClip [FComboBoxSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
}
Symbol 105 MovieClip [losd] Frame 1
setProperty(this, _visible , false);
power = 10;
tohit = _root.hittarget(this);
if (_root.game.surface.hittest(_x + _root.game._x, _y, true)) {
gotoAndPlay (4);
} else if (_parent.player.hittest(this)) {
gotoAndPlay (4);
} else {
speed = 25;
yspeed = speed * Math.sin((_rotation - 90) / 57.2957795130823);
xspeed = speed * Math.cos((_rotation - 90) / 57.2957795130823);
setProperty(this, _x , _x + xspeed);
setProperty(this, _y , _y + yspeed);
}
Symbol 105 MovieClip [losd] Frame 2
call("movement");
Symbol 105 MovieClip [losd] Frame 3
gotoAndPlay (2);
Symbol 105 MovieClip [losd] Frame 4
if (_parent.player.hittest(this)) {
gotoAndPlay (4);
firer.alert = true;
firer.framescharged = 15;
} else {
firer.alert = false;
}
Symbol 105 MovieClip [losd] Frame 7
this.removeMovieClip();
Symbol 113 MovieClip [RPG] Frame 1
power = 10;
speed = 4;
yspeed = speed * Math.sin((_rotation - 90) / 57.2957795130823);
xspeed = speed * Math.cos((_rotation - 90) / 57.2957795130823);
setProperty(this, _x , _x + xspeed);
setProperty(this, _y , _y + yspeed);
Symbol 113 MovieClip [RPG] Frame 2
if (speed < 15) {
speed = speed * 1.2;
yspeed = speed * Math.sin((_rotation - 90) / 57.2957795130823);
xspeed = speed * Math.cos((_rotation - 90) / 57.2957795130823);
}
setProperty(this, _x , _x + xspeed);
setProperty(this, _y , _y + yspeed);
if (_root.game.surface.hittest(_x + _root.game._x, _y, true)) {
gotoAndPlay (4);
}
_root.smoke(_x, _y + 6);
Symbol 113 MovieClip [RPG] Frame 3
gotoAndPlay (2);
Symbol 113 MovieClip [RPG] Frame 48
_root.sound.gotoAndPlay("explode");
_root.flash.gotoAndPlay(1);
_root.smoke(_x + (random(10) - random(10)), _y);
_root.smoke(_x + (random(10) - random(10)), _y);
_root.smoke(_x + (random(10) - random(10)), _y);
_root.smoke(_x + (random(10) - random(10)), _y);
_root.smoke(_x + (random(10) - random(10)), _y);
Symbol 113 MovieClip [RPG] Frame 52
_root.explode(this, 100, 200);
Symbol 113 MovieClip [RPG] Frame 57
this.removeMovieClip();
Symbol 117 MovieClip [Grenade] Frame 1
power = 10;
speed = 10;
yspeed = speed * Math.sin((_rotation - 90) / 57.2957795130823);
xspeed = speed * Math.cos((_rotation - 90) / 57.2957795130823);
setProperty(this, _x , _x + xspeed);
setProperty(this, _y , _y + yspeed);
Symbol 117 MovieClip [Grenade] Frame 2
setProperty(this, _x , _x + xspeed);
setProperty(this, _y , _y + yspeed);
setProperty(this, _rotation , _rotation + 40);
yspeed = yspeed + 0.25;
if (_root.game.surface.hittest(_x + _root.game._x, _y, true)) {
gotoAndPlay (4);
}
Symbol 117 MovieClip [Grenade] Frame 3
gotoAndPlay (2);
Symbol 117 MovieClip [Grenade] Frame 48
_root.sound.gotoAndPlay("explode");
_root.flash.gotoAndPlay(1);
_root.smoke(_x + (random(10) - random(10)), _y);
_root.smoke(_x + (random(10) - random(10)), _y);
_root.smoke(_x + (random(10) - random(10)), _y);
_root.smoke(_x + (random(10) - random(10)), _y);
_root.smoke(_x + (random(10) - random(10)), _y);
Symbol 117 MovieClip [Grenade] Frame 52
_root.explode(this, 100, 200);
Symbol 117 MovieClip [Grenade] Frame 57
this.removeMovieClip();
Symbol 122 MovieClip [Ultra Laser] Frame 1
power = 35;
speed = 20;
tohit = _root.hittarget(this);
_root.smoke(_x, _y);
if ((Math.abs(_x - _parent.player._x) > 800) || (_y < -50)) {
removeMovieClip(this);
}
if (tohit != "") {
gotoAndPlay (4);
} else if (_root.game.surface.hittest(_x + _root.game._x, _y, true)) {
gotoAndPlay (4);
} else {
yspeed = speed * Math.sin((_rotation - 90) / 57.2957795130823);
xspeed = speed * Math.cos((_rotation - 90) / 57.2957795130823);
setProperty(this, _x , _x + xspeed);
setProperty(this, _y , _y + yspeed);
}
Symbol 122 MovieClip [Ultra Laser] Frame 2
call("movement");
call("movement");
call("movement");
call("movement");
call("movement");
Symbol 122 MovieClip [Ultra Laser] Frame 3
gotoAndPlay (2);
Symbol 122 MovieClip [Ultra Laser] Frame 4
_root.smoke(_x, _y);
tohit = _root.hittarget(this);
tohit.hity = _y;
eval (tohit).hit(power, xspeed);
for (object in _parent) {
if (object.indexOf("enemy") > -1) {
dist = Math.abs(eval ("_parent." + object)._x - _x);
if (dist < 150) {
Set(("_parent." + object) + ".alert", true);
}
}
}
_root.sound.gotoAndPlay("laserhit");
Symbol 122 MovieClip [Ultra Laser] Frame 7
this.removeMovieClip();
Symbol 124 MovieClip [Fast Laser] Frame 1
power = 25;
speed = 20;
tohit = _root.hittarget(this);
if ((Math.abs(_x - _parent.player._x) > 800) || (_y < -50)) {
removeMovieClip(this);
}
if (tohit != "") {
gotoAndPlay (4);
} else if (_root.game.surface.hittest(_x + _root.game._x, _y, true)) {
gotoAndPlay (4);
} else {
yspeed = speed * Math.sin((_rotation - 90) / 57.2957795130823);
xspeed = speed * Math.cos((_rotation - 90) / 57.2957795130823);
setProperty(this, _x , _x + xspeed);
setProperty(this, _y , _y + yspeed);
}
Symbol 124 MovieClip [Fast Laser] Frame 2
call("movement");
call("movement");
Symbol 124 MovieClip [Fast Laser] Frame 3
gotoAndPlay (2);
Symbol 124 MovieClip [Fast Laser] Frame 4
_root.smoke(_x, _y);
tohit = _root.hittarget(this);
tohit.hity = _y;
eval (tohit).hit(power, xspeed);
for (object in _parent) {
if (object.indexOf("enemy") > -1) {
dist = Math.abs(eval ("_parent." + object)._x - _x);
if (dist < 150) {
Set(("_parent." + object) + ".alert", true);
}
}
}
_root.sound.gotoAndPlay("laserhit");
Symbol 124 MovieClip [Fast Laser] Frame 7
this.removeMovieClip();
Symbol 131 MovieClip [Laser] Frame 1
power = 10 + (colour * 2);
speed = 15 + (colour * 2);
tohit = _root.hittarget(this);
if ((Math.abs(_x - _parent.player._x) > 800) || (_y < -50)) {
removeMovieClip(this);
}
if (tohit != "") {
gotoAndPlay (4);
} else if (_root.game.surface.hittest(_x + _root.game._x, _y, true)) {
gotoAndPlay (4);
} else {
yspeed = speed * Math.sin((_rotation - 90) / 57.2957795130823);
xspeed = speed * Math.cos((_rotation - 90) / 57.2957795130823);
setProperty(this, _x , _x + xspeed);
setProperty(this, _y , _y + yspeed);
}
Symbol 131 MovieClip [Laser] Frame 2
call("movement");
Instance of Symbol 130 MovieClip in Symbol 131 MovieClip [Laser] Frame 2
onClipEvent (load) {
gotoAndStop(_parent.colour);
}
Symbol 131 MovieClip [Laser] Frame 3
gotoAndPlay (2);
Symbol 131 MovieClip [Laser] Frame 4
_root.smoke(_x, _y);
tohit = _root.hittarget(this);
tohit.hity = _y;
eval (tohit).hit(power, xspeed);
for (object in _parent) {
if (object.indexOf("enemy") > -1) {
dist = Math.abs(eval ("_parent." + object)._x - _x);
if (dist < 150) {
Set(("_parent." + object) + ".alert", true);
}
}
}
_root.sound.gotoAndPlay("laserhit");
Symbol 131 MovieClip [Laser] Frame 7
this.removeMovieClip();
Symbol 136 MovieClip Frame 1
gotoAndStop(random(4) + 2);
if ((Math.abs(_x - _parent.player._x) > 800) || (_y < -50)) {
removeMovieClip(this);
}
Symbol 137 MovieClip [Smoke] Frame 21
this.removeMovieClip();
Symbol 144 MovieClip [Turret] Frame 1
function hit(damage) {
shield = shield - damage;
}
team = "alien";
ammo = 100;
shield = 50;
Instance of Symbol 142 MovieClip "gun" in Symbol 144 MovieClip [Turret] Frame 1
onClipEvent (enterFrame) {
rotatespeed = 0.5;
angle = -Math.ceil(_root.getangle(_parent, _parent._parent.player, -25));
if (_rotation < angle) {
setProperty(this, _rotation , _rotation + rotatespeed);
} else if (_rotation > angle) {
setProperty(this, _rotation , _rotation - rotatespeed);
}
}
onClipEvent (load) {
setProperty(this, _rotation , random(360));
}
Symbol 144 MovieClip [Turret] Frame 2
_root.gravity(this);
if (Math.abs(_x - _parent.player._x) < 400) {
if (count > 20) {
_root.shoot(this, gun._rotation, 43, "Turret Laser");
count = 0;
} else {
count = Number(0 + count) + 1;
}
}
if (shield < 0) {
dead = true;
gotoAndPlay (4);
}
Symbol 144 MovieClip [Turret] Frame 3
gotoAndPlay (2);
Symbol 144 MovieClip [Turret] Frame 4
_root.sound.gotoAndPlay("explode");
_root.flash.gotoAndPlay(1);
_root.smoke(_x + (random(10) - random(10)), _y);
_root.smoke(_x + (random(10) - random(10)), _y);
_root.smoke(_x + (random(10) - random(10)), _y);
_root.smoke(_x + (random(10) - random(10)), _y);
_root.smoke(_x + (random(10) - random(10)), _y);
Symbol 144 MovieClip [Turret] Frame 5
stop();
Symbol 159 MovieClip Frame 1
gotoAndStop(_parent._parent._parent.level);
Symbol 179 MovieClip Frame 1
this.onEnterFrame = function () {
gotoAndStop(_parent.weapon);
};
gotoAndStop(_parent.weapon);
Symbol 182 MovieClip Frame 1
thetarget = _root.game.player;
thefirer = _parent._parent._parent;
weapon = _parent._parent._parent.weapon;
ammo = _parent._parent._parent.ammo;
if ((thefirer.alert && (_parent.dead != true)) && (Math.abs(thefirer._x - thetarget._x) < 740)) {
endtrailx = thetarget._x;
endtraily = thetarget._y - (thetarget._height / 2);
x = endtrailx - thefirer._x;
y = endtraily - (thefirer._y - 30);
if (x > 0) {
angle = ((Math.atan(y / x) / Math.PI) * 180) + 90;
} else {
angle = 180 - (((Math.atan(y / x) / Math.PI) * 180) + 90);
}
if (random(100) > 50) {
setProperty(this, _rotation , angle);
if (thefirer.facing == "left") {
_root.shoot(thefirer, -_rotation, 38, weapon);
} else {
_root.shoot(thefirer, _rotation, 38, weapon);
}
} else {
setProperty(this, _rotation , angle);
}
} else {
setProperty(this, _rotation , angle);
}
Symbol 182 MovieClip Frame 2
gotoAndPlay (1);
Symbol 190 MovieClip Frame 2
if ((_parent._parent._parent._parent.alert != true) || (_parent._parent._parent._parent.dead == true)) {
gotoAndPlay (1);
}
Symbol 190 MovieClip Frame 13
gotoAndPlay (2);
Symbol 196 MovieClip Frame 1
gotoAndStop(_parent._parent._parent.level);
Symbol 210 MovieClip Frame 10
stop();
Instance of Symbol 209 MovieClip in Symbol 210 MovieClip Frame 10
onClipEvent (enterFrame) {
setProperty(this, _visible , _parent._parent._parent.ammo > 0);
}
Symbol 227 MovieClip Frame 9
stop();
Instance of Symbol 210 MovieClip "inner" in Symbol 228 MovieClip Frame 2
onClipEvent (enterFrame) {
weapon = _parent._parent.weapon;
}
Symbol 229 MovieClip [Alien] Frame 1
function hit(power, xmove) {
alert = true;
framescharged = 15;
if (hity < (_y - (_height * 0.8))) {
shield = shield - (power * 2);
} else {
shield = shield - power;
}
sidespeed = sidespeed + (xmove / 10);
_root.move(this, sidespeed);
}
team = "alien";
man = true;
alert = false;
level = random(Math.ceil(_root.level / 2)) + 1;
if (level > 10) {
level = 10;
}
_root.RandomWeapon(this);
shield = random(10) + ((level - 1) * 10);
if (Math.random() > 0.2) {
facing = "left";
setProperty(this, _xscale , -100);
} else {
facing = "right";
setProperty(this, _xscale , 100);
}
Instance of Symbol 228 MovieClip in Symbol 229 MovieClip [Alien] Frame 1
onClipEvent (enterFrame) {
gotoAndStop(_parent.state);
}
Symbol 229 MovieClip [Alien] Frame 2
_root.gravity(this);
if (Math.abs(_x - _parent.player._x) > 770) {
setProperty(this, _visible , false);
alert = false;
} else {
setProperty(this, _visible , true);
if (shield < 0) {
dead = true;
state = "die";
} else if ((upspeed != 0) && (onground != true)) {
state = "jump";
} else {
state = "normal";
}
sidespeed = sidespeed / 1.03;
if (onground == true) {
} else {
_root.move(this, sidespeed);
}
if (dead != true) {
if ((((random(1000) > 990) && (onground == true)) && (Math.abs(_x - _parent.player._x) < 740)) && (alert == true)) {
upspeed = 5;
sidespeed = random(5) - random(5);
}
if (((_parent.player._x < _x) && (facing == "left")) || ((_parent.player._x > _x) && (facing == "right"))) {
if (Math.abs(_x - _parent.player._x) < (50 * level)) {
alert = true;
} else if (Math.abs(_x - _parent.player._x) < 740) {
angle = (angle + (Math.random() * 5)) - (Math.random() * 5);
if (random(100) > 97) {
endtrailx = _parent.player._x;
endtraily = (_parent.player._y - random(_parent.player._height / 2)) + random(_parent.player._height / 2);
x = endtrailx - _x;
y = endtraily - (_y - 38);
if (x > 0) {
angle = ((Math.atan(y / x) / Math.PI) * 180) + 90;
} else {
angle = 180 - (((Math.atan(y / x) / Math.PI) * 180) + 90);
}
if (facing == "left") {
_root.shoot(this, -angle, 38, "losd");
} else {
_root.shoot(this, angle, 38, "losd");
}
}
}
}
if (alert) {
if (_parent.player._x < _x) {
facing = "left";
setProperty(this, _xscale , -100);
} else {
facing = "right";
setProperty(this, _xscale , 100);
}
} else {
framescharged = 5;
if (random(1000) > 995) {
if (facing != "left") {
facing = "left";
setProperty(this, _xscale , -100);
} else {
facing = "right";
setProperty(this, _xscale , 100);
}
}
}
}
}
if (_root.dead == true) {
alert = false;
}
Symbol 229 MovieClip [Alien] Frame 3
if (state == "blasted") {
gotoAndPlay (1);
} else {
gotoAndPlay (2);
}
Symbol 233 MovieClip [Headshot] Frame 31
removeMovieClip(this);
Symbol 237 MovieClip [PlasmaMinor] Frame 1
power = 10;
speed = 10;
yspeed = speed * Math.sin((_rotation - 90) / 57.2957795130823);
xspeed = speed * Math.cos((_rotation - 90) / 57.2957795130823);
setProperty(this, _x , _x + xspeed);
setProperty(this, _y , _y + yspeed);
Symbol 237 MovieClip [PlasmaMinor] Frame 2
setProperty(this, _x , _x + xspeed);
setProperty(this, _y , _y + yspeed);
setProperty(this, _rotation , _rotation + 40);
yspeed = yspeed + 0.25;
tohit = _root.hittarget(this);
if (_root.game.surface.hittest(_x + _root.game._x, _y, true) || (tohit != "")) {
gotoAndPlay (4);
}
if (_y > 600) {
removeMovieClip(this);
}
Symbol 237 MovieClip [PlasmaMinor] Frame 3
gotoAndPlay (2);
Symbol 237 MovieClip [PlasmaMinor] Frame 4
_root.explode(this, random(50), 75);
_root.flash.gotoAndPlay(1);
_root.sound.gotoAndPlay("plasmahit");
Symbol 237 MovieClip [PlasmaMinor] Frame 15
removeMovieClip(this);
Symbol 240 MovieClip [Phased Plasma] Frame 1
power = 10;
speed = 2;
yspeed = speed * Math.sin((_rotation - 90) / 57.2957795130823);
xspeed = speed * Math.cos((_rotation - 90) / 57.2957795130823);
setProperty(this, _x , _x + xspeed);
setProperty(this, _y , _y + yspeed);
Symbol 240 MovieClip [Phased Plasma] Frame 2
if (speed < (15 + (colour * 5))) {
speed = speed * 1.5;
yspeed = speed * Math.sin((_rotation - 90) / 57.2957795130823);
xspeed = speed * Math.cos((_rotation - 90) / 57.2957795130823);
}
setProperty(this, _x , _x + xspeed);
setProperty(this, _y , _y + yspeed);
tohit = _root.hittarget(this);
if (_root.game.surface.hittest(_x + _root.game._x, _y, true) || (tohit != "")) {
gotoAndPlay (4);
}
if ((Math.abs(_x - _parent.player._x) > 800) || (_y < -50)) {
removeMovieClip(this);
}
Symbol 240 MovieClip [Phased Plasma] Frame 3
gotoAndPlay (2);
Symbol 240 MovieClip [Phased Plasma] Frame 4
_root.flash.gotoAndPlay(1);
_root.explode(this, 50, 50);
_root.sound.gotoAndPlay("plasmahit");
Symbol 240 MovieClip [Phased Plasma] Frame 15
removeMovieClip(this);
Symbol 243 MovieClip [Plasma] Frame 1
power = 10;
speed = 15;
yspeed = speed * Math.sin((_rotation - 90) / 57.2957795130823);
xspeed = speed * Math.cos((_rotation - 90) / 57.2957795130823);
setProperty(this, _x , _x + xspeed);
setProperty(this, _y , _y + yspeed);
Symbol 243 MovieClip [Plasma] Frame 2
setProperty(this, _x , _x + xspeed);
setProperty(this, _y , _y + yspeed);
setProperty(this, _rotation , _rotation + 40);
yspeed = yspeed + 0.25;
tohit = _root.hittarget(this);
if (_root.game.surface.hittest(_x + _root.game._x, _y, true) || (tohit != "")) {
gotoAndPlay (4);
}
if (_y > 600) {
removeMovieClip(this);
}
Symbol 243 MovieClip [Plasma] Frame 3
gotoAndPlay (2);
Symbol 243 MovieClip [Plasma] Frame 4
ammo = 10;
_root.flash.gotoAndPlay(1);
_root.shoot(this, random(20) - random(20), 50, "Plasma Minor");
_root.shoot(this, random(20) - random(20), 50, "Plasma Minor");
_root.shoot(this, random(20) - random(20), 50, "Plasma Minor");
_root.explode(this, random(50), 25);
_root.sound.gotoAndPlay("plasmahit");
Symbol 243 MovieClip [Plasma] Frame 15
removeMovieClip(this);
Instance of Symbol 249 MovieClip in Symbol 250 MovieClip Frame 1
onClipEvent (load) {
myColor = new Color(this);
myColorTransform = new Object();
myColorTransform = {rb:random(100), gb:random(100), bb:random(100)};
myColor.setTransform(myColorTransform);
scale = random(75) + 25;
setProperty(this, _xscale , scale);
setProperty(this, _yscale , scale);
setProperty(this, _rotation , random(360));
setProperty(this, _x , random(550) - 275);
setProperty(this, _y , random(300) - 150);
}
Symbol 251 MovieClip Frame 1
setProperty(this, _alpha , 100);
stop();
Symbol 251 MovieClip Frame 2
setProperty(this, _alpha , _alpha - 10);
if (_alpha <= 0) {
gotoAndStop (1);
}
play();
Symbol 251 MovieClip Frame 3
gotoAndPlay (2);
Symbol 265 Button
on (release) {
getURL ("http://www.benoldinggames.co.uk", "_blank");
}
Symbol 269 Button
on (release) {
getURL ("http://www.yoarcade.net", "_blank");
}
Symbol 279 MovieClip Frame 1
setProperty(this, _rotation , random(360));
setProperty(this, _yscale , 100 + random(450));
setProperty(this, _xscale , 100 + random(100));
gotoAndStop(random(3) + 2);
Symbol 280 MovieClip Frame 1
i = 2;
while (i < 5) {
newName = "piece" + i;
duplicateMovieClip ("piece1", newName, i);
setProperty(newName, _x , (i - 1) * 50);
i++;
}
Symbol 281 MovieClip Frame 1
i = 2;
while (i < 50) {
newName = "piece" + i;
duplicateMovieClip ("piece1", newName, i);
setProperty(newName, _x , (i - 1) * 50);
i++;
}
Symbol 282 MovieClip Frame 1
objectnum = 0;
randw = 5 - _root.level;
if (randw < 0) {
randw = 0;
}
Instance of Symbol 281 MovieClip "surface" in Symbol 282 MovieClip Frame 1
onClipEvent (load) {
myColorTransform = new Object();
myColorTransform = {rb:_root.rb, gb:_root.gb, bb:_root.bb};
myColor = new Color(_root.bgland1);
myColor.setTransform(myColorTransform);
myColor = new Color(_root.game);
myColor.setTransform(myColorTransform);
}
Symbol 294 MovieClip Frame 1
stop();
Symbol 294 MovieClip Frame 2
gotoAndStop (1);
Symbol 294 MovieClip Frame 3
gotoAndStop (1);
Symbol 294 MovieClip Frame 4
gotoAndStop (1);
Symbol 294 MovieClip Frame 5
gotoAndStop (1);
Symbol 294 MovieClip Frame 6
gotoAndStop (1);
Symbol 294 MovieClip Frame 7
gotoAndStop (1);
Symbol 294 MovieClip Frame 8
gotoAndStop (1);
Symbol 294 MovieClip Frame 9
gotoAndStop (1);
Symbol 294 MovieClip Frame 10
gotoAndStop (1);
Symbol 294 MovieClip Frame 11
gotoAndStop (1);
Symbol 302 Button
on (release, keyPress "<Enter>") {
_root.sound.gotoAndPlay("explode");
_root.flash.gotoAndPlay(1);
_root.level = _root.loadlevel(_root.levelcode);
_root.gotoAndStop("nextlevel");
}
Symbol 304 Button
on (release) {
this.gotoAndStop("controls");
}
Symbol 305 Button
on (release) {
this.gotoAndStop("options");
}
Symbol 320 Button
on (release) {
this.gotoAndStop(1);
}
Symbol 328 Button
on (release) {
gotoAndStop (3);
}
Symbol 330 Button
on (release) {
gotoAndStop (2);
}
Symbol 331 MovieClip Frame 1
if (eval (variable) == true) {
gotoAndStop (2);
} else {
gotoAndStop (3);
}
Symbol 331 MovieClip Frame 2
Set(variable, true);
Symbol 331 MovieClip Frame 3
Set(variable, false);
Symbol 332 Button
on (release) {
setProperty(_root, _quality , "LOW");
}
Symbol 333 Button
on (release) {
setProperty(_root, _quality , "MEDIUM");
}
Symbol 334 Button
on (release) {
setProperty(_root, _quality , "HIGH");
}
Symbol 335 MovieClip Frame 1
stop();
Instance of Symbol 331 MovieClip in Symbol 335 MovieClip Frame 3
onClipEvent (load) {
variable = "_root.smokeeffect";
}
Symbol 355 MovieClip Frame 1
endtrailx = _root.game._xmouse;
endtraily = _root.game._ymouse;
x = endtrailx - _parent._parent._x;
y = endtraily - (_parent._parent._y - 38);
if (x > 0) {
angle = ((Math.atan(y / x) / Math.PI) * 180) + 90;
} else {
angle = 180 - (((Math.atan(y / x) / Math.PI) * 180) + 90);
}
setProperty(this, _rotation , angle);
weapon = _parent._parent.weapon;
ammo = _parent._parent.ammo;
Symbol 355 MovieClip Frame 2
gotoAndPlay (1);
Symbol 361 MovieClip Frame 1
_root.dead = true;
Symbol 361 MovieClip Frame 80
stop();
if (_root.lives > 1) {
_root.lives = _root.lives - 1;
_root.dead = false;
_parent.shield = 100;
_parent.gotoAndPlay(1);
} else {
_root.gotoAndStop("Game Over");
}
Symbol 362 MovieClip Frame 2
gotoAndPlay(state);
Symbol 362 MovieClip Frame 4
call("gotostate");
Symbol 362 MovieClip Frame 6
call("gotostate");
Symbol 362 MovieClip Frame 8
call("gotostate");
Instance of Symbol 361 MovieClip in Symbol 362 MovieClip Frame 9
onClipEvent (load) {
weapon = _parent.weapon;
}
Symbol 362 MovieClip Frame 10
call("gotostate");
Symbol 363 MovieClip Frame 1
objectnum = 0;
randw = 5 - _root.level;
if (randw < 0) {
randw = 0;
}
i = 600;
while (i <= 2300) {
if ((random(1000) > (990 + randw)) && (i > newminimumx)) {
objectnum = objectnum + 1;
newName = "enemy" + objectnum;
if (Math.random() > 0.9) {
this.attachMovie("Turret", newName, 50 + objectnum);
} else {
this.attachMovie("Alien", newName, 50 + objectnum);
}
setProperty(newName, _x , i);
newminimumx = i + eval (newName)._width;
}
i++;
}
Instance of Symbol 281 MovieClip "surface" in Symbol 363 MovieClip Frame 1
onClipEvent (load) {
myColorTransform = new Object();
myColorTransform = {rb:_root.rb, gb:_root.gb, bb:_root.bb};
myColor = new Color(_root.bgland1);
myColor.setTransform(myColorTransform);
myColor = new Color(_root.game);
myColor.setTransform(myColorTransform);
}
Instance of Symbol 362 MovieClip "player" in Symbol 363 MovieClip Frame 1
onClipEvent (load) {
function hit(power, xmove) {
_root.move(this, xmove / 4);
if (_root.cheat != "wellard") {
shield = shield - (random(power) + 1);
}
if (shield < 0) {
shooting = false;
state = "dead";
}
}
man = true;
_root.dead = false;
_root.warning = "";
weapon = _root.weapon;
ammo = _root.ammo;
grenadeammo = _root.grenadeammo;
team = "human";
shield = 100;
framescharged = 20;
}
onClipEvent (enterFrame) {
topickup = "";
topickdist = 0;
for (object in _parent) {
if (object.indexOf("enemy") > -1) {
if ((((((0 + eval ("_parent." + object).ammo) > 0) && ((eval ("_parent." + object).weapon + "") != "")) && (eval ("_parent." + object).dead == true)) && (Math.abs(_x - eval ("_parent." + object)._x) < 25)) && (Math.abs(_y - eval ("_parent." + object)._y) < 30)) {
if ((topickdist == 0) || (Math.abs(eval ("_parent." + object)._x - _parent.player._x) < topickdist)) {
topickup = eval ("_parent." + object);
topickdist = Math.abs(eval ("_parent." + object)._x - _parent.player._x);
}
}
}
}
if ((topickup.weapon + "") != "") {
_root.message = ((("Press Return (Enter) or E to swap your weapon for a " + topickup.weapon) + " (") + topickup.ammo) + ")";
} else if (ammo < 1) {
_root.message = "You are out of ammo. Take a weapon from a dead enemy";
} else {
_root.message = "";
}
if (shooting == true) {
if (_root.game.player.state == "crouching") {
offset = 20;
} else {
offset = 32;
}
if (_root.game.player.facing == "left") {
_root.shoot(_root.game.player, -_root.game.player.inner.arm.angle, offset, weapon);
} else {
_root.shoot(_root.game.player, _root.game.player.inner.arm.angle, offset, weapon);
}
}
}
onClipEvent (enterFrame) {
_root.gravity(this);
}
onClipEvent (enterFrame) {
inccount = Number(inccount) + 1;
if (inccount > 20) {
if ((jetpack < 100) && (state != "standing")) {
jetpack = jetpack + 1;
inccount = 0;
} else if ((jetpack < 100) && (state == "standing")) {
jetpack = jetpack + 1;
inccount = 17;
}
}
if (shield <= 0) {
_root.warning = "Dead";
} else if (shield < 10) {
_root.warning = "Low Armour";
} else if (ammo < 5) {
_root.warning = "Low Ammo";
} else {
_root.warning = "";
}
if (shield <= 0) {
state = "dead";
} else if (_x > 2350) {
_root.weapon = weapon;
_root.ammo = ammo;
_root.gotoAndPlay("nextlevel");
} else {
if (_parent._xmouse < _x) {
setProperty(this, _xscale , -100);
facing = "left";
} else {
setProperty(this, _xscale , 100);
facing = "right";
}
if (((onground != true) && (key.isDown(40) != true)) && (key.isDown(83) != true)) {
state = "jumping";
} else if (key.isDown(37) || (key.isDown(65))) {
state = "running";
} else if (key.isDown(39) || (key.isDown(68))) {
state = "running";
} else if (key.isDown(40) || (key.isDown(83))) {
state = "crouching";
} else {
state = "standing";
}
if ((key.isDown(38) || (key.isDown(87))) && (upspeed <= 0)) {
if (onground != true) {
if ((jetpack >= 30) && (_y > 75)) {
upspeed = 4;
jetpack = jetpack - 30;
}
} else {
upspeed = 4;
}
} else if ((key.isDown(40) || (key.isDown(83))) && (upspeed > -4)) {
if ((jetpack >= 10) && (onground != true)) {
jetpack = jetpack - 10;
upspeed = -4;
}
} else if (key.isDown(37) || (key.isDown(65))) {
_root.move(this, -3);
} else if (key.isDown(39) || (key.isDown(68))) {
_root.move(this, 3);
}
}
}
Instance of Symbol 387 MovieClip in Symbol 402 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.game.player.shield > 30) {
gotoAndStop (1);
} else if (_root.game.player.shield > 15) {
gotoAndStop (2);
} else {
gotoAndStop (3);
}
}
Instance of Symbol 394 MovieClip in Symbol 402 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.game.player.jetpack >= 30) {
gotoAndStop (1);
} else if (_root.game.player.jetpack >= 10) {
gotoAndStop (2);
} else {
gotoAndStop (3);
}
}
Instance of Symbol 401 MovieClip in Symbol 402 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.game.player.ammo > 15) {
gotoAndStop (1);
} else if (_root.game.player.ammo > 5) {
gotoAndStop (2);
} else {
gotoAndStop (3);
}
}
Symbol 403 Button
on (press) {
if (_root.dead != true) {
_root.game.player.shooting = true;
}
}
on (release) {
_root.game.player.shooting = false;
}
on (keyPress "<Space>") {
if (_root.dead != true) {
if (_root.game.player.state == "crouching") {
offset = 20;
} else {
offset = 32;
}
if (_root.game.player.facing == "left") {
_root.shoot(_root.game.player, -_root.game.player.inner.arm.angle, offset, "Grenade");
} else {
_root.shoot(_root.game.player, _root.game.player.inner.arm.angle, offset, "Grenade");
}
}
}
on (keyPress "0") {
if (_root.dead != true) {
if (_root.game.player.state == "crouching") {
offset = 20;
} else {
offset = 32;
}
if (_root.game.player.facing == "left") {
_root.shoot(_root.game.player, -_root.game.player.inner.arm.angle, offset, "Grenade");
} else {
_root.shoot(_root.game.player, _root.game.player.inner.arm.angle, offset, "Grenade");
}
}
}
on (keyPress "<Enter>") {
if (_root.dead != true) {
_root.SwapWeapon();
}
}
on (keyPress "e") {
if (_root.dead != true) {
_root.SwapWeapon();
}
}
Symbol 409 MovieClip Frame 1
leveltext = "Level " + _root.level;
Symbol 416 Button
on (release) {
gotoAndStop (4);
}
Symbol 420 Button
on (release) {
gotoAndStop (3);
}
Symbol 424 Button
on (release) {
_root.level = _root.loadlevel(_root.levelcode);
_root.gotoAndStop("nextlevel");
}