Frame 1
stop();
Frame 2
function init() {
_root.createEmptyMovieClip("jeu", 1);
jeu._x = 350;
jeu._y = 200;
jeu.attachMovie("decor", "decor1", 1);
jeu.attachMovie("decor", "decor2", 2);
jeu.attachMovie("nuages", "nuages", 3);
jeu.attachMovie("poteaux", "poteaux", 4);
jeu.decor1._x = 0;
jeu.decor1._y = 0;
jeu.decor2._x = jeu.decor1._x + (jeu.decor1._width / 2);
jeu.decor2._y = jeu.decor1._y;
jeu.attachMovie("score", "score", 9999);
jeu.attachMovie("mouton", "mouton", 9997);
jeu.mouton._x = -150;
jeu.mouton._y = 50;
hautSautRap = -100;
solMout = 50;
hautLoup = 100;
sol = solMout + jeu.mouton._height;
saut = "non";
vitMoutSaut = 50;
coefVol = 0.6;
nbpiq = 0;
coefChute = 1.5;
intervalNiv = 60;
vitesseNiv1 = 20;
vitesseNiv2 = 30;
vitesseNiv3 = 40;
vitesseNiv4 = 50;
vitesseNiv5 = 60;
vitesseNiv = vitesseNiv1;
vitesse = vitesseNiv;
vitCorbeau = vitesse * 1.5;
espaceObst = -350;
dernierObst = 5;
dernierBonus = 500;
espaceBonus = -200;
tauxBonus = 0.9;
points = 0;
valPoints = 100;
vies = 3;
nbViesMax = 5;
jeu.score.attachMovie("vie", "vie1", 1);
jeu.score.attachMovie("vie", "vie2", 2);
jeu.score.attachMovie("vie", "vie3", 3);
jeu.score.attachMovie("vie", "vie4", 4);
jeu.score.attachMovie("vie", "vie5", 5);
jeu.score.vie1._x = -270;
jeu.score.vie1._y = -180;
jeu.score.vie2._x = jeu.score.vie1._x + 35;
jeu.score.vie2._y = jeu.score.vie1._y;
jeu.score.vie3._x = jeu.score.vie2._x + 35;
jeu.score.vie3._y = jeu.score.vie1._y;
jeu.score.vie4._x = jeu.score.vie3._x + 35;
jeu.score.vie4._y = jeu.score.vie1._y;
jeu.score.vie5._x = jeu.score.vie4._x + 35;
jeu.score.vie5._y = jeu.score.vie1._y;
i = 1;
while (i <= vies) {
jeu.score["vie" + i].gotoAndStop("actif");
i++;
}
stopAllSounds();
_level0.son_musique = new Sound();
_level0.son_musique.attachSound("music_s");
_level0.son_saut = new Sound();
_level0.son_saut.attachSound("saut_s");
_level0.son_barriere_elec = new Sound();
_level0.son_barriere_elec.attachSound("barriere_elec_s");
_level0.son_beeeh = new Sound();
_level0.son_beeeh.attachSound("beeeh_s");
_level0.son_electrocution = new Sound();
_level0.son_electrocution.attachSound("electrocution_s");
_level0.son_paf = new Sound();
_level0.son_paf.attachSound("paf_s");
_level0.son_rire = new Sound();
_level0.son_rire.attachSound("rire_s");
_level0.son_weeee = new Sound();
_level0.son_weeee.attachSound("weeee_s");
_level0.son_musique.start(0, 9999);
}
function sotMouton() {
if (jeu.mouton._y >= (solMout - 1)) {
if (Key.isDown(32)) {
_level0.son_saut.start(0, 0);
saut_m.gotoAndPlay("saut");
saut = "oui";
_root.vitmout = vitMoutSaut;
jeu.mouton.gotoAndPlay("saute");
}
}
}
function bougeDecor() {
if (jeu.decor1._x <= 0) {
jeu.decor1._x = jeu.decor1._x - vitesse;
jeu.poteaux._x = jeu.decor1._x;
jeu.decor2._x = jeu.decor1._x + jeu.decor1._width;
}
if (jeu.decor2._x <= 0) {
jeu.decor2._x = jeu.decor2._x - vitesse;
jeu.decor1._x = jeu.decor2._x + jeu.decor2._width;
jeu.poteaux._x = jeu.decor1._x;
}
if (jeu.nuages._x > -800) {
jeu.nuages._x = jeu.nuages._x - (vitesse / 10);
} else {
jeu.nuages._x = 800;
_level0.son_beeeh.start(0, 0);
}
}
function nouveauObst() {
if (((((dernierObst == 5) || (jeu["barriere" + dernierObst]._x < espaceObst)) || (jeu["barriere_elec" + dernierObst]._x < espaceObst)) || (jeu["loup" + dernierObst]._x < espaceObst)) || (jeu["corbeau" + dernierObst]._x < espaceObst)) {
a = random(4);
if (a == 0) {
dernierObst++;
jeu[("barriere" + dernierObst) - 2].removeMovieClip();
jeu.attachMovie("barriere", "barriere" + dernierObst, dernierObst);
jeu["barriere" + dernierObst]._x = 350;
jeu["barriere" + dernierObst]._y = sol;
}
if (a == 1) {
dernierObst++;
jeu[("barriere_elec" + dernierObst) - 2].removeMovieClip();
jeu.attachMovie("barriere_elec", "barriere_elec" + dernierObst, dernierObst);
jeu["barriere_elec" + dernierObst]._x = 350;
jeu["barriere_elec" + dernierObst]._y = sol;
_level0.son_barriere_elec.start(0, 0);
}
if (a == 2) {
dernierObst++;
jeu[("loup" + dernierObst) - 2].removeMovieClip();
jeu.attachMovie("loup", "loup" + dernierObst, dernierObst);
jeu["loup" + dernierObst]._x = 350;
jeu["loup" + dernierObst]._y = hautLoup;
}
if (a == 3) {
dernierObst++;
jeu[("corbeau" + dernierObst) - 2].removeMovieClip();
jeu.attachMovie("corbeau", "corbeau" + dernierObst, dernierObst);
jeu["corbeau" + dernierObst]._x = 350;
jeu["corbeau" + dernierObst]._y = hautSautRap;
}
}
}
function nouveauBonus() {
ha = Math.random();
if (ha <= tauxBonus) {
if (((dernierBonus == 500) || (jeu["paille" + dernierBonus]._x < espaceBonus)) || (jeu["coeur" + dernierBonus]._x < espaceBonus)) {
dernierBonus++;
jeu[("paille" + dernierBonus) - 2].removeMovieClip();
jeu.attachMovie("paille", "paille" + dernierBonus, dernierBonus);
jeu["paille" + dernierBonus]._x = 350;
b = random(3);
if (b == 0) {
valy = sol;
}
if (b == 1) {
valy = hautSautRap;
}
if (b == 2) {
valy = (solMout + hautSautRap) / 2;
}
jeu["paille" + dernierBonus]._y = valy;
}
} else if (((dernierBonus == 500) || (jeu["coeur" + dernierBonus]._x < espaceBonus)) || (jeu["paille" + dernierBonus]._x < espaceBonus)) {
dernierBonus++;
jeu[("coeur" + dernierBonus) - 2].removeMovieClip();
jeu.attachMovie("coeur", "coeur" + dernierBonus, dernierBonus);
jeu["coeur" + dernierBonus]._x = 350;
c = random(3);
if (c == 0) {
valy = sol;
}
if (c == 1) {
valy = hautSautRap;
}
if (c == 2) {
valy = (solMout + hautSautRap) / 2;
}
jeu["coeur" + dernierBonus]._y = valy;
}
}
function bougeObst() {
i = dernierObst - 2;
while (i <= dernierObst) {
jeu["barriere" + i]._x = jeu["barriere" + i]._x - vitesse;
jeu["barriere_elec" + i]._x = jeu["barriere_elec" + i]._x - vitesse;
jeu["loup" + i]._x = jeu["loup" + i]._x - vitesse;
jeu["corbeau" + i]._x = (jeu["corbeau" + i]._x - vitesse) - vitCorbeau;
if (((jeu.mouton._y + (jeu.mouton._height / 2)) > (jeu["barriere" + i]._y - jeu["barriere" + i]._height)) && (((jeu.mouton._x + (jeu.mouton._width / 2)) > jeu["barriere" + i]._x) && ((jeu.mouton._x - (jeu.mouton._width / 2)) < jeu["barriere" + i]._x))) {
vitesse = 0;
jeu.mouton.gotoAndPlay("cogner");
mort.gotoAndPlay("mort");
_level0.son_paf.start(0, 0);
}
if (((jeu.mouton._y + (jeu.mouton._height / 2)) > (jeu["barriere_elec" + i]._y - jeu["barriere_elec" + i]._height)) && (((jeu.mouton._x + (jeu.mouton._width / 2)) > jeu["barriere_elec" + i]._x) && ((jeu.mouton._x - (jeu.mouton._width / 2)) < jeu["barriere_elec" + i]._x))) {
vitesse = 0;
jeu.mouton.gotoAndPlay("elec");
mort.gotoAndPlay("mort");
_level0.son_electrocution.start(0, 0);
}
if (((jeu.mouton._y + (jeu.mouton._height / 2)) > (jeu["loup" + i]._y - jeu["loup" + i]._height)) && (((jeu.mouton._x + (jeu.mouton._width / 2)) > jeu["loup" + i]._x) && ((jeu.mouton._x - (jeu.mouton._width / 2)) < jeu["loup" + i]._x))) {
vitesse = 0;
jeu.mouton.gotoAndPlay("croc");
mort.gotoAndPlay("mort");
_level0.son_paf.start(0, 0);
}
if ((jeu.mouton._y <= jeu["corbeau" + i]._y) && (((jeu.mouton._x + (jeu.mouton._width / 2)) > jeu["corbeau" + i]._x) && ((jeu.mouton._x - (jeu.mouton._width / 2)) < jeu["corbeau" + i]._x))) {
vitesse = 0;
vitCorbeau = vitCorbeau / 10;
jeu.mouton.gotoAndPlay("pique");
jeu["corbeau" + i].gotoAndPlay("pique");
mort.gotoAndPlay("mort");
_level0.son_paf.start(0, 0);
}
i++;
}
}
function bougeBonus() {
i = dernierBonus - 2;
while (i <= dernierBonus) {
jeu["paille" + i]._x = jeu["paille" + i]._x - vitesse;
jeu["coeur" + i]._x = jeu["coeur" + i]._x - vitesse;
if (((((jeu.mouton._y + jeu.mouton._height) > (jeu["paille" + i]._y - jeu["paille" + i]._height)) && (jeu["paille" + i]._y > jeu.mouton._y)) || ((jeu["paille" + i]._y > jeu.mouton._y) && ((jeu["paille" + i]._y - jeu["paille" + i]._height) < (jeu.mouton._y + jeu.mouton._height)))) && (((jeu.mouton._x + (jeu.mouton._width / 2)) > jeu["paille" + i]._x) && ((jeu.mouton._x - (jeu.mouton._width / 2)) < jeu["paille" + i]._x))) {
jeu["paille" + i]._x = -500;
jeu.mouton.gotoAndPlay("bonus");
points = points + valPoints;
_level0.son_weeee.start(0, 0);
}
if (((((jeu.mouton._y + jeu.mouton._height) > (jeu["coeur" + i]._y - jeu["coeur" + i]._height)) && (jeu["coeur" + i]._y > jeu.mouton._y)) || ((jeu["coeur" + i]._y > jeu.mouton._y) && ((jeu["coeur" + i]._y - jeu["coeur" + i]._height) < (jeu.mouton._y + jeu.mouton._height)))) && (((jeu.mouton._x + (jeu.mouton._width / 2)) > jeu["coeur" + i]._x) && ((jeu.mouton._x - (jeu.mouton._width / 2)) < jeu["coeur" + i]._x))) {
jeu["coeur" + i]._x = -500;
jeu.mouton.gotoAndPlay("bonus");
ajoutVie();
_level0.son_rire.start(0, 0);
}
i++;
}
}
function ajoutVie() {
if (vies < nbViesMax) {
vies++;
jeu.score["vie" + vies].gotoAndStop("actif");
}
}
function enlevVie() {
if (vies > 0) {
jeu.score["vie" + vies].gotoAndStop("inactif");
vies--;
}
}
function temps() {
secDepart = (time.st_min * 60) + time.st_sec;
secNow = (time.cur_min * 60) + time.cur_sec;
if ((secNow - secDepart) == intervalNiv) {
jeu.attachMovie("niveau2", "niveau2", 9998);
vitesseNiv = vitesseNiv2;
vitesse = vitesseNiv;
vitCorbeau = vitesse * 1.4;
hautSautRap = -90;
vitMoutSaut = 55;
coefVol = 0.5;
coefChute = 1.6;
valPoints = 125;
}
if ((secNow - secDepart) == (intervalNiv * 2)) {
jeu.attachMovie("niveau3", "niveau3", 9998);
vitesseNiv = vitesseNiv3;
vitesse = vitesseNiv;
vitCorbeau = vitesse * 1.3;
hautSautRap = -80;
vitMoutSaut = 60;
coefVol = 0.4;
coefChute = 1.7;
valPoints = 150;
}
if ((secNow - secDepart) == (intervalNiv * 3)) {
jeu.attachMovie("niveau4", "niveau4", 9998);
vitesseNiv = vitesseNiv4;
vitesse = vitesseNiv;
vitCorbeau = vitesse * 1.2;
hautSautRap = -70;
vitMoutSaut = 70;
coefVol = 0.3;
coefChute = 1.8;
valPoints = 175;
}
if ((secNow - secDepart) == (intervalNiv * 4)) {
jeu.attachMovie("niveau5", "niveau5", 9998);
vitesseNiv = vitesseNiv5;
vitesse = vitesseNiv;
vitCorbeau = vitesse * 1.1;
hautSautRap = -70;
vitMoutSaut = 60;
coefVol = 0.2;
coefChute = 1.8;
valPoints = 200;
}
if ((secNow - secDepart) == (intervalNiv * 5)) {
_root.gotoAndPlay("fin");
}
}
stop();
Instance of Symbol 141 MovieClip "actions" in Frame 2
onClipEvent (load) {
_root.init();
}
onClipEvent (enterFrame) {
_root.temps();
_root.sotMouton();
_root.nouveauObst();
_root.nouveauBonus();
_root.bougeDecor();
_root.bougeObst();
_root.bougeBonus();
}
Frame 3
jeu["barriere" + dernierObst].removeMovieClip();
jeu["barriere_elec" + dernierObst].removeMovieClip();
jeu["loup" + dernierObst].removeMovieClip();
jeu["corbeau" + dernierObst].removeMovieClip();
jeu["paille" + dernierBonus].removeMovieClip();
jeu["coeur" + dernierBonus].removeMovieClip();
jeu[("barriere" + dernierObst) - 1].removeMovieClip();
jeu[("barriere_elec" + dernierObst) - 1].removeMovieClip();
jeu[("loup" + dernierObst) - 1].removeMovieClip();
jeu[("corbeau" + dernierObst) - 1].removeMovieClip();
jeu[("paille" + dernierBonus) - 1].removeMovieClip();
jeu[("coeur" + dernierBonus) - 1].removeMovieClip();
jeu.mouton.removeMovieClip();
if (_root.vies <= 0) {
jeu.attachMovie("game_over", "game_over", 999);
} else {
jeu.attachMovie("congratulations", "congratulations", 999);
}
stop();
Symbol 15 MovieClip [loup] Frame 1
if (_root.jeu.mouton._x > (this._x - 150)) {
gotoAndPlay ("actif");
}
Symbol 15 MovieClip [loup] Frame 7
gotoAndPlay ("inactif");
Symbol 15 MovieClip [loup] Frame 22
stop();
Symbol 28 MovieClip [corbeau] Frame 8
gotoAndPlay ("vol");
Symbol 28 MovieClip [corbeau] Frame 19
_root.nbpiq++;
if (_root.nbpiq < 2) {
gotoAndPlay ("pique");
} else {
_root.vitCorbeau = _root.vitCorbeau * 10;
jeu["corbeau" + i].gotoAndPlay("vol");
}
Symbol 39 MovieClip [barriere_elec] Frame 1
gotoAndPlay ("inactif");
Symbol 39 MovieClip [barriere_elec] Frame 7
gotoAndPlay ("actif");
Symbol 39 MovieClip [barriere_elec] Frame 12
stop();
Symbol 41 MovieClip [barriere] Frame 1
stop();
Symbol 43 Button
on (release) {
getURL ("http://www.axome.com", "_blank");
}
Symbol 55 Button
on (press) {
gotoAndPlay ("off");
}
Symbol 57 Button
on (press) {
gotoAndPlay ("on");
}
Symbol 60 MovieClip Frame 1
stop();
Symbol 60 MovieClip Frame 5
_level0.son_musique.stop();
_level0.son_musique.start(0, 9999);
stop();
Symbol 60 MovieClip Frame 10
_level0.son_musique.stop();
stop();
Symbol 65 MovieClip [vie] Frame 1
stop();
Symbol 65 MovieClip [vie] Frame 6
stop();
Symbol 68 MovieClip [game_over] Frame 41
_root.jeu.attachMovie("champs", "champs", 9997);
stop();
Symbol 70 MovieClip [niveau2] Frame 24
stop();
Symbol 72 MovieClip [niveau3] Frame 24
stop();
Symbol 74 MovieClip [niveau4] Frame 24
stop();
Symbol 76 MovieClip [niveau5] Frame 24
stop();
Symbol 78 MovieClip [congratulations] Frame 42
_root.jeu.attachMovie("champs", "champs", 9997);
stop();
Symbol 84 Button
on (press) {
stopAllSounds();
_root.gotoAndPlay(1);
}
on (release) {
_root.gotoAndPlay(1);
}
Symbol 86 MovieClip [champs] Frame 1
if (Key.isDown(13)) {
_root.result.executer();
}
Symbol 94 Button
on (press) {
_root.gotoAndPlay(1);
}
on (release) {
_root.gotoAndPlay(1);
}
Symbol 112 MovieClip [mouton] Frame 6
gotoAndPlay ("court");
Symbol 112 MovieClip [mouton] Frame 15
gotoAndPlay ("court");
Symbol 112 MovieClip [mouton] Frame 37
gotoAndPlay ("court");
Symbol 112 MovieClip [mouton] Frame 59
gotoAndPlay ("elec");
Symbol 112 MovieClip [mouton] Frame 60
stop();
Symbol 112 MovieClip [mouton] Frame 63
stop();
Symbol 112 MovieClip [mouton] Frame 65
stop();
Symbol 126 Button
on (press) {
_level0.load.stop();
gotoAndPlay (2);
}
Symbol 134 MovieClip Frame 1
myDate = new Date();
st_sec = myDate.getSeconds();
st_min = mydate.getMinutes();
if (st_min == 59) {
recul = "ok";
st_min--;
}
Symbol 134 MovieClip Frame 2
current = new Date();
cur_sec = current.getSeconds();
cur_min = current.getMinutes();
if (recul == "ok") {
cur_min--;
}
s = cur_sec - st_sec;
m = cur_min - st_min;
if (s < 0) {
s = s + 60;
m--;
}
Symbol 134 MovieClip Frame 3
gotoAndPlay (2);
Symbol 137 MovieClip Frame 1
stop();
Symbol 137 MovieClip Frame 5
_root.jeu["barriere" + _root.dernierObst]._x = -500;
_root.jeu["barriere_elec" + _root.dernierObst]._x = -500;
_root.jeu["corbeau" + _root.dernierObst]._x = -500;
_root.jeu["loup" + _root.dernierObst]._x = -500;
Symbol 137 MovieClip Frame 15
_root.enlevVie();
if (_root.vies <= 0) {
_root.gotoAndPlay("fin");
} else {
_root.jeu.mouton.gotoAndPlay("court");
_root.vitesse = _root.vitesseNiv;
_root.vitCorbeau = _root.vitesse * 1.5;
}
Symbol 139 MovieClip Frame 1
stop();
Symbol 139 MovieClip Frame 2
if (_root.saut == "oui") {
if (_root.jeu.mouton._y >= _root.hautSautRap) {
_root.jeu.mouton._y = _root.jeu.mouton._y - _root.vitmout;
}
if (_root.jeu.mouton._y < _root.hautSautRap) {
_root.vitmout = _root.vitmout * _root.coefVol;
_root.jeu.mouton._y = _root.jeu.mouton._y - _root.vitmout;
}
if (_root.vitmout <= 1) {
_root.saut = "non";
}
}
if (_root.saut == "non") {
if (_root.jeu.mouton._y <= _root.solMout) {
_root.vitmout = _root.vitmout * _root.coefChute;
_root.jeu.mouton._y = _root.jeu.mouton._y + _root.vitmout;
if (_root.jeu.mouton._y > _root.solMout) {
_root.jeu.mouton._y = _root.solMout;
gotoAndPlay (1);
}
}
}
Symbol 139 MovieClip Frame 3
gotoAndPlay ("saut");
Symbol 144 MovieClip Frame 1
function executer() {
var _local1 = _root;
c.login = _local1.jeu.champs.login;
c.email = _local1.jeu.champs.email;
c.sendAndLoad("insertscore.php", c, "POST");
_local1.jeu.champs.removeMovieClip();
}
function showContent() {
var _local1 = this;
var _local2 = _root;
_local2.jeu.attachMovie("tableau_scores", "tableau_scores", 99999);
_local2.jeu.tableau_scores.tableau.htmlText = "";
i = 1;
while (i <= _local1.nbscores) {
_local2.jeu.tableau_scores.tableau.htmlText = _local2.jeu.tableau_scores.tableau.htmlText + (((((i + ". ") + _local1["login" + i]) + " ") + _local1["score" + i]) + "<br>");
i++;
}
}
var c = new LoadVars();
c.onLoad = showContent;
c.score = _root.points;
stop();