Frame 1
loaded = getBytesLoaded();
tot = getBytesTotal();
if (loaded == tot) {
gotoAndStop (4);
} else {
with (Bar) {
_width = (96 * loaded) / tot;
_x = 132 + (_width / 2);
}
}
Instance of Symbol 111 MovieClip "Demo" in Frame 1
onClipEvent (load) {
stop();
}
Frame 3
gotoAndPlay (1);
Frame 4
score = 0;
stop();
Frame 6
function initVars() {
pacDir = 3;
pacPos = 0;
pacX = 14;
pacY = 23;
nextX = pacX - 1;
nextY = pacY;
nextPacDir = 3;
ghKill = 100;
ghBlue = 0;
numEyes = 0;
Pacman.gotoAndStop(1);
pacStep = 4;
pacPosMax = 2;
pauseCount = 0;
with (Pacman) {
_x = OFFX + (12 * pacX);
_y = OFFY + (12 * pacY);
_rotation = 0;
}
tellTarget (Ghost[1]) {
ghPos = 1;
ghDir = 3;
ghX = 13;
ghY = 11;
ghNX = ghX - 1;
_y = (_root.OFFY + 132);
cOrig = 14483456 /* 0xDD0000 */;
};
tellTarget (Ghost[2]) {
ghDir = 0;
ghX = 13;
cOrig = 16751001 /* 0xFF9999 */;
};
tellTarget (Ghost[3]) {
ghDir = 2;
ghX = 11;
cOrig = 6750207 /* 0x66FFFF */;
};
tellTarget (Ghost[4]) {
ghDir = 2;
ghX = 15;
cOrig = 16750848 /* 0xFF9900 */;
};
g = 1;
while (g < 5) {
tellTarget (Ghost[g]) {
if (this.g > 1) {
ghPos = 0;
ghY = 14;
ghNX = ghX;
_y = (_root.OFFY + 174);
}
_x = ((_root.OFFX + (12 * ghX)) + 6);
gotoAndStop (1);
Eyes.gotoAndStop(1);
gNum = 0;
ghNY = ghY;
ghStep = 4;
ghPosMax = 2;
ghFast = true;
Shape._visible = true;
Shape.Hit._visible = true;
c = new Color(Shape);
c.setRGB(cOrig);
};
g++;
}
}
function setPacMove(d) {
with (_root) {
if (d == 0) {
nextX = pacX;
nextY = pacY - 1;
Pacman._rotation = 90;
Pacman.pac.gotoandstop(1);
} else if (d == 1) {
nextX = pacX + 1;
nextY = pacY;
Pacman._rotation = 180;
Pacman.pac.gotoandstop(2);
} else if (d == 2) {
nextX = pacX;
nextY = pacY + 1;
Pacman._rotation = -90;
Pacman.pac.gotoandstop(1);
} else if (d == 3) {
nextX = pacX - 1;
nextY = pacY;
Pacman._rotation = 0;
Pacman.pac.gotoandstop(1);
}
}
}
function setGhMove(d, g) {
with (_root.Ghost[g]) {
if (d == 0) {
ghNX = ghX;
ghNY = ghY - 1;
} else if (d == 1) {
ghNX = ghX + 1;
ghNY = ghY;
} else if (d == 2) {
ghNX = ghX;
ghNY = ghY + 1;
} else if (d == 3) {
ghNX = ghX - 1;
ghNY = ghY;
}
}
}
function startBGSnd() {
tellTarget (BGSnd) {
if (_root.ghBlue > 2) {
if (_root.numEyes) {
EyesGh.start(0, 100);
BlueGh.stop();
} else {
EyesGh.stop();
BlueGh.start(0, 100);
}
} else {
BlueGh.stop();
EyesGh.stop();
eval ("Back" + _root.bgNum).start(0, 1000);
}
};
}
OFFX = 18;
OFFY = 18;
score = 0;
lastScore = 0;
lives = 3;
level = 0;
fruitNum = 1;
notMute = true;
newLev = true;
newLife = false;
newGame = true;
quttting = false;
quit = false;
Snd.ChSnd = true;
Pacman.Hit._visible = false;
ghPause = 40;
ghBVal = 162;
ghMove = new Array(4);
ghChoice = new Array(4);
ghBest = new Array(4);
g = 1;
while (g < 5) {
Ghost.attachMovie("Ghost", g, g);
Ghost.attachMovie("GhKill", "K" + g, g + 4);
Ghost["K" + g].Scr.kval = "";
g++;
}
i = 1;
while (i < 5) {
_root["Life" + i].gotoAndStop(1);
if (i >= lives) {
_root["Life" + i]._visible = false;
}
i++;
}
m = "#############################............##............##.####.#####.##.#####.####.##O####.#####.##.#####.####O##.####.#####.##.#####.####.##..........................##.####.##.########.##.####.##.####.##.########.##.####.##......##....##....##......#######.##### ## #####.############.##### ## #####.############.## ##.############.## ######## ##.############.## # # # ## ##.######L . # # # ## . R######.## ### #### ##.############.## ######## ##.############.## ##.############.## ######## ##.############.## ######## ##.#######............##............##.####.#####.##.#####.####.##.####.#####.##.#####.####.##O..##....... .......##..O####.##.##.########.##.##.######.##.##.########.##.##.####......##....##....##......##.##########.##.##########.##.##########.##.##########.##..........................#############################";
i = -1;
while (i < 29) {
Maze.attachMovie("Empty", i, i + 1);
i++;
}
pos = 0;
j = 0;
while (j < 31) {
i = 0;
while (i < 28) {
Maze[i][j] = m.charAt(pos++);
pill = false;
if (Maze[i][j] == ".") {
pill = true;
Maze[i].attachMovie("Pill", "P" + j, pos);
}
if (Maze[i][j] == "O") {
pill = true;
Maze[i].attachMovie("Power", "P" + j, pos);
}
if (pill) {
with (Maze[i]["P" + j]) {
_x = OFFX + (12 * i);
_y = OFFY + (12 * j);
}
}
i++;
}
j++;
}
Instance of Symbol 101 MovieClip [Empty] "Maze" in Frame 6
onClipEvent (keyDown) {
with (_root) {
if (Key.getCode() == 38) {
nextPacDir = 0;
} else if (Key.getCode() == 39) {
nextPacDir = 1;
} else if (Key.getCode() == 40) {
nextPacDir = 2;
} else if (Key.getCode() == 37) {
nextPacDir = 3;
} else if (playing && ((Key.getCode() == 80) || (Key.getCode() == 112))) {
if (Ready._visible) {
Ready._visible = false;
Ready.gotoAndStop(1);
if (notMute) {
startBGSnd();
}
if (!stopped) {
Pacman.play();
}
play();
} else {
stop();
Ready.gotoAndStop("Paused");
Ready._visible = true;
stopAllSounds();
Pacman.stop();
}
} else if (playing && (((Key.getCode() == 81) || (Key.getCode() == 113)) || (Key.getCode() == 27))) {
quitting = true;
stop();
Ready.gotoAndStop("Quit");
Ready._visible = true;
stopAllSounds();
Pacman.stop();
} else if (quitting && ((Key.getCode() == 78) || (Key.getCode() == 110))) {
quitting = false;
Ready._visible = false;
Ready.gotoAndStop(1);
if (notMute) {
startBGSnd();
}
if (!stopped) {
Pacman.play();
}
play();
} else if (quitting && ((Key.getCode() == 89) || (Key.getCode() == 121))) {
quit = true;
play();
} else if ((playing && (!Ready._visible)) && ((Key.getCode() == 77) || (Key.getCode() == 109))) {
notMute = !notMute;
if (notMute) {
startBGSnd();
} else {
stopAllSounds();
}
} else if ((Key.getCode() == 76) || (Key.getCode() == 108)) {
toggleHighQuality();
}
}
}
Frame 7
stop();
stopAllSounds();
playing = false;
stopped = true;
Fruit.gotoAndStop(1);
if (newLev) {
newLev = false;
bgNum = 1;
pillEat = 0;
level++;
if (ghPause > 4) {
ghPause = ghPause - 4;
}
if (ghBVal > 2) {
ghBVal = ghBVal - 10;
}
if (fruitNum < 14) {
fruitNum++;
FrLev.gotoAndStop(fruitNum);
}
initVars();
if (!newGame) {
g = 1;
while (g < 5) {
Ghost[g]._visible = false;
g++;
}
Pacman._visible = false;
BGSnd.gotoAndPlay("NewLev");
}
}
if (newLife) {
newLife = false;
Ready._visible = true;
lives--;
if (lives == 0) {
Pacman._visible = false;
Ready.gotoAndStop("GameOver");
} else {
eval ("Life" + lives)._visible = false;
initVars();
BGSnd.gotoAndPlay("NewLife");
}
}
if (newGame) {
BGSnd.gotoAndPlay("NewGame");
}
Frame 8
ang = Math.abs(pacDir - nextPacDir) / 2;
if (ang == 1) {
pacDir = nextPacDir;
} else if (pacPos == 0) {
tempDir = pacDir;
pacDir = nextPacDir;
}
setPacMove(pacDir);
if (pacPos == 0) {
P = Maze[pacX]["P" + pacY];
if (P._visible) {
pacStep = 4;
pacPosMax = 2;
if (notMute) {
tellTarget (Snd) {
if (ChSnd) {
gotoAndPlay ("Chomp1");
} else {
gotoAndPlay ("Chomp2");
}
ChSnd = !ChSnd;
};
}
P._visible = false;
pillEat++;
if (notMute) {
if (pillEat == 180) {
BGSnd.Back1.stop();
bgNum = 2;
BGSnd.Back2.start(0, 1000);
} else if (pillEat == 230) {
BGSnd.Back2.stop();
bgNum = 3;
BGSnd.Back3.start(0, 1000);
}
}
if (pillEat == 244) {
newLev = true;
gotoAndStop (7);
}
score = score + 10;
if (Maze[pacX][pacY] == "O") {
score = score + 40;
if (notMute) {
BGSnd["Back" + bgNum].stop();
BGSnd.BlueGh.start(0, 100);
}
ghBlue = ghBval;
ghKill = 100;
g = 1;
while (g < 5) {
tellTarget (Ghost[g]) {
if (Shape._visible) {
c.setRGB(13311);
gotoAndStop (2);
ghFast = false;
e = new Color(PPEyes);
e.setRGB(16777215);
}
};
g++;
}
}
} else if ((++pauseCount) % 2) {
pacStep = 4;
pacPosMax = 2;
} else {
pacStep = 6;
pacPosMax = 1;
}
if (Maze[pacX + 1][pacY] == "L") {
pacX = 28;
nextX = 27;
Pacman._x = OFFX + 336;
} else if (Maze[pacX - 1][pacY] == "R") {
pacX = -1;
nextX = 0;
Pacman._x = OFFX - 12;
}
if ((Maze[nextX][nextY] == "#") && (ang != 1)) {
pacDir = tempDir;
setPacMove(pacDir);
}
}
if (!((pacPos == 0) && (Maze[nextX][nextY] == "#"))) {
with (Pacman) {
if (nextX < pacX) {
_x = _x - pacStep;
pacPos--;
} else if (pacX < nextX) {
_x = _x + pacStep;
pacPos++;
} else if (nextY < pacY) {
_y = _y - pacStep;
pacPos--;
} else if (pacY < nextY) {
_y = _y + pacStep;
pacPos++;
}
}
if ((pacPos < 0) || (pacPosMax < pacPos)) {
if (pacPosMax < pacPos) {
pacPos = 0;
} else if (pacPos < 0) {
pacPos = pacPosMax;
}
pacX = nextX;
pacY = nextY;
}
if (stopped) {
stopped = false;
Pacman.play();
}
} else if (!stopped) {
stopped = true;
Pacman.gotoAndStop(1);
}
tellTarget ("Fruit") {
if (_currentframe == 1) {
if (!random(600)) {
gotoAndStop(_root.fruitNum);
}
} else if (fCount) {
if (hitTest(_root.Pacman.Hit)) {
gotoAndStop ("Show");
} else {
fCount--;
}
} else {
gotoAndStop (1);
}
};
if (ghBlue) {
ghBlue--;
}
unBlue = false;
g = 1;
while (g < 5) {
with (Ghost[g]) {
if (ghBlue && (_currentframe == 2)) {
if (((((ghBlue == 50) || (ghBlue == 40)) || (ghBlue == 30)) || (ghBlue == 20)) || (ghBlue == 10)) {
c.setRGB(16777215);
e.setRGB(16711680);
} else if (((((ghBlue == 45) || (ghBlue == 35)) || (ghBlue == 25)) || (ghBlue == 15)) || (ghBlue == 5)) {
c.setRGB(13311);
e.setRGB(16777215);
} else if (ghBlue == 1) {
gotoAndStop(1);
c.setRGB(cOrig);
ghFast = true;
}
}
gTest = false;
if (ghPos == 0) {
if ((Maze[ghX + 1][ghY] == "L") && (ghDir == 3)) {
ghX = 29;
ghNX = 28;
_x = OFFX + 348;
} else if ((Maze[ghX - 1][ghY] == "R") && (ghDir == 1)) {
ghX = -2;
ghNX = -1;
_x = OFFX - 24;
} else if ((ghX > 0) && (ghX < 27)) {
i = 0;
while (i < 4) {
ghMove[i] = 1;
i++;
}
oppDir = ((ghDir < 2) ? (ghDir + 2) : (ghDir - 2));
ghMove[oppDir] = 0;
if (Maze[ghX][ghY - 1] == "#") {
ghMove[0] = 0;
}
if (Maze[ghX + 1][ghY] == "#") {
ghMove[1] = 0;
}
if (Maze[ghX][ghY + 1] == "#") {
ghMove[2] = 0;
}
if (Maze[ghX - 1][ghY] == "#") {
ghMove[3] = 0;
}
pos = 0;
i = 0;
while (i < 4) {
ghChoice[i] = -1;
if (ghMove[i]) {
ghChoice[pos++] = i;
}
i++;
}
bestXDir = -1;
bestYDir = -1;
if (Shape._visible && (_currentframe == 1)) {
testX = pacX;
testY = pacY;
} else {
testX = 13;
testY = 11;
}
if (testX < ghX) {
bestXDir = 3;
} else if (ghX < testX) {
bestXDir = 1;
}
if (testY < ghY) {
bestYDir = 0;
} else if (ghY < testY) {
bestYDir = 2;
}
best = 0;
i = 0;
while (i < pos) {
if ((ghChoice[i] == bestXDir) || (ghChoice[i] == bestYDir)) {
ghBest[best++] = ghChoice[i];
}
i++;
}
if ((best == 0) || (Shape._visible && (!random(3)))) {
ghDir = ghChoice[random(pos)];
} else {
ghDir = ghBest[random(best)];
}
if (ghFast) {
ghStep = 4;
ghPosMax = 2;
} else {
ghStep = 2;
ghPosMax = 5;
}
gNum++;
if (ghX == 13) {
if ((ghY > 11) && (ghY < 15)) {
if (Shape._visible) {
gTest = true;
ghDir = 0;
if (gNum < 4) {
_y = _y - 2;
}
} else if (ghY == 13) {
unBlue = true;
numEyes--;
Shape._visible = true;
Shape.Hit._visible = true;
}
} else if (ghY == 11) {
if ((gNum == 1) && (g == 1)) {
_x = _x - 2;
}
if (gNum == 4) {
ghPos = 2;
if (ghFast) {
_x = _x + 2;
} else {
_x = _x - 2;
}
}
if (!Shape._visible) {
gTest = true;
ghDir = 2;
}
}
}
if ((ghY > 11) && (ghY < 15)) {
if ((ghX == 11) && (gNum == (ghPause + 2))) {
gTest = true;
ghDir = 1;
gNum = -1;
}
if ((ghX == 15) && (gNum == ((2 * ghPause) + 2))) {
gTest = true;
ghDir = 3;
gNum = -1;
}
}
}
}
setGhMove(ghDir, g);
if ((!((ghPos == 0) && (Maze[ghNX][ghNY] == "#"))) || (gTest)) {
if (ghNX < ghX) {
_x = _x - ghStep;
ghPos--;
} else if (ghX < ghNX) {
_x = _x + ghStep;
ghPos++;
} else if (ghNY < ghY) {
_y = _y - ghStep;
ghPos--;
} else if (ghY < ghNY) {
_y = _y + ghStep;
ghPos++;
}
Eyes.gotoAndStop(ghDir + 1);
if ((ghPos < 0) || (ghPosMax < ghPos)) {
if (ghPosMax < ghPos) {
ghPos = 0;
} else if (ghPos < 0) {
ghPos = ghPosMax;
}
ghX = ghNX;
ghY = ghNY;
}
}
if ((Shape.Hit._visible && (Pacman.Hit.hitTest(Shape.Hit))) && (!newLev)) {
if (_currentframe == 1) {
_root.stop();
playing = false;
Pacman.gotoAndPlay("Die");
} else {
BGSnd.BlueGh.stop();
ghKill = ghKill * 2;
score = score + ghKill;
ghFast = true;
if (ghPosMax < ghPos) {
ghPos = 0;
} else if (ghPos < 0) {
ghPos = ghPosMax;
}
if (notMute) {
Snd.gotoAndPlay("EatGhost");
}
gotoAndStop(1);
numEyes++;
Shape._visible = false;
Shape.Hit._visible = false;
c.setRGB(cOrig);
with (Ghost["K" + g]) {
_x = Ghost[g]._x;
_y = Ghost[g]._y;
Scr.kval = ghKill;
play();
}
}
}
}
g++;
}
if (ghBlue && (notMute)) {
with (BGSnd) {
if (ghBlue == 1) {
BlueGh.stop();
EyesGh.stop();
eval ("Back" + bgNum).start(0, 1000);
} else if (unBlue && (!numEyes)) {
EyesGh.stop();
BlueGh.start(0, 100);
}
}
}
if (lastScore != score) {
s = Math.floor(score / 10000);
sTest = (s + 1) / 2;
if (((lives < 5) && (sTest == int(sTest))) && (Math.floor(lastScore / 10000) < s)) {
eval ("Life" + lives)._visible = true;
lives++;
if (notMute) {
BGSnd.ExLife.start(0, 6);
}
}
}
lastScore = score;
if (!playing) {
stop();
}
if (quit) {
gotoAndStop (4);
}
Frame 9
gotoAndPlay (8);
Frame 10
_root.lastscore = _root.score;
Symbol 18 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 21 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(background_mc, "background");
Symbol 24 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(background_mc, "backgroundDisabled");
Symbol 26 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(background_mc, "backgroundDisabled");
Symbol 29 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(disabled_mc, "foregroundDisabled");
Symbol 32 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(dot_mc, "radioDot");
Symbol 33 MovieClip [frb_states] Frame 1
stop();
Symbol 33 MovieClip [frb_states] Frame 2
stop();
Symbol 33 MovieClip [frb_states] Frame 3
stop();
Symbol 33 MovieClip [frb_states] Frame 4
stop();
Symbol 33 MovieClip [frb_states] Frame 5
stop();
Symbol 37 MovieClip [FBoundingBoxSymbol] Frame 1
var component = _parent;
component.registerSkinElement(boundingBox, "background");
stop();
Symbol 37 MovieClip [FBoundingBoxSymbol] Frame 2
component.registerSkinElement(boundingBox2, "backgroundDisabled");
stop();
Symbol 40 MovieClip [FRadioButtonSymbol] Frame 1
#initclip 5
function FRadioButtonClass() {
this.init();
}
function FRadioButtonGroupClass() {
this.radioInstances = new Array();
}
FRadioButtonClass.prototype = new FUIComponentClass();
FRadioButtonGroupClass.prototype = new FUIComponentClass();
Object.registerClass("FRadioButtonSymbol", FRadioButtonClass);
FRadioButtonClass.prototype.init = function () {
if (this.initialState == undefined) {
this.selected = false;
} else {
this.selected = this.initialState;
}
super.setSize(this._width, this._height);
this.boundingBox_mc.unloadMovie();
this.attachMovie("frb_hitArea", "frb_hitArea_mc", 1);
this.attachMovie("frb_states", "frb_states_mc", 2);
this.attachMovie("FLabelSymbol", "fLabel_mc", 3);
super.init();
this.setSize(this.width, this.height);
this.setChangeHandler(this.changeHandler);
if (this.label != undefined) {
this.setLabel(this.label);
}
if (this.initialState == undefined) {
this.setValue(false);
} else {
this.setValue(this.initialState);
}
this.setData(this.data);
this.addToRadioGroup();
if ((this._parent[this.groupName].getValue() == undefined) || (this._parent[this.groupName].getValue() == "")) {
this._parent[this.groupName].radioInstances[0].tabEnabled = true;
}
if (Accessibility.isActive()) {
this.ROLE_SYSTEM_RADIOBUTTON = 45;
this.STATE_SYSTEM_SELECTED = 16;
this.EVENT_OBJECT_STATECHANGE = 32778;
this.EVENT_OBJECT_NAMECHANGE = 32780;
this._accImpl.master = this;
this._accImpl.stub = false;
this._accImpl.get_accRole = this.get_accRole;
this._accImpl.get_accName = this.get_accName;
this._accImpl.get_accState = this.get_accState;
this._accImpl.get_accDefaultAction = this.get_accDefaultAction;
this._accImpl.accDoDefaultAction = this.accDoDefaultAction;
}
};
FRadioButtonClass.prototype.setHitArea = function (w, h) {
var hit = this.frb_hitArea_mc;
this.hitArea = hit;
hit._width = w;
hit._visible = false;
if (arguments.length > 1) {
hit._height = h;
}
};
FRadioButtonClass.prototype.txtFormat = function (pos) {
var txtS = this.textStyle;
var sTbl = this.styleTable;
txtS.align = ((sTbl.textAlign.value == undefined) ? ((txtS.align = pos)) : undefined);
txtS.leftMargin = ((sTbl.textLeftMargin.value == undefined) ? ((txtS.leftMargin = 0)) : undefined);
txtS.rightMargin = ((sTbl.textRightMargin.value == undefined) ? ((txtS.rightMargin = 0)) : undefined);
if (this.flabel_mc._height > this.height) {
super.setSize(this.width, this.flabel_mc._height);
} else {
super.setSize(this.width, this.height);
}
this.setEnabled(this.enable);
};
FRadioButtonClass.prototype.setSize = function (w, h) {
this._xscale = 100;
this._yscale = 100;
this.setLabel(this.getLabel());
this.setLabelPlacement(this.labelPlacement);
if (this.frb_states_mc._height < this.flabel_mc.labelField._height) {
super.setSize(w, this.flabel_mc.labelField._height);
}
this.setHitArea(this.width, this.height);
this.setLabelPlacement(this.labelPlacement);
};
FRadioButtonClass.prototype.setLabelPlacement = function (pos) {
this.setLabel(this.getLabel());
this.txtFormat(pos);
var halfLabelH = (this.fLabel_mc._height / 2);
var halfFrameH = (this.frb_states_mc._height / 2);
var vertCenter = (halfFrameH - halfLabelH);
var radioWidth = this.frb_states_mc._width;
var frame = this.frb_states_mc;
var label = this.fLabel_mc;
var w = (this.width - frame._width);
this.fLabel_mc.setSize(w);
if ((pos == "right") || (pos == undefined)) {
this.labelPlacement = "right";
this.frb_states_mc._x = 0;
this.fLabel_mc._x = radioWidth;
this.txtFormat("left");
} else if (pos == "left") {
this.labelPlacement = "left";
this.fLabel_mc._x = 0;
this.frb_states_mc._x = this.width - radioWidth;
this.txtFormat("right");
}
this.fLabel_mc._y = vertCenter;
this.frb_hitArea_mc._y = vertCenter;
this.setLabel(this.getLabel());
};
FRadioButtonClass.prototype.setData = function (dataValue) {
this.data = dataValue;
};
FRadioButtonClass.prototype.getData = function () {
return(this.data);
};
FRadioButtonClass.prototype.getState = function () {
return(this.selected);
};
FRadioButtonClass.prototype.getSize = function () {
return(this.width);
};
FRadioButtonClass.prototype.getGroupName = function () {
return(this.groupName);
};
FRadioButtonClass.prototype.setGroupName = function (groupName) {
var i = 0;
while (i < this._parent[this.groupName].radioInstances.length) {
if (this._parent[this.groupName].radioInstances[i] == this) {
delete this._parent[this.groupName].radioInstances[i];
}
i++;
}
this.groupName = groupName;
this.addToRadioGroup();
};
FRadioButtonClass.prototype.addToRadioGroup = function () {
if (this._parent[this.groupName] == undefined) {
this._parent[this.groupName] = new FRadioButtonGroupClass();
}
this._parent[this.groupName].addRadioInstance(this);
};
FRadioButtonClass.prototype.setValue = function (selected) {
if (selected || (selected == undefined)) {
this.setState(true);
this.focusRect.removeMovieClip();
this.executeCallBack();
} else if (selected == false) {
this.setState(false);
}
};
FRadioButtonClass.prototype.setTabState = function (selected) {
Selection.setFocus(this);
this.setState(selected);
this.executeCallBack();
};
FRadioButtonClass.prototype.setState = function (selected) {
if (selected || (selected == undefined)) {
this.tabEnabled = true;
for (i in this._parent) {
if ((this != this._parent[i]) && (this._parent[i].groupName == this.groupName)) {
this._parent[i].setState(false);
}
}
}
if (this.enable) {
if (Accessibility.isActive()) {
Accessibility.sendEvent(this, 0, this.EVENT_OBJECT_STATECHANGE);
}
this.flabel_mc.setEnabled(true);
if (selected || (selected == undefined)) {
this.frb_states_mc.gotoAndStop("selectedEnabled");
this.enabled = false;
this.selected = true;
this.tabEnabled = true;
} else {
this.frb_states_mc.gotoAndStop("unselectedEnabled");
this.enabled = true;
this.selected = false;
this.tabEnabled = false;
}
} else {
this.flabel_mc.setEnabled(false);
if (selected || (selected == undefined)) {
this.frb_states_mc.gotoAndStop("selectedDisabled");
this.enabled = false;
this.selected = true;
this.tabEnabled = false;
this._parent[this.groupName].radioInstances[0].tabEnabled = true;
} else {
this.frb_states_mc.gotoAndStop("unselectedDisabled");
this.enabled = false;
this.selected = false;
this.tabEnabled = false;
}
}
};
FRadioButtonClass.prototype.getValue = function () {
if (this.selected) {
if ((this.data == "") || (this.data == undefined)) {
return(this.getLabel());
}
return(this.data);
}
};
FRadioButtonClass.prototype.setEnabled = function (enable) {
if ((enable == true) || (enable == undefined)) {
this.enable = true;
super.setEnabled(true);
} else {
this.enable = false;
super.setEnabled(false);
}
this.setState(this.selected);
};
FRadioButtonClass.prototype.getEnabled = function () {
return(this.enable);
};
FRadioButtonClass.prototype.setLabel = function (label) {
this.fLabel_mc.setLabel(label);
this.txtFormat();
if (Accessibility.isActive()) {
Accessibility.sendEvent(this, 0, this.EVENT_OBJECT_NAMECHANGE);
}
};
FRadioButtonClass.prototype.getLabel = function () {
return(this.fLabel_mc.getLabel());
};
FRadioButtonClass.prototype.onPress = function () {
this.pressFocus();
this.frb_states_mc.gotoAndStop("press");
this.pressFocus();
_root.focusRect.removeMovieClip();
};
FRadioButtonClass.prototype.onRelease = function () {
this.frb_states_mc.gotoAndStop("unselectedDisabled");
this.setValue(!this.selected);
};
FRadioButtonClass.prototype.onReleaseOutside = function () {
this.frb_states_mc.gotoAndStop("unselectedEnabled");
};
FRadioButtonClass.prototype.onDragOut = function () {
this.frb_states_mc.gotoAndStop("unselectedEnabled");
};
FRadioButtonClass.prototype.onDragOver = function () {
this.frb_states_mc.gotoAndStop("press");
};
FRadioButtonClass.prototype.executeCallBack = function () {
this.handlerObj[this.changeHandler](this._parent[this.groupName]);
};
FRadioButtonGroupClass.prototype.addRadioInstance = function (instance) {
this.radioInstances.push(instance);
this.radioInstances[0].tabEnabled = true;
};
FRadioButtonGroupClass.prototype.setEnabled = function (enableFlag) {
var i = 0;
while (i < this.radioInstances.length) {
this.radioInstances[i].setEnabled(enableFlag);
i++;
}
};
FRadioButtonGroupClass.prototype.getEnabled = function () {
var i = 0;
while (i < this.radioInstances.length) {
if (this.radioInstances[i].getEnabled() != this.radioInstances[0].getEnabled()) {
return(undefined);
}
i++;
}
return(this.radioInstances[0].getEnabled());
};
FRadioButtonGroupClass.prototype.setChangeHandler = function (changeHandler) {
var i = 0;
while (i < this.radioInstances.length) {
this.radioInstances[i].setChangeHandler(changeHandler);
i++;
}
};
FRadioButtonGroupClass.prototype.getValue = function () {
var i = 0;
while (i < this.radioInstances.length) {
if (this.radioInstances[i].selected == true) {
if ((this.radioInstances[i].data == "") || (this.radioInstances[i].data == undefined)) {
return(this.radioInstances[i].getLabel());
}
return(this.radioInstances[i].data);
}
i++;
}
};
FRadioButtonGroupClass.prototype.getData = function () {
var i = 0;
if (i < this.radioInstances.length) {
if (this.radioInstances[i].selected == true) {
return(this.radioInstances[i].data);
}
return(undefined);
}
};
FRadioButtonGroupClass.prototype.getInstance = function () {
var i = 0;
while (i < this.radioInstances.length) {
if (this.radioInstances[i].selected == true) {
return(i);
}
i++;
}
};
FRadioButtonGroupClass.prototype.setValue = function (dataValue) {
var i = 0;
while (i < this.radioInstances.length) {
if (this.radioInstances[i].data == dataValue) {
this.radioInstances[i].setValue(true);
return(undefined);
}
i++;
}
var i = 0;
while (i < this.radioInstances.length) {
if (this.radioInstances[i].getLabel() == dataValue) {
this.radioInstances[i].setValue(true);
}
i++;
}
};
FRadioButtonGroupClass.prototype.setSize = function (w) {
var i = 0;
while (i < this.radioInstances.length) {
this.radioInstances[i].setSize(w);
i++;
}
};
FRadioButtonGroupClass.prototype.getSize = function () {
var widestRadio = 0;
var i = 0;
while (i < this.radioInstances.length) {
if (this.radioInstances[i].width >= widestRadio) {
widestRadio = this.radioInstances[i].width;
}
i++;
}
return(widestRadio);
};
FRadioButtonGroupClass.prototype.setGroupName = function (groupName) {
this.oldGroupName = this.radioInstances[0].groupName;
var i = 0;
while (i < this.radioInstances.length) {
this.radioInstances[i].groupName = groupName;
this.radioInstances[i].addToRadioGroup();
i++;
}
delete this._parent[this.oldGroupName];
};
FRadioButtonGroupClass.prototype.setLabelPlacement = function (pos) {
var i = 0;
while (i < this.radioInstances.length) {
this.radioInstances[i].setLabelPlacement(pos);
i++;
}
};
FRadioButtonGroupClass.prototype.setStyleProperty = function (propName, value, isGlobal) {
var i = 0;
while (i < this.radioInstances.length) {
this.radioInstances[i].setStyleProperty(propName, value, isGlobal);
i++;
}
};
FRadioButtonGroupClass.prototype.addListener = function () {
var i = 0;
while (i < this.radioInstances.length) {
this.radioInstances[i].addListener();
i++;
}
};
FRadioButtonGroupClass.prototype.applyChanges = function () {
var i = 0;
while (i < this.radioInstances.length) {
this.radioInstances[i].applyChanges();
i++;
}
};
FRadioButtonGroupClass.prototype.removeListener = function (component) {
var i = 0;
while (i < this.radioInstances.length) {
this.radioInstances[i].removeListener(component);
i++;
}
};
FRadioButtonClass.prototype.drawFocusRect = function () {
this.drawRect(-2, -2, this._width + 6, this._height - 3);
};
FRadioButtonClass.prototype.myOnKillFocus = function () {
Key.removeListener(this.keyListener);
this.focused = false;
this.focusRect.removeMovieClip();
this._parent[this.groupName].foobar = 0;
};
FRadioButtonClass.prototype.myOnKeyDown = function () {
if ((Key.getCode() == 32) && (this._parent[this.groupName].getValue() == undefined)) {
if (this._parent[this.groupName].radioInstances[0] == this) {
this.setTabState(true);
}
}
if ((Key.getCode() == 40) && (this.pressOnce == undefined)) {
this.foobar = this._parent[this.groupName].getInstance();
i = this.foobar;
while (i < this._parent[this.groupName].radioInstances.length) {
var inc = (i + 1);
if (this._parent[this.groupName].radioInstances[inc].getEnabled()) {
this._parent[this.groupName].radioInstances[inc].setTabState(true);
return(undefined);
}
i++;
}
}
if ((Key.getCode() == 38) && (this.pressOnce == undefined)) {
this.foobar = this._parent[this.groupName].getInstance();
i = this.foobar;
while (i >= 0) {
var inc = (i - 1);
if (this._parent[this.groupName].radioInstances[inc].getEnabled()) {
this._parent[this.groupName].radioInstances[inc].setTabState(true);
return(undefined);
}
i--;
}
}
};
FRadioButtonClass.prototype.get_accRole = function (childId) {
return(this.master.ROLE_SYSTEM_RADIOBUTTON);
};
FRadioButtonClass.prototype.get_accName = function (childId) {
return(this.master.getLabel());
};
FRadioButtonClass.prototype.get_accState = function (childId) {
if (this.master.getState()) {
return(this.master.STATE_SYSTEM_SELECTED);
}
return(0);
};
FRadioButtonClass.prototype.get_accDefaultAction = function (childId) {
if (this.master.getState()) {
return("UnCheck");
}
return("Check");
};
FRadioButtonClass.prototype.accDoDefaultAction = function (childId) {
this.master.setValue(!this.master.getValue());
};
#endinitclip
Symbol 41 MovieClip [LSuperClass] Frame 1
#initclip 1
_global.LToolBox = function () {
this.interaction_id = undefined;
this.interaction_type = undefined;
this.correct_response = undefined;
this.student_response = undefined;
this.result = undefined;
this.feedback = undefined;
this.numOfTries = 1;
this.feedback_list = undefined;
this.tracking = undefined;
this.weighting = undefined;
this.objective_id = undefined;
this.latency = undefined;
this.navigation = undefined;
};
_global.LToolBox.prototype = new Object();
LToolBox.prototype.setTextField = function (fieldName, val) {
eval (fieldName).text = val;
};
LToolBox.prototype.setCompLabel = function (UIComponent, val) {
eval (UIComponent).setLabel(val);
};
LToolBox.prototype.setCompCallBack = function (UIComponent, val) {
if (eval (UIComponent).setClickHandler) {
eval (UIComponent).setClickHandler(val);
} else if (eval (UIComponent).setChangeHandler) {
eval (UIComponent).setChangeHandler(val);
}
};
LToolBox.prototype.setCompState = function (UIComponent, val) {
eval (UIComponent).setEnabled(val);
};
LToolBox.prototype.getCompLabel = function (UIComponent) {
return(eval (UIComponent).getLabel());
};
LToolBox.prototype.initControlButton = function (callBack) {
var initial_state;
if (this.feedback == true) {
initial_state = "Check Answer";
if (this.navigation == "Auto GoTo Next Frame") {
trace("WARNING: Feedback must be false and Tracking turned true \rto use Auto GoTo Next Frame. Navigation reset to Next Button.");
this.navigation = "Next Button";
}
} else if (this.tracking == true) {
initial_state = "Submit";
} else if (this.navigation != "Off") {
initial_state = "Next Question";
if (this.navigation == "Auto GoTo Next Frame") {
trace("WARNING: Feedback must be false and Tracking turned true \rto use Auto GoTo Next Frame. Navigation reset to Next Button.");
this.navigation = "Next Button";
}
} else {
initial_state = "";
}
this.label_state = initial_state;
this.setCompLabel(this.Assets.ControlButton, initial_state);
this.setCompState(this.Assets.ControlButton, false);
this.setCompCallBack(this.Assets.ControlButton, callBack);
};
LToolBox.prototype.setFeedback = function (val) {
if (this.feedback == true) {
if (val.toLowerCase() == "init") {
this.setTextField(this.Assets.FeedbackField, this.feedback_list[0]);
} else if (val.toLowerCase() == "button") {
var buttonState = this.getCompLabel(this.Assets.ControlButton);
this.setTextField(this.Assets.FeedbackField, ("Click the " + buttonState) + " button.");
} else if (val.toLowerCase() == "c") {
this.setTextField(this.Assets.FeedbackField, this.feedback_list[1]);
} else if (val.toLowerCase() == "w") {
if (this.numOfTries > 1) {
this.setTextField(this.Assets.FeedbackField, this.feedback_list[3]);
} else {
this.setTextField(this.Assets.FeedbackField, this.feedback_list[2]);
}
}
} else {
this.setTextField(this.Assets.FeedbackField, "");
}
};
LToolBox.prototype.setNavigation = function () {
if (this.navigation == "Off") {
this.setCompState(this.Assets.ControlButton, false);
} else if (this.navigation == "Next Button") {
if ((!this.buttonFlag) || (this.buttonFlag == false)) {
this.setCompLabel(this.Assets.ControlButton, "Next Question");
this.buttonFlag = true;
} else if (this.navAction == "Stop") {
if (this.navLabel == "") {
eval (this.assets_path.nextFrame());
} else {
eval (this.assets_path.gotoAndStop(this.navLabel));
}
} else if (this.navAction == "Play") {
if (this.navLabel == "") {
eval (this.assets_path.gotoAndPlay(this._currentframe + 1));
} else {
eval (this.assets_path.gotoAndPlay(this.navLabel));
}
}
} else if (this.navigation == "Auto GoTo Next Frame") {
eval (this.assets_path.nextFrame());
}
};
LToolBox.prototype.sessionStart = function () {
this.dateStamp = this.getDateStamp();
this.timeStamp = this.getTimeStamp();
this.sessionTimer("start");
};
LToolBox.prototype.sessionStop = function () {
this.latency = this.getLatency(this.sessionTimer("stop"));
};
LToolBox.prototype.submitScore = function () {
if ((this.weighting <= 0) || (this.weighting == undefined)) {
this.weighting = 1;
}
var weight;
if (this.result == "C") {
weight = this.weighting;
} else if (this.result == "W") {
weight = -1 * this.weighting;
}
if (this.tracking == true) {
var intData = ((((((((((((((((((this.dateStamp + ";") + this.timeStamp) + ";") + this.interaction_ID) + ";") + this.objective_ID) + ";") + this.interaction_type) + ";") + this.correct_response) + ";") + this.student_response) + ";") + this.result) + ";") + this.weighting) + ";") + this.latency);
fscommand ("MM_cmiSendInteractionInfo", intData);
}
_root.QuizTrack.countScore(weight);
};
LToolBox.prototype.getDateStamp = function () {
var dateObj = new Date();
var year = dateObj.getFullYear();
var month = this.formatNum(dateObj.getMonth() + 1);
var day = this.formatNum(dateObj.getDate());
var dateString = ((((year + "/") + month) + "/") + day);
return(dateString);
};
LToolBox.prototype.getTimeStamp = function () {
var timeObj = new Date();
var hours = this.formatNum(timeObj.getHours());
var minutes = this.formatNum(timeObj.getMinutes());
var seconds = this.formatNum(timeObj.getSeconds());
var timeString = ((((hours + ":") + minutes) + ":") + seconds);
return(timeString);
};
LToolBox.prototype.sessionTimer = function (action) {
if (action.toLowerCase() == "start") {
this.startTime = int(getTimer() / 1000);
} else if (action.toLowerCase() == "stop") {
this.stopTime = int(getTimer() / 1000);
var elapsedSec = (this.stopTime - this.startTime);
return(elapsedSec);
}
};
LToolBox.prototype.getLatency = function (timeInSec) {
var l_seconds;
var l_minutes;
var l_hours;
var timeInHours;
if (timeInSec <= 9) {
l_seconds = "0" + timeInSec;
l_minutes = "00";
l_hours = "00";
} else {
l_seconds = timeInSec;
l_minutes = "00";
l_hours = "00";
}
if (l_seconds > 59) {
l_minutes = int(l_seconds / 60);
l_minutes = this.formatNum(l_minutes);
l_seconds = l_seconds - (l_minutes * 60);
l_seconds = this.formatNum(l_seconds);
l_hours = "00";
}
if (l_minutes > 59) {
l_hours = int(l_minutes / 60);
l_hours = this.formatNum(l_hours);
l_minutes = l_minutes - (l_hours * 60);
l_minutes = this.formatNum(l_minutes);
}
timeInHours = (((l_hours + ":") + l_minutes) + ":") + l_seconds;
return(timeInHours);
};
LToolBox.prototype.formatNum = function (num) {
if (num <= 9) {
num = "0" + num;
}
return(num);
};
LToolBox.prototype.getObjProp = function (objName, Trace) {
var objNameArray = new Array();
var i = 0;
for (x in objName) {
objNameArray[i] = objName[x];
if (arguments[1] == true) {
trace((x + " : ") + objName[x]);
}
i++;
}
return(objNameArray.reverse());
};
LToolBox.prototype.reportToOutput = function (defined) {
var x;
var y;
for (prop in this) {
x = this[prop];
y = typeof(this[prop]);
if (defined == true) {
if (((x != undefined) && (y != "function")) && (y != "object")) {
trace((("this." + prop) + " : ") + this[prop]);
}
} else if ((defined == false) || (eval (defined) == undefined)) {
trace((("this." + prop) + " : ") + this[prop]);
} else if (defined.toLowerCase() == "object") {
if (y == "object") {
trace("this." + prop);
}
} else if (defined.toLowerCase() == "function") {
if (y == "function") {
trace("this." + prop);
}
}
}
trace("-------------------");
trace("");
};
#endinitclip
Symbol 44 MovieClip [FLabelSymbol] Frame 1
#initclip 2
_global.FLabelClass = function () {
if (this.hostComponent == undefined) {
this.hostComponent = ((this._parent.controller == undefined) ? (this._parent) : (this._parent.controller));
}
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) {
this.labelField.embedFonts = this.hostComponent.styleTable.embedFonts.value;
this.labelField.setNewTextFormat(this.hostComponent.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 53 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame3, "shadow");
component.registerSkinElement(frame1, "darkshadow");
component.registerSkinElement(frame4, "highlight");
component.registerSkinElement(frame2, "highlight3D");
Symbol 59 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame3, "shadow");
component.registerSkinElement(frame1, "darkshadow");
component.registerSkinElement(frame4, "highlight");
component.registerSkinElement(frame2, "highlight3D");
Symbol 65 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame4, "shadow");
component.registerSkinElement(frame2, "darkshadow");
component.registerSkinElement(frame3, "highlight");
component.registerSkinElement(frame1, "highlight3D");
Symbol 71 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame3, "shadow");
component.registerSkinElement(frame1, "darkshadow");
component.registerSkinElement(frame4, "highlight");
component.registerSkinElement(frame2, "highlight3D");
Symbol 72 MovieClip [fpb_states] Frame 1
stop();
Symbol 72 MovieClip [fpb_states] Frame 2
stop();
Symbol 72 MovieClip [fpb_states] Frame 3
stop();
Symbol 72 MovieClip [fpb_states] Frame 4
stop();
Symbol 73 MovieClip [FUIComponentSymbol] Frame 1
#initclip 3
function FUIComponentClass() {
this.init();
}
FUIComponentClass.prototype = new MovieClip();
Object.registerClass("FUIComponentSymbol", FUIComponentClass);
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.hasOwnProperty("hostStyle")) {
globalStyleFormat.addListener(this);
} else {
this.styleTable = this.hostStyle;
}
this.deadPreview._visible = false;
this.deadPreview._width = (this.deadPreview._height = 1);
this.methodTable = new Object();
this.onUnload = function () {
if (this.focused) {
Selection.setFocus(_root);
}
};
this.keyListener = new Object();
this.keyListener.controller = this;
this.keyListener.onKeyDown = function () {
this.controller.myOnKeyDown();
};
this.keyListener.onKeyUp = function () {
this.controller.myOnKeyUp();
};
}
};
FUIComponentClass.prototype.setEnabled = function (enabledFlag) {
this.enable = ((arguments.length > 0) ? (enabledFlag) : true);
this.tabEnabled = (this.focusEnabled = enabledFlag);
};
FUIComponentClass.prototype.getEnabled = function () {
return(this.enable);
};
FUIComponentClass.prototype.setSize = function (w, h) {
this.width = w;
this.height = h;
if (this.focused) {
this.myOnSetFocus();
}
};
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 {
if (this.methodTable.initScrollBar) {
this.initScrollBar();
}
if (this.methodTable.updateControl) {
this.updateControl();
}
}
this.methodTable = new Object();
delete this.onEnterFrame;
};
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;
with (this.focusRect) {
lineStyle(1, outer);
moveTo(x, y);
lineTo(x + w, y);
lineTo(x + w, y + h);
lineTo(x, y + h);
lineTo(x, y);
lineStyle(1, inner);
moveTo(x + 1, y + 1);
lineTo((x + w) - 1, y + 1);
lineTo((x + w) - 1, (y + h) - 1);
lineTo(x + 1, (y + h) - 1);
lineTo(x + 1, y + 1);
}
};
FUIComponentClass.prototype.pressFocus = function () {
this.tabFocused = false;
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._parent.localToGlobal({x:this._x, y:this._y});
this.drawFocusRect();
}
this.tabFocused = true;
};
FUIComponentClass.prototype.myOnKillFocus = function () {
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) {
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 (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 76 MovieClip [FPushButtonSymbol] Frame 1
#initclip 4
function FPushButtonClass() {
this.init();
}
FPushButtonClass.prototype = new FUIComponentClass();
Object.registerClass("FPushButtonSymbol", FPushButtonClass);
FPushButtonClass.prototype.init = function () {
super.setSize(this._width, this._height);
this.boundingBox_mc.unloadMovie();
this.attachMovie("fpb_states", "fpbState_mc", 1);
this.attachMovie("FLabelSymbol", "fLabel_mc", 2);
this.attachMovie("fpb_hitArea", "fpb_hitArea_mc", 3);
super.init();
this.setClickHandler(this.clickHandler);
if (this.label != undefined) {
this.setLabel(this.label);
}
this.setSize(this.width, this.height);
if (Accessibility.isActive()) {
this.ROLE_SYSTEM_PUSHBUTTON = 43;
this.STATE_SYSTEM_PRESSED = 8;
this.EVENT_OBJECT_STATECHANGE = 32778;
this.EVENT_OBJECT_NAMECHANGE = 32780;
this._accImpl.master = this;
this._accImpl.stub = false;
this._accImpl.get_accRole = this.get_accRole;
this._accImpl.get_accName = this.get_accName;
this._accImpl.get_accState = this.get_accState;
this._accImpl.get_accDefaultAction = this.get_accDefaultAction;
this._accImpl.accDoDefaultAction = this.accDoDefaultAction;
}
};
FPushButtonClass.prototype.setHitArea = function (w, h) {
var hit = this.fpb_hitArea_mc;
this.hitArea = hit;
hit._visible = false;
hit._width = w;
if (arguments.length > 1) {
hit._height = h;
}
};
FPushButtonClass.prototype.setSize = function (w, h) {
this._xscale = 100;
this._yscale = 100;
this.setLabel(this.getLabel());
if (arguments.length > 1) {
if (h <= this.fLabel_mc.labelField._height) {
super.setSize(w, this.fLabel_mc.labelField._height);
} else {
super.setSize(w, h);
}
} else {
super.setSize(w, this.height);
}
this.setHitArea(w, h);
this.arrangeLabel();
this.drawFrame();
if (this.focused) {
super.myOnSetFocus();
}
};
FPushButtonClass.prototype.arrangeLabel = function () {
var label = this.fLabel_mc;
var labelField = this.fLabel_mc.labelField;
var h = this.height;
var w = (this.width - 8);
var b = 1;
this.fLabel_mc.setSize(w - (b * 4));
label._x = b * 2;
label._y = (h / 2) - (label._height / 2);
};
FPushButtonClass.prototype.txtFormat = function () {
var txtS = this.textStyle;
var sTbl = this.styleTable;
txtS.align = ((sTbl.textAlign.value == undefined) ? ((txtS.align = "center")) : undefined);
txtS.leftMargin = ((sTbl.textLeftMargin.value == undefined) ? ((txtS.leftMargin = 5)) : undefined);
txtS.rightMargin = ((sTbl.textRightMargin.value == undefined) ? ((txtS.rightMargin = 5)) : undefined);
if (this.fLabel_mc._height > this.height) {
super.setSize(this.width, this.fLabel_mc._height);
} else {
super.setSize(this.width, this.height);
}
this.fLabel_mc.labelField.setTextFormat(this.textStyle);
this.setEnabled(this.enable);
};
FPushButtonClass.prototype.drawFrame = function () {
var b = 1;
var x1 = 0;
var y1 = 0;
var x2 = this.width;
var y2 = this.height;
var mc_array = ["up_mc", "over_mc", "down_mc", "disabled_mc"];
var frame = mc_array[this.fpbState_mc._currentframe - 1];
var mc = "frame";
i = 0;
while (i < 6) {
x1 = x1 + ((i % 2) * b);
y1 = y1 + ((i % 2) * b);
x2 = x2 - (((i + 1) % 2) * b);
y2 = y2 - (((i + 1) % 2) * b);
var w = (Math.abs(x1 - x2) + (2 * b));
var h = (Math.abs(y1 - y2) + (2 * b));
this.fpbState_mc[frame][mc + i]._width = w;
this.fpbState_mc[frame][mc + i]._height = h;
this.fpbState_mc[frame][mc + i]._x = x1 - b;
this.fpbState_mc[frame][mc + i]._y = y1 - b;
i++;
}
};
FPushButtonClass.prototype.setClickHandler = function (chng, obj) {
this.handlerObj = ((arguments.length < 2) ? (this._parent) : (obj));
this.clickHandler = chng;
};
FPushButtonClass.prototype.executeCallBack = function () {
this.handlerObj[this.clickHandler](this);
};
FPushButtonClass.prototype.onPress = function () {
this.pressFocus();
this.labelPosX = this.fLabel_mc._x;
this.labelPosY = this.fLabel_mc._y;
this.fLabel_mc._x = this.labelPosX + 1;
this.fLabel_mc._y = this.labelPosY + 1;
this.fpbState_mc.gotoAndStop(3);
this.drawFrame();
if (Accessibility.isActive()) {
Accessibility.sendEvent(this, 0, this.EVENT_OBJECT_STATECHANGE);
}
};
FPushButtonClass.prototype.onRelease = function () {
this.fLabel_mc._x = this.labelPosX;
this.fLabel_mc._y = this.labelPosY;
this.fpbState_mc.gotoAndStop(2);
this.drawFrame();
this.executeCallBack();
};
FPushButtonClass.prototype.onRollOver = function () {
this.fpbState_mc.gotoAndStop(2);
this.drawFrame();
};
FPushButtonClass.prototype.onRollOut = function () {
this.fpbState_mc.gotoAndStop(1);
this.drawFrame();
};
FPushButtonClass.prototype.onReleaseOutside = function () {
this.fLabel_mc._x = this.labelPosX;
this.fLabel_mc._y = this.labelPosY;
this.fpbState_mc.gotoAndStop(1);
this.drawFrame();
};
FPushButtonClass.prototype.onDragOut = function () {
this.fLabel_mc._x = this.labelPosX;
this.fLabel_mc._y = this.labelPosY;
this.fpbState_mc.gotoAndStop(1);
this.drawFrame();
};
FPushButtonClass.prototype.onDragOver = function () {
this.fLabel_mc._x = this.labelPosX + 1;
this.fLabel_mc._y = this.labelPosY + 1;
this.fpbState_mc.gotoAndStop(3);
this.drawFrame();
};
FPushButtonClass.prototype.getEnabled = function () {
return(this.enabled);
};
FPushButtonClass.prototype.setEnabled = function (enable) {
if (enable || (enable == undefined)) {
this.gotoFrame(1);
this.drawFrame();
this.flabel_mc.setEnabled(true);
this.enabled = true;
super.setEnabled(true);
} else {
this.gotoFrame(4);
this.drawFrame();
this.flabel_mc.setEnabled(false);
this.enabled = false;
super.setEnabled(false);
}
};
FPushButtonClass.prototype.getLabel = function () {
return(this.fLabel_mc.labelField.text);
};
FPushButtonClass.prototype.setLabel = function (label) {
this.fLabel_mc.setLabel(label);
this.txtFormat();
if (Accessibility.isActive()) {
Accessibility.sendEvent(this, 0, this.EVENT_OBJECT_NAMECHANGE);
}
};
FPushButtonClass.prototype.myOnKeyDown = function () {
if ((Key.getCode() == 32) && (this.pressOnce == undefined)) {
this.onPress();
this.pressOnce = 1;
}
};
FPushButtonClass.prototype.myOnKeyUp = function () {
if (Key.getCode() == 32) {
this.onRelease();
this.pressOnce = undefined;
}
};
FPushButtonClass.prototype.myOnSetFocus = function () {
this.focused = true;
super.myOnSetFocus();
};
FPushButtonClass.prototype.get_accRole = function (childId) {
return(this.master.ROLE_SYSTEM_PUSHBUTTON);
};
FPushButtonClass.prototype.get_accName = function (childId) {
return(this.master.getLabel());
};
FPushButtonClass.prototype.get_accState = function (childId) {
return(this.master.STATE_SYSTEM_DEFAULT);
};
FPushButtonClass.prototype.get_accDefaultAction = function (childId) {
return("Press");
};
FPushButtonClass.prototype.accDoDefaultAction = function (childId) {
this.master.onPress();
this.master.onRelease();
};
#endinitclip
Symbol 88 MovieClip Frame 1
stop();
Symbol 96 MovieClip [Ghost] Frame 1
stop();
Symbol 100 MovieClip [GhKill] Frame 1
stop();
Symbol 100 MovieClip [GhKill] Frame 2
tellTarget (_root) {
playing = false;
Pacman._visible = false;
};
play();
Symbol 100 MovieClip [GhKill] Frame 12
tellTarget (_root) {
playing = true;
Pacman._visible = true;
gotoAndPlay ("Loop");
};
Symbol 100 MovieClip [GhKill] Frame 41
Scr.kval = "";
tellTarget (_parent) {
if (fval) {
gotoAndStop (1);
}
};
Symbol 105 Button
on (release) {
gotoAndPlay (1);
_root.fond.gotoandplay(1);
}
Symbol 111 MovieClip Frame 3
gotoAndPlay (2);
Symbol 111 MovieClip Frame 4
_root.fond.gotoandstop(9);
Symbol 111 MovieClip Frame 5
_root.fond.gotoandstop(9);
Symbol 116 MovieClip Frame 5
stop();
Symbol 116 MovieClip Frame 10
stop();
Symbol 118 Button
on (release) {
play();
}
Symbol 121 Button
on (release) {
getURL ("http://nowe.reginald.free.fr/", "_blank");
}
Symbol 122 Button
on (release) {
Demo.gotoAndStop("Controls");
}
Symbol 123 Button
on (release) {
Demo.gotoAndStop("About");
}
Symbol 128 Button
on (release) {
getURL ("http://nowe.reginald.free.fr/", "_blank");
}
Symbol 144 MovieClip Frame 1
fCount = 200;
stop();
Symbol 144 MovieClip Frame 2
fval = 100;
Symbol 144 MovieClip Frame 3
fval = 300;
Symbol 144 MovieClip Frame 4
fval = 500;
Symbol 144 MovieClip Frame 5
fval = 500;
Symbol 144 MovieClip Frame 6
fval = 700;
Symbol 144 MovieClip Frame 7
fval = 700;
Symbol 144 MovieClip Frame 8
fval = 1000;
Symbol 144 MovieClip Frame 9
fval = 1000;
Symbol 144 MovieClip Frame 10
fval = 2000;
Symbol 144 MovieClip Frame 11
fval = 2000;
Symbol 144 MovieClip Frame 12
fval = 3000;
Symbol 144 MovieClip Frame 13
fval = 3000;
Symbol 144 MovieClip Frame 14
fval = 5000;
Symbol 144 MovieClip Frame 15
stop();
tellTarget (_root) {
if (notMute) {
Snd.gotoAndPlay("EatFruit");
}
};
_root.score = _root.score + fval;
F.Scr.kval = fval;
F.gotoAndPlay(2);
Symbol 153 MovieClip Frame 1
stop();
Symbol 153 MovieClip Frame 2
stop();
Symbol 161 MovieClip Frame 8
stop();
Symbol 162 MovieClip Frame 5
gotoAndPlay (1);
Symbol 162 MovieClip Frame 6
_root.BGSnd.stop();
stopAllSounds();
Symbol 162 MovieClip Frame 25
_root.BGSnd.gotoAndPlay("Killed");
tellTarget (_root) {
g = 1;
while (g < 5) {
Ghost[g]._visible = false;
g++;
}
};
Symbol 162 MovieClip Frame 27
_rotation = 0;
Symbol 162 MovieClip Frame 59
stop();
tellTarget (_root) {
newLife = true;
gotoAndPlay ("Restart");
};
Symbol 174 MovieClip Frame 5
tellTarget (_root) {
if (notMute) {
BGSnd.NewLev.start();
}
};
Symbol 174 MovieClip Frame 33
stop();
Symbol 176 MovieClip Frame 26
stop();
_root.gotoAndPlay("Over");
Symbol 177 MovieClip Frame 1
stop();
Instance of Symbol 174 MovieClip "LevMov" in Symbol 177 MovieClip Frame 4
onClipEvent (load) {
with (_root) {
Num.lval = ((level < 10) ? ("0" + level) : (level));
}
}
Symbol 181 MovieClip Frame 1
stop();
Back1 = new Sound();
Back1.attachSound("BG1");
Back2 = new Sound();
Back2.attachSound("BG2");
Back3 = new Sound();
Back3.attachSound("BG3");
BlueGh = new Sound();
BlueGh.attachSound("BGGhost");
EyesGh = new Sound();
EyesGh.attachSound("BGEyes");
ExLife = new Sound();
ExLife.attachSound("ExLife");
NewLev = new Sound();
NewLev.attachSound("NewLev");
Symbol 181 MovieClip Frame 2
if (!_root.notMute) {
gotoAndPlay (21);
}
Symbol 181 MovieClip Frame 31
tellTarget (_root) {
if (!newGame) {
Ready.gotoAndStop("Level");
Ready._visible = true;
j = 0;
while (j < 31) {
i = 0;
while (i < 28) {
Maze[i]["P" + j]._visible = true;
i++;
}
j++;
}
}
newGame = false;
};
Symbol 181 MovieClip Frame 65
tellTarget (_root) {
g = 1;
while (g < 5) {
Ghost[g]._visible = true;
g++;
}
Pacman._visible = true;
Ready.gotoAndStop(1);
};
Symbol 181 MovieClip Frame 87
tellTarget (_root) {
Ready._visible = false;
playing = true;
play();
if (notMute) {
BGSnd["Back" + bgNum].start(0, 1000);
}
};
stop();
Symbol 181 MovieClip Frame 88
if (!_root.notMute) {
stop();
}
Symbol 181 MovieClip Frame 90
stop();
Symbol 186 MovieClip Frame 1
stop();
Symbol 186 MovieClip Frame 3
stop();
Symbol 186 MovieClip Frame 5
stop();
Symbol 186 MovieClip Frame 18
stop();
_root.BGSnd.EyesGh.start(0, 100);
Symbol 186 MovieClip Frame 20
stop();