Frame 1
stop();
Instance of Symbol 8 MovieClip "timers" in Frame 1
onClipEvent (load) {
total = _parent.getBytesTotal();
_level0.pp = 0;
}
onClipEvent (enterFrame) {
_level0.pp = _level0.pp + 1;
loaded = _parent.getBytesLoaded();
percent = int((loaded / total) * 100);
gotoAndStop(percent);
perText = percent + "%";
if (percent >= 100) {
_parent.gotoAndStop(3);
}
}
Instance of Symbol 11 MovieClip in Frame 1
on (release) {
getURL ("http://www.pifgames.com", "_blank");
}
Frame 3
stop();
if (_level0.pp >= 5) {
}
Instance of Symbol 34 MovieClip in Frame 3
on (release) {
getURL ("http://www.pifgames.com", "_blank");
}
Frame 4
function ScoreXml(nameVar, scoreVar, idVar, levelVar) {
submitscoreXML = new XML();
submitscoreXML.ignoreWhite = true;
mainElement = submitscoreXML.createElement("scorexml");
Element1 = submitscoreXML.createElement("name");
Element2 = submitscoreXML.createElement("score");
Element3 = submitscoreXML.createElement("sessionid");
Element4 = submitscoreXML.createElement("level");
Element5 = submitscoreXML.createElement("levelscore");
mytextnode1 = submitscoreXML.createTextNode(nameVar);
mytextnode2 = submitscoreXML.createTextNode(scoreVar);
mytextnode3 = submitscoreXML.createTextNode(idVar);
mytextnode4 = submitscoreXML.createTextNode(levelVar);
mytextnode5 = submitscoreXML.createTextNode(scoreVar.toString(32));
mainElement.appendChild(Element1);
mainElement.appendChild(Element2);
mainElement.appendChild(Element3);
mainElement.appendChild(Element4);
mainElement.appendChild(Element5);
Element1.appendChild(mytextnode1);
Element2.appendChild(mytextnode2);
Element3.appendChild(mytextnode3);
Element4.appendChild(mytextnode4);
Element5.appendChild(mytextnode5);
submitscoreXML.appendChild(mainElement);
submitscoreXML.contentType = "text/xml";
submitscoreReplyXML = new XML();
submitscoreReplyXML.ignoreWhite = true;
submitscoreReplyXML.contentType = "text/xml";
submitscoreXML.sendAndLoad("http://www.pifgames.com/stats/dragonhunt/addscore.php", submitscoreReplyXML, "POST");
submitscoreReplyXML.onLoad = function (success) {
if (success) {
getStatus(this.firstChild);
}
};
}
function getStatus(root) {
if (root.nodeName.toUpperCase() == "SUBMITXML") {
fc = root.firstChild;
while (fc != null) {
if (fc.nodeName.toUpperCase() == "OUTPUT") {
messageVar = fc.firstChild.nodeValue;
}
fc = fc.nextSibling;
}
}
}
function highScoreXml() {
leaderBoardXML = new XML();
leaderBoardXML.ignoreWhite = true;
mainElement = leaderBoardXML.createElement("getscore");
Element1 = leaderBoardXML.createElement("input");
mytextnode1 = leaderBoardXML.createTextNode("xmlValue");
mainElement.appendChild(Element1);
Element1.appendChild(mytextnode1);
leaderBoardXML.appendChild(mainElement);
leaderBoardXML.contentType = "text/xml";
leaderBoardReplyXML = new XML();
leaderBoardReplyXML.ignoreWhite = true;
leaderBoardReplyXML.contentType = "text/xml";
leaderBoardXML.sendAndLoad("http://www.pifgames.com/stats/dragonhunt/topscores.php", leaderBoardReplyXML, "POST");
leaderBoardReplyXML.onLoad = function (success) {
if (success) {
getleaderBoardStatus(this.firstChild);
leader.gotoAndStop(2);
}
};
}
function getleaderBoardStatus(root) {
if (root.nodeName.toUpperCase() == "HIGHSCORE") {
fChild = root.firstChild;
i = 0;
j = 0;
while (fChild != null) {
if (fChild.nodeName.toUpperCase() == "SCOREDATA") {
element = fChild.firstChild;
while (element != null) {
if (element.nodeName.toUpperCase() == "NAME") {
nameArray[i] = element.firstChild.nodeValue;
i++;
}
if (element.nodeName.toUpperCase() == "SCORE") {
scoreArray[j] = element.firstChild.nodeValue;
j++;
}
element = element.nextSibling;
}
}
fChild = fChild.nextSibling;
}
}
nameText = nameArray;
scoreText = scoreArray;
}
nameArray = new Array();
scoreArray = new Array();
stop();
Mouse.show();
_level0.n;
_level0.s;
username.restrict = "a-z A-Z 0-9";
username.onSetFocus = function () {
username.text = "";
};
Instance of Symbol 71 MovieClip "rules" in Frame 4
/* no clip actions */
Frame 5
function stick() {
var _local1 = this;
if (_level0.mo == 0) {
_local1.mstick["stick" + _level0.i].f = 0;
_local1.mstick["stick" + _level0.i].wt = _local1.mstick._xmouse;
_local1.mstick["stick" + _level0.i].ht = _local1.mstick._ymouse;
_level0.i = _level0.i + 1;
duplicateMovieClip ("mstick.stick", "stick" + _level0.i, _level0.i + 200);
_local1.mstick["stick" + _level0.i]._x = 64;
_local1.mstick["stick" + _level0.i]._y = 185.35;
}
}
function dups(d) {
duplicateMovieClip ("main.dragon", "dragon" + di, di + 100);
this.main["dragon" + di]._x = Math.floor(Math.random() * 551) + 100;
this.main["dragon" + di]._y = Math.floor(Math.random() * 251) + 150;
di = di + 1;
_level0.udi = di;
}
function reset() {
var _local1 = this;
_level0.shield = 100;
pointer._alpha = 100;
startDrag (pointer, true);
Mouse.hide();
b = 0;
temp = 0;
gd = 0;
gd1 = 70 - _level0.lev;
f = 1;
wt = 1;
ht = 1;
_level0.i = 0;
_local1.top.levels.text = Number(_local1.top.levels.text) + 1;
_level0.lev = Number(_local1.top.levels.text);
tt = 0;
it = 0;
my_date = new Date();
time.text = my_date.getSeconds();
temp1 = Number(time.text);
dd = 10;
di = 0;
d = 0;
_level0.udi;
_level0.mo = 0;
_level0.mo1 = 0;
_level0.forall = 0;
stick();
}
stop();
_level0.shield = 100;
var b = 0;
var temp = 0;
var gd = 0;
var gd1 = 70;
var f = 1;
var wt = 1;
var ht = 1;
_level0.i = 0;
if (this.top.levels.text == "") {
this.top.levels.text = "0";
}
this.top.levels.text = Number(this.top.levels.text) + 1;
_level0.lev = Number(this.top.levels.text);
this.top.shield.text = "100";
var tt = 0;
var it = 0;
var temp1;
my_date = new Date();
time.text = my_date.getSeconds();
temp1 = Number(time.text);
this.main.dragon._visible = false;
this.main.dragon.p = 1;
var dd = 10;
var di = 0;
var d = 4;
_level0.udi;
_level0.mo = 0;
_level0.mo1 = 0;
startDrag (pointer, true);
Mouse.hide();
_level0.forall = 0;
someListener = new Object();
someListener.onMouseMove = function () {
var _local1 = _root;
if (_level0.mo == 0) {
temp = (pointer._x / 355) * 100;
b = ((temp * 35) / 100) - 35;
_local1.mstick["stick" + _level0.i]._rotation = _local1.mstick["stick" + _level0.i]._rotation + ((b - _local1.mstick["stick" + _level0.i]._rotation) / 15);
_local1.wood._rotation = _local1.wood._rotation + ((b - _local1.wood._rotation) / 35);
}
};
Mouse.addListener(someListener);
this.onEnterFrame = function () {
var _local1 = this;
_local1.main.dragon.p = 1;
if (_level0.forall == 0) {
my_date = new Date();
time.text = my_date.getSeconds();
if (Number(time.text) != temp1) {
it = it + 1;
top.timer.gotoAndStop(it);
temp1 = Number(time.text);
}
if ((_ymouse >= 50) && (_ymouse <= 550)) {
Mouse.hide();
pointer._alpha = 100;
} else {
Mouse.show();
pointer._y = 100;
pointer._alpha = 0;
}
if ((dd == 0) && (it <= 60)) {
dd = Math.floor(Math.random() * ((100 - (50 - _level0.lev)) + 1)) + (50 - _level0.lev);
d = random(_level0.lev);
}
if (it >= 60) {
Mouse.show();
_level0.mo = 1;
_level0.mo1 = 1;
stopDrag();
it = 0;
_local1.sscore.text = _local1.top.score.text;
_level0.s = Number(_local1.sscore.text);
again._y = 100;
_level0.forall = 1;
pointer._alpha = 0;
}
if (_level0.shield == 0) {
_level0.mo = 1;
pointer._alpha = 0;
Mouse.show();
stopDrag();
_local1.sscore.text = _local1.top.score.text;
_level0.s = Number(_local1.sscore.text);
gotoAndStop ("end");
delete _local1.onEnterFrame;
}
if (gd == gd1) {
gd = random(gd1);
dups(d);
d = d - 1;
}
dd = dd - 1;
if (d != -1) {
gd = gd + 1;
}
_local1.top.shield.text = _level0.shield;
}
};
Instance of Symbol 191 MovieClip "pointer" in Frame 5
/* no clip actions */
Frame 6
ScoreXml(_level0.n, _level0.s, _level0.id, _level0.lev);
Mouse.show();
stopDrag();
Instance of Symbol 206 MovieClip "rules" in Frame 6
/* no clip actions */
Symbol 8 MovieClip Frame 1
stop();
Symbol 8 MovieClip Frame 100
stop();
Symbol 15 MovieClip Frame 1
stop();
Instance of Symbol 11 MovieClip in Symbol 34 MovieClip Frame 1
on (release) {
getURL ("http://www.pifgames.com", "_blank");
}
Symbol 34 MovieClip Frame 82
_parent.gotoAndStop("start");
Symbol 42 Button
on (release) {
getURL ("http://www.pifgames.com", "_blank");
}
Symbol 46 Button
on (release) {
getURL ("http://www.pifgames.com/addgames.php", "_blank");
}
Symbol 50 Button
on (release) {
this.leader._y = 120;
highScoreXml();
}
Symbol 52 Button
on (release) {
this.rules._y = 315;
}
Symbol 55 Button
on (release) {
if ((this.username.text != "") && (this.username.text != "Enter your name")) {
this.sname.text = this.username.text;
_level0.n = this.sname.text;
_level0.id = random(999999999);
this.chan.text = _level0.id;
gotoAndStop ("middle");
} else {
this.username.text = "Enter your name";
}
}
Symbol 70 Button
on (release) {
this._y = -300;
}
Instance of Symbol 69 MovieClip in Symbol 71 MovieClip Frame 1
on (rollOver) {
this.useHandCursor = false;
}
on (release) {
trace("");
}
Symbol 81 Button
on (release) {
this._y = -500;
}
Symbol 97 MovieClip Frame 1
var initialY;
stop();
Instance of Symbol 76 MovieClip in Symbol 97 MovieClip Frame 1
on (rollOver) {
this.useHandCursor = false;
}
on (release) {
trace("");
}
Instance of Symbol 86 MovieClip in Symbol 97 MovieClip Frame 1
onClipEvent (load) {
function scrollerActivater() {
var _local1 = _parent;
step = (_local1.helpClipMC._height - _local1.line._height) / _local1.line._height;
if (pressed == true) {
_local1.helpClipMC._y = _local1.initialY - ((_y - _local1.line._y) * step);
}
if ((step > 0) && (_visible == false)) {
_visible = true;
_local1.line._visible = true;
} else if ((step <= 0) && (_visible == true)) {
_visible = false;
_local1.line._visible = false;
}
}
var pressed = false;
var handlerY = _y;
_parent.initialY = _parent.helpClipMC._y;
_visible = false;
_parent.line._visible = false;
this.onPress = function () {
var _local1 = _parent;
startDrag (this, true, _local1.line._x, _local1.line._y, _local1.line._x, _local1.line._y + _local1.line._height);
pressed = true;
};
this.onRelease = (this.onReleaseOutside = function () {
stopDrag();
pressed = false;
});
}
onClipEvent (enterFrame) {
scrollerActivater();
}
Symbol 97 MovieClip Frame 2
depth = 100;
yInc = 0;
if (_parent.nameArray.length > 100) {
myvar = 100;
} else {
myvar = _parent.nameArray.length;
}
var i = 1;
while (i <= myvar) {
helpClipMC.setMask(masking);
this.helpClipMC.nameClip.duplicateMovieClip("nameClip" + i, depth + i, {_x:-100, _y:yInc});
this.helpClipMC["nameClip" + i].uname.text = _parent.nameArray[i - 1];
this.helpClipMC["nameClip" + i].ids.text = i;
this.helpClipMC["nameClip" + i].scores.text = _parent.scoreArray[i - 1];
yInc = this.helpClipMC["nameClip" + i]._y + this.helpClipMC["nameClip" + i]._height;
i++;
}
Symbol 139 MovieClip Frame 13
stop();
removeMovieClip(this._parent);
Symbol 140 MovieClip Frame 1
stop();
Symbol 140 MovieClip Frame 2
stop();
Instance of Symbol 140 MovieClip "dragon" in Symbol 141 MovieClip Frame 1
onClipEvent (load) {
this._xscale = 0;
this._yscale = 0;
var p = 0;
this.yys = -250;
this.syy = 95;
}
onClipEvent (enterFrame) {
if (_level0.mo == 0) {
if (p == 0) {
this._xscale = this._xscale + ((200 - this._xscale) / 95);
this._yscale = this._yscale + ((200 - this._yscale) / 95);
this._y = this._y + ((this.yys - this._y) / this.syy);
if (this._yscale >= 95) {
this.alpha = 0;
this.yys = -1000;
this.syy = 2;
this._parent._parent.fireball.play();
_level0.shield = _level0.shield - 10;
removeMovieClip(this);
p = 1;
}
if (this.shoot.hitTest(this._parent._parent.mstick["stick" + (_level0.i - 1)].fire)) {
if ((this._yscale <= (this._parent._parent.mstick["stick" + (_level0.i - 1)]._yscale + 20)) && (this._yscale >= (this._parent._parent.mstick["stick" + (_level0.i - 1)]._yscale - 20))) {
removeMovieClip(this._parent._parent.mstick["stick" + (_level0.i - 1)]);
gotoAndStop (2);
this._parent._parent.top.score.text = Number(this._parent._parent.top.score.text) + 50;
p = 1;
}
if (this._yscale > this._parent._parent.mstick["stick" + (_level0.i - 1)]._yscale) {
this._parent._parent.mstick["stick" + (_level0.i - 1)]._alpha = 0;
}
}
}
}
if (_level0.mo1 == 1) {
removeMovieClip(this);
}
}
Symbol 146 MovieClip Frame 1
stop();
Symbol 157 MovieClip Frame 5
Symbol 157 MovieClip Frame 7
stop();
Instance of Symbol 157 MovieClip "stick0" in Symbol 158 MovieClip Frame 1
onClipEvent (load) {
f = 1;
}
onClipEvent (enterFrame) {
if (_level0.mo == 0) {
if (f == 0) {
this._x = this._x + ((wt - this._x) / 3);
this._y = this._y + ((ht - this._y) / 3);
this._xscale = this._xscale + ((-1 - this._xscale) / 10);
this._yscale = this._yscale + ((-1 - this._yscale) / 10);
}
if (this._xscale <= 2) {
removeMovieClip(this);
}
}
if (_level0.mo1 == 1) {
removeMovieClip(this);
}
}
Instance of Symbol 157 MovieClip "stick" in Symbol 158 MovieClip Frame 1
onClipEvent (load) {
f = 1;
}
onClipEvent (enterFrame) {
if (_level0.mo == 0) {
if (f == 0) {
this._x = this._x + ((wt - this._x) / 3);
this._y = this._y + ((ht - this._y) / 3);
this._xscale = this._xscale + ((-1 - this._xscale) / 10);
this._yscale = this._yscale + ((-1 - this._yscale) / 10);
}
if (this._xscale <= 2) {
removeMovieClip(this);
}
}
if (_level0.mo1 == 1) {
removeMovieClip(this);
}
}
Symbol 172 MovieClip Frame 1
stop();
Symbol 172 MovieClip Frame 60
stop();
Symbol 180 Button
on (release) {
_level0.forall = 1;
_level0.mo = 1;
gotoAndStop (2);
stopDrag();
}
on (rollOver) {
Mouse.show();
}
Symbol 184 Button
on (release) {
_level0.forall = 0;
_level0.mo = 0;
gotoAndStop (1);
startDrag (this._parent.pointer, true);
}
on (rollOver) {
Mouse.show();
}
Symbol 185 MovieClip Frame 1
stop();
Symbol 185 MovieClip Frame 2
stop();
Symbol 190 Button
on (release) {
_parent.stick();
}
Symbol 200 Button
on (release) {
_level0.id = this._parent.chan.text;
_parent.ScoreXml(_level0.n, _level0.s, _level0.id);
_parent.reset();
this._y = -1000;
}
Symbol 207 Button
on (release) {
gotoAndPlay ("start");
}