Frame 1
var son_bouteille = this.createEmptyMovieClip("son_bouteille", this.getNextHighestDepth());
var sonbouteille = new Sound(son_bouteille);
if (volumeMaitre == undefined) {
volumeMaitre = 1;
}
sonbouteille.attachSound("eclate.aif");
sonbouteille.setVolume(volumeMaitre * 40);
sonriviere.setVolume(volumeMaitre * volumeriviere);
fscommand ("showmenu", false);
fscommand ("allowscale", false);
stop();
Frame 2
sonbouteille.start();
Frame 34
var son_zik = this.createEmptyMovieClip("son_zik", this.getNextHighestDepth());
var sonzik = new Sound(son_zik);
sonzik.attachSound("zik");
sonzik.setVolume(volumeMaitre * 100);
sonzik.start();
Instance of Symbol 84 MovieClip in Frame 34
on (press) {
getURL ("http://www.cowboystown.com");
}
Frame 43
stop();
Frame 54
function trigPag() {
sonpag.setVolume(volumeMaitre * volumepag);
sonpag.start();
}
function trigrire() {
sonrire.setVolume(volumeMaitre * volumerire);
sonrire.start();
}
function trigeau() {
soneau.setVolume(volumeMaitre * volumeeau);
soneau.start();
}
function trigetoile(quel) {
sonetoile = _root["sonetoile" + quel];
sonetoile.setVolume(volumeMaitre * volumeetoile);
sonetoile.start();
}
function trigcrash() {
soncrash.setVolume(volumeMaitre * volumecrash);
soncrash.start();
trigbulle(1);
soncris.setVolume(volumeMaitre * volumecris);
soncris.start();
}
function trigbulle(quel) {
if (quel == 1) {
interbulle = setInterval(bubbulle, 200);
} else {
clearInterval(interbulle);
}
}
function bubbulle() {
quellebulle = 1 + Math.round(Math.random() * 7);
mybulle = _root["sonbulle" + quellebulle];
mybulle.setPan((Math.random() * 200) - 100);
mybulle.setVolume(volumebulle * volumeMaitre);
mybulle.start();
}
function trigtambour(quel) {
if (quel == 1) {
intertambour = setInterval(tambtambour, 2000);
} else {
clearInterval(intertambour);
}
}
function tambtambour() {
sontambour.setVolume(volumetambour * volumeMaitre);
sontambour.start();
}
function MAJson() {
if (volumeMaitre == 1) {
volumeMaitre = 0;
HP.gotoAndStop(2);
} else {
volumeMaitre = 1;
HP.gotoAndStop(1);
}
sonriviere.setVolume(volumeMaitre * volumeriviere);
}
var son_riviere = this.createEmptyMovieClip("son_riviere", this.getNextHighestDepth());
var sonriviere = new Sound(son_riviere);
var son_pag = this.createEmptyMovieClip("son_pag", this.getNextHighestDepth());
var sonpag = new Sound(son_pag);
var son_rire = this.createEmptyMovieClip("son_rire", this.getNextHighestDepth());
var sonrire = new Sound(son_rire);
var son_eau = this.createEmptyMovieClip("son_eau", this.getNextHighestDepth());
var soneau = new Sound(son_eau);
var son_etoile = this.createEmptyMovieClip("son_etoile", this.getNextHighestDepth());
var sonetoile = new Sound(son_etoile);
var sonetoile1 = new Sound(son_etoile);
var sonetoile2 = new Sound(son_etoile);
var son_crash = this.createEmptyMovieClip("son_crash", this.getNextHighestDepth());
var soncrash = new Sound(son_crash);
var son_cris = this.createEmptyMovieClip("son_cris", this.getNextHighestDepth());
var soncris = new Sound(son_cris);
var son_bulle1 = this.createEmptyMovieClip("son_bulle1", this.getNextHighestDepth());
var sonbulle1 = new Sound(son_bulle1);
var son_bulle2 = this.createEmptyMovieClip("son_bulle2", this.getNextHighestDepth());
var sonbulle2 = new Sound(son_bulle2);
var son_bulle3 = this.createEmptyMovieClip("son_bulle3", this.getNextHighestDepth());
var sonbulle3 = new Sound(son_bulle3);
var son_bulle4 = this.createEmptyMovieClip("son_bulle4", this.getNextHighestDepth());
var sonbulle4 = new Sound(son_bulle4);
var son_bulle5 = this.createEmptyMovieClip("son_bulle5", this.getNextHighestDepth());
var sonbulle5 = new Sound(son_bulle5);
var son_bulle6 = this.createEmptyMovieClip("son_bulle6", this.getNextHighestDepth());
var sonbulle6 = new Sound(son_bulle6);
var son_bulle7 = this.createEmptyMovieClip("son_bulle7", this.getNextHighestDepth());
var sonbulle7 = new Sound(son_bulle7);
var son_bulle8 = this.createEmptyMovieClip("son_bulle8", this.getNextHighestDepth());
var sonbulle8 = new Sound(son_bulle8);
var son_tambour = this.createEmptyMovieClip("son_tambour", this.getNextHighestDepth());
var sontambour = new Sound(son_tambour);
var volumeriviere = 15;
var volumepag = 30;
var volumerire = 30;
var volumeeau = 30;
var volumecrash = 30;
var volumecris = 40;
var volumeetoile = 100;
var volumebulle = 40;
var volumetambour = 30;
sonpag.attachSound("page");
sonrire.attachSound("rire");
soneau.attachSound("eau");
sonetoile1.attachSound("etoile");
sonetoile2.attachSound("bonus2");
soncrash.attachSound("crash");
sontambour.attachSound("tambour");
soncris.attachSound("cris");
sonbulle1.attachSound("bulles1.aif");
sonbulle2.attachSound("bulles2.aif");
sonbulle3.attachSound("bulles3.aif");
sonbulle4.attachSound("bulles4.aif");
sonbulle5.attachSound("bulles5.aif");
sonbulle6.attachSound("bulles6.aif");
sonbulle7.attachSound("bulles7.aif");
sonbulle8.attachSound("bulles8.aif");
if (etat == undefined) {
var volumeMaitre = 1;
sonriviere.attachSound("riviereGen");
sonriviere.setVolume(volumeMaitre * volumeriviere);
sonriviere.start(0, 50000);
etat = 1;
}
stop();
var score = 0;
var niveau_actu = 1;
var niveau_suivant = 2;
var nb_bonus_max;
var nb_bonus;
var arr_pts;
var vitesse = 7;
var score_final;
var nb_ecarts_max = 3;
var nb_ecarts = nb_ecarts_max;
var inter;
Instance of Symbol 125 MovieClip "HP" in Frame 54
on (release) {
_root.MAJson();
}
Frame 55
POLY_BEZIER = function (t_pt, epaisseur, couleur) {
mc_terrain.clear();
var _local1 = t_pt;
var _local5;
var _local4;
var _local2 = 0;
var _local7 = (_local1[0] + _local1[2]) / 2;
var _local6 = (_local1[1] + _local1[3]) / 2;
var _local3 = [0, 0];
_local2 = 2;
while (_local2 < (_local1.length - 2)) {
_local5 = (_local1[_local2 + 0] + _local1[_local2 + 2]) / 2;
_local4 = (_local1[_local2 + 1] + _local1[_local2 + 3]) / 2;
_local3.push(_local5, _local4);
_local2 = _local2 + 2;
}
mc_terrain.moveTo(_local7, _local6);
mc_terrain.lineStyle(epaisseur, couleur, 100);
_local2 = 0;
_local2 = 2;
while (_local2 < (_local1.length - 2)) {
mc_terrain.curveTo(_local1[_local2], _local1[_local2 + 1], _local3[_local2], _local3[_local2 + 1]);
_local2 = _local2 + 2;
}
updateAfterEvent();
};
_root.passage_niveau = 0;
var debut_niveau = 1;
initialiser = function () {
trace("initialiser");
initialiser_niveau();
arr_pts = new Array();
arr_pts.push(-275, Stage.height / 2);
i = 0;
while (i < 12) {
arr_pts.push((100 * i) - 275, Stage.height / 2);
trace((100 * i) - 275);
i++;
}
arr_pts.push(925, Stage.height / 2);
arr_pts.push(1025, Stage.height / 2);
tracer();
_root.debut_niveau = 0;
inter = setInterval(this, "enter_frame", 24);
};
tracer = function () {
var _local2 = 4;
while (_local2 <= 17) {
arr_pts[_local2] = arr_pts[_local2] - vitesse;
_local2 = _local2 + 2;
}
if (arr_pts[4] < -275) {
arr_pts.splice(4, 2);
arr_pts.pop();
arr_pts.pop();
arr_pts.pop();
arr_pts.pop();
arr_pts.push(825, ((Stage.height / 2) + (Math.random() * 100)) - 50);
arr_pts.push(925, Stage.height / 2);
arr_pts.push(1025, Stage.height / 2);
nb_ecarts--;
if (nb_ecarts == 0) {
creer_item("obstacle");
nb_ecarts = nb_ecarts_max;
} else if (nb_bonus >= nb_bonus_max) {
initialiser_niveau();
} else {
nb_bonus++;
creer_item("bonus");
}
}
_root.POLY_BEZIER(arr_pts, 300, 26265);
};
var arr_obstacles = new Array();
var no_obstacle = -1;
creer_item = function (s) {
no_obstacle++;
if (no_obstacle >= 10) {
no_obstacle = 0;
}
trace("creer_obstacle no " + no_obstacle);
arr_obstacles.push([no_obstacle, 825]);
if (s == "obstacle") {
this.attachMovie("mc_obstacles", "mc_obstacle_" + no_obstacle, 1000 + no_obstacle);
eval ("mc_obstacle_" + no_obstacle).type = "obstacle";
} else {
proba = Math.random() * 100;
if (proba <= 1) {
this.attachMovie("mc_bonus_100", "mc_obstacle_" + no_obstacle, 1000 + no_obstacle);
eval ("mc_obstacle_" + no_obstacle).type = "bonus_100";
} else {
if (proba <= 50) {
montagne_haut._x = montagne_haut._x0;
montagne_haut2._x = montagne_haut2.x0;
montagne_bas._x = montagne_bas._x0;
montagne_bas2._x = montagne_bas2._x0;
}
this.attachMovie("mc_bonus", "mc_obstacle_" + no_obstacle, 1000 + no_obstacle);
eval ("mc_obstacle_" + no_obstacle).type = "bonus";
}
}
eval ("mc_obstacle_" + no_obstacle)._x = 825;
if (arr_pts[arr_pts.length - 5] > arr_pts[arr_pts.length - 7]) {
eval ("mc_obstacle_" + no_obstacle)._y = arr_pts[arr_pts.length - 7] + ((arr_pts[arr_pts.length - 5] - arr_pts[arr_pts.length - 7]) / 2);
} else {
eval ("mc_obstacle_" + no_obstacle)._y = arr_pts[arr_pts.length - 5] + ((arr_pts[arr_pts.length - 7] - arr_pts[arr_pts.length - 5]) / 2);
}
var n = (no_obstacle - 1);
if (n == -1) {
n = 10;
}
if (eval ("mc_obstacle_" + no_obstacle).hitTest(eval ("mc_obstacle_" + n)) or (!mc_terrain.hitTest(eval ("mc_obstacle_" + no_obstacle)._x, eval ("mc_obstacle_" + no_obstacle)._y, true))) {
trace("REMOVE");
eval ("mc_obstacle_" + no_obstacle).removeMovieClip();
}
};
deplacer_items = function () {
var i = 0;
while (i < arr_obstacles.length) {
arr_obstacles[i][1] = arr_obstacles[i][1] - vitesse;
eval ("mc_obstacle_" + arr_obstacles[i][0])._x = arr_obstacles[i][1];
if (eval ("mc_obstacle_" + arr_obstacles[i][0]).collision.hitTest(mc_perso.canoe.barque)) {
gerer_collision(eval ("mc_obstacle_" + arr_obstacles[i][0]).type);
if ((eval ("mc_obstacle_" + arr_obstacles[i][0]).type == "bonus") or (eval ("mc_obstacle_" + arr_obstacles[i][0]).type == "bonus_100")) {
eval ("mc_obstacle_" + arr_obstacles[i][0]).gotoAndPlay(2);
}
}
i++;
}
if (arr_obstacles[0][1] < -275) {
eval ("mc_obstacle_" + arr_obstacles[0][0]).removeMovieClip();
arr_obstacles.splice(0, 1);
}
};
var y_perso = 150;
gerer_perso = function () {
if (etat_mouse) {
y_perso = y_perso - (3 + ((_root.vitesse - 5) / 2));
} else {
y_perso = y_perso + (4 + ((_root.vitesse - 5) / 2));
}
mc_perso._y = y_perso;
};
var etat_mouse = false;
var ecoute_mouse = new Object();
ecoute_mouse.onMouseDown = function () {
etat_mouse = true;
mc_perso.canoe.play();
mc_perso.gotoAndPlay(3);
};
ecoute_mouse.onMouseUp = function () {
etat_mouse = false;
mc_perso.canoe.stop();
mc_perso.gotoAndPlay(8);
};
Mouse.addListener(ecoute_mouse);
initialiser_niveau = function () {
_root.montagne_haut._x0 = _root.montagne_haut._x;
_root.montagne_haut2._x0 = _root.montagne_haut2._x;
_root.montagne_bas._x0 = _root.montagne_bas._x;
_root.montagne_bas2._x0 = _root.montagne_bas2._x;
var i = 0;
while (i < arr_obstacles.length) {
eval ("mc_obstacle_" + arr_obstacles[i][0]).removeMovieClip();
i++;
}
if (niveau_actu < 11) {
nb_bonus_max = (40 + niveau_actu) + Math.round(Math.random() * (niveau_actu + 2));
trace("nb_bonus_max = " + nb_bonus_max);
nb_bonus = 0;
if (_root.debut_niveau != 1) {
_root.passage_niveau = 1;
niveau_actu++;
vitesse = vitesse + 1;
gotoAndPlay (93);
}
} else {
_root.passage_niveau = 1;
delete this.onEnterFrame;
score = score + 100;
score_final = "Tu as rejoint Grisou !";
gotoAndStop (266);
}
};
var b_depart = false;
enter_frame = function () {
tracer();
deplacer_items();
gerer_perso();
if ((!mc_terrain.hitTest(mc_perso._x, mc_perso._y, true)) and b_depart) {
trace((("collision : " + mc_perso._x) + ",") + mc_perso._y);
gerer_collision("terrain");
} else if ((!mc_terrain.hitTest(mc_perso._x, mc_perso._y, true)) and (!b_depart)) {
b_depart = true;
}
};
gerer_collision = function (s) {
trace("collision avec " + s);
if (s == "bonus") {
} else if (s == "bonus_100") {
} else {
clearInterval(inter);
if (score > 1) {
var _local3 = " points !";
} else {
var _local3 = " point !";
}
score_final = score + _local3;
if (_root.passage_niveau != 1) {
if (s == "terrain") {
gotoAndPlay (143);
} else {
gotoAndPlay (143);
}
}
}
};
initialiser();
Frame 85
var i = 0;
while (i < arr_obstacles.length) {
eval ("mc_obstacle_" + arr_obstacles[i][0]).removeMovieClip();
i++;
}
if (niveau_actu == 11) {
gotoAndStop (55);
}
Frame 92
_root.trigeau();
_root.passage_niveau = 1;
Frame 113
_root.trigeau();
stop();
var i = 0;
while (i < arr_obstacles.length) {
eval ("mc_obstacle_" + arr_obstacles[i][0]).removeMovieClip();
i++;
}
Frame 128
gotoAndStop (55);
Frame 133
stop();
Frame 143
sonriviere.setVolume((volumeMaitre * volumeriviere) * 3);
var i = 0;
while (i < arr_obstacles.length) {
eval ("mc_obstacle_" + arr_obstacles[i][0]).removeMovieClip();
i++;
}
Frame 203
stop();
Frame 213
stop();
_root.passage_niveau = 1;
Symbol 27 MovieClip Frame 21
gotoAndPlay (1);
Symbol 41 MovieClip [mc_bonus_100] Frame 1
stop();
Symbol 41 MovieClip [mc_bonus_100] Frame 2
_root.trigetoile(2);
Symbol 41 MovieClip [mc_bonus_100] Frame 6
_root.score = _root.score + 100;
Symbol 41 MovieClip [mc_bonus_100] Frame 15
stop();
Symbol 44 MovieClip [mc_bonus] Frame 1
stop();
Symbol 44 MovieClip [mc_bonus] Frame 2
_root.trigetoile(1);
Symbol 44 MovieClip [mc_bonus] Frame 6
_root.score = _root.score + 10;
Symbol 44 MovieClip [mc_bonus] Frame 15
stop();
Symbol 47 MovieClip Frame 1
pc = (_parent.getBytesLoaded() * 100) / _parent.getBytesTotal();
_parent.barre_mc.fondbarre_mc._xscale = pc;
if (pc == 100) {
_parent.play();
}
_parent.barre_mc.pc_txt.text = Math.round(pc) + " %";
Symbol 65 MovieClip Frame 15
gotoAndStop (1);
Symbol 69 Button
on (press) {
getURL ("http://www.jevida.com");
}
Symbol 80 MovieClip Frame 80
stop();
this._parent.play();
Symbol 84 MovieClip Frame 30
stop();
Symbol 89 Button
on (release) {
getURL ("http://www.cowboystown.com", "_blank");
}
Symbol 102 MovieClip Frame 23
if (Math.random() > 0.8) {
_root.trigrire();
}
Symbol 102 MovieClip Frame 60
gotoAndPlay (1);
Symbol 106 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 5
stop();
Symbol 109 MovieClip Frame 1
stop();
Symbol 109 MovieClip Frame 5
stop();
Instance of Symbol 106 MovieClip in Symbol 115 MovieClip Frame 1
on (release) {
_root.gotoAndStop(133);
}
on (rollOver) {
this.gotoAndPlay(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 109 MovieClip in Symbol 115 MovieClip Frame 1
on (release) {
_root.trigeau();
_root.gotoAndStop(55);
this._parent.ai.gotoAndPlay(2);
}
on (rollOver) {
this.gotoAndPlay(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
Symbol 119 MovieClip Frame 1
stop();
Symbol 119 MovieClip Frame 40
this._parent.gotoAndStop(2);
Symbol 125 MovieClip Frame 1
stop();
Symbol 151 MovieClip Frame 11
_root.trigPag();
Symbol 152 MovieClip Frame 1
stop();
Instance of Symbol 151 MovieClip "canoe" in Symbol 152 MovieClip Frame 1
onClipEvent (load) {
this.stop();
}
Symbol 152 MovieClip Frame 2
stop();
Symbol 152 MovieClip Frame 7
stop();
Symbol 152 MovieClip Frame 13
gotoAndStop (2);
Symbol 160 MovieClip Frame 20
stop();
Symbol 171 Button
on (press) {
play();
}
Instance of Symbol 175 MovieClip in Symbol 184 MovieClip Frame 1
on (press) {
_root.gotoAndStop(54);
}
Symbol 184 MovieClip Frame 15
cano.play();
Symbol 184 MovieClip Frame 46
cano.stop();
Symbol 184 MovieClip Frame 75
gotoAndPlay (15);
Symbol 220 MovieClip Frame 2
_root.trigcrash();
Symbol 220 MovieClip Frame 121
gotoAndPlay (82);
Symbol 226 Button
on (press) {
_root.trigbulle(2);
_root.trigtambour(2);
_root.gotoAndPlay(1);
}
Instance of Symbol 224 MovieClip in Symbol 231 MovieClip Frame 1
on (press) {
this._parent._parent._parent._parent.gotoAndStop(1);
}
Symbol 232 MovieClip Frame 40
stop();
Symbol 248 MovieClip Frame 39
gotoAndPlay (19);
Symbol 252 MovieClip Frame 1
_root.trigeau();
_root.trigtambour(1);
Symbol 252 MovieClip Frame 17
_root.trigrire();
Symbol 252 MovieClip Frame 248
_root.trigrire();
Symbol 252 MovieClip Frame 440
_root.trigrire();
Symbol 252 MovieClip Frame 500
stop();