Section 1
//jeu_2 (Shifumi_fla.jeu_2)
package Shifumi_fla {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.media.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class jeu_2 extends MovieClip {
public var pointspc:int;
public var Result:TextField;
public var Start:SimpleButton;
public var StrVid;
public var TC;
public var video;
public var feuille:SimpleButton;
public var ciseaux:SimpleButton;
public var tableau;
public var res;
public var h1:H1;
public var h2:MovieClip;
public var h3:MovieClip;
public var h4:H4;
public var myTimer:Timer;
public var changementHabit;
public var ho:H0;
public var pierre:SimpleButton;
public var CacheS:MovieClip;
public var TCfin;
public var affBool:Boolean;
public var gameRunning:Boolean;
public var choix:String;
public var textMC:MovieClip;
public var TC0;
public var TC1;
public var TC3;
public var TC2;
public var TC4;
public var habit;
public var btOk:SimpleButton;
public var timerOK:Timer;
public var bonjour:Bonjour;
public function jeu_2(){
addFrameScript(0, frame1);
}
public function lanceWaiting(){
btOk.visible = false;
CacheS.visible = (Result.visible = (pierre.visible = (feuille.visible = (ciseaux.visible = true))));
Result.text = "MakE your choicE!";
res = "";
choix = tableau[Math.round((Math.random() * 2))];
ciseaux.enabled = true;
feuille.enabled = true;
pierre.enabled = true;
}
public function feuilleClick(_arg1:MouseEvent){
affBool = true;
pierre.visible = (feuille.visible = (ciseaux.visible = (CacheS.visible = (Result.visible = (btOk.visible = (pierre.enabled = (feuille.enabled = (ciseaux.enabled = false))))))));
if (choix == "Ciseaux"){
StrVid = "perdu";
TCfin = TC[habit][3];
video.gotoAndPlay((1 + TC[habit][2]));
} else {
if (choix == "Pierre"){
StrVid = "gagne";
video.gotoAndPlay((1 + TC[habit][5]));
TCfin = TC[habit][6];
} else {
if (choix == "Feuille"){
StrVid = "nul";
TCfin = TC[habit][9];
video.gotoAndPlay((1 + TC[habit][8]));
};
};
};
video.addEventListener(Event.ENTER_FRAME, listenerObject);
}
public function ciseauxClick(_arg1:MouseEvent){
affBool = true;
pierre.visible = (feuille.visible = (ciseaux.visible = (CacheS.visible = (Result.visible = (pierre.enabled = (feuille.enabled = (ciseaux.enabled = false)))))));
if (choix == "Ciseaux"){
StrVid = "nul";
TCfin = TC[habit][1];
video.gotoAndPlay((1 + TC[habit][0]));
} else {
if (choix == "Pierre"){
StrVid = "perdu";
TCfin = TC[habit][4];
video.gotoAndPlay((1 + TC[habit][3]));
} else {
if (choix == "Feuille"){
StrVid = "gagne";
TCfin = TC[habit][7];
video.gotoAndPlay((1 + TC[habit][6]));
};
};
};
video.addEventListener(Event.ENTER_FRAME, listenerObject);
}
public function btOkClick(_arg1:MouseEvent){
btOk.visible = false;
startGame();
}
function frame1(){
gameRunning = false;
pointspc = 0;
StrVid = "bonjour";
res = "";
Start.addEventListener(MouseEvent.MOUSE_UP, Start_Click);
stop();
bonjour.stop();
ho.stop();
h1.stop();
h2.stop();
h3.stop();
h4.stop();
changementHabit = 0;
habit = 0;
btOk.addEventListener(MouseEvent.MOUSE_UP, btOkClick);
btOk.addEventListener(MouseEvent.MOUSE_UP, btOkClick);
pierre.addEventListener(MouseEvent.MOUSE_UP, pierreClick);
feuille.addEventListener(MouseEvent.MOUSE_UP, feuilleClick);
ciseaux.addEventListener(MouseEvent.MOUSE_UP, ciseauxClick);
TC0 = new Array(0, 25, 45, 65, 85, 104, 125, 145, 166, 187, 206, 227, 351);
TC1 = new Array(0, 25, 49, 71, 91, 114, 135, 157, 183, 209, 0x0101, 488, 733);
TC2 = new Array(0, 22, 43, 66, 86, 105, 127, 148, 168, 186, 225, 458, 737);
TC3 = new Array(0, 19, 29, 48, 66, 85, 105, 124, 142, 158, 192, 422, 704);
TC4 = new Array(0, 20, 39, 59, 80, 101, 119, 137, 157, 178, 201, 381, 529);
TC = new Array(TC0, TC1, TC2, TC3, TC4);
TCfin = 0;
tableau = new Array("Pierre", "Feuille", "Ciseaux");
choix = tableau[Math.round(((Math.random() * this.length) - 0.5))];
affBool = false;
myTimer = new Timer(900);
timerOK = new Timer(1500);
myTimer.addEventListener(TimerEvent.TIMER, timer_Tick);
timerOK.addEventListener(TimerEvent.TIMER, timerOK_Tick);
}
public function timer_Tick(_arg1:TimerEvent){
myTimer.stop();
if (affBool){
affBool = false;
timerOK.start();
CacheS.visible = (Result.visible = true);
};
}
public function videoplayNew(_arg1){
video = _arg1;
_arg1.visible = true;
video.gotoAndStop(0);
video.visible = true;
video.addEventListener(Event.ENTER_FRAME, listenerObject);
}
public function listenerObject(_arg1:Event){
if (StrVid == "bonjour"){
if (bonjour.currentFrame >= 56){
bonjour.stop();
lanceWaiting();
bonjour.removeEventListener(Event.ENTER_FRAME, listenerObject);
videoplayNew(ho);
bonjour.visible = (h1.visible = (h2.visible = (h3.visible = (h4.visible = false))));
setChildIndex(ho, 1);
};
} else {
if (video.currentFrame >= TCfin){
video.stop();
video.removeEventListener(Event.ENTER_FRAME, listenerObject);
if (StrVid != ""){
myTimer.start();
if (StrVid == "gagne"){
Result.text = "You win!";
};
if (StrVid == "nul"){
Result.text = "Draw!";
};
if (StrVid == "perdu"){
Result.text = "You loosE!";
};
} else {
CacheS.visible = (Result.visible = true);
if (changementHabit == 10){
Result.text = "You'vE won, I'm nakEd! Play again?";
btOk.visible = true;
} else {
if (changementHabit != 0){
myTimer.start();
video.visible = false;
habit = (habit + changementHabit);
if (habit == 0){
videoplayNew(ho);
bonjour.visible = (h1.visible = (h2.visible = (h3.visible = (h4.visible = false))));
setChildIndex(ho, 1);
};
if (habit == 1){
videoplayNew(h1);
bonjour.visible = (ho.visible = (h2.visible = (h3.visible = (h4.visible = false))));
setChildIndex(h1, 1);
};
if (habit == 2){
videoplayNew(h2);
bonjour.visible = (ho.visible = (h1.visible = (h3.visible = (h4.visible = false))));
setChildIndex(h2, 1);
};
if (habit == 3){
videoplayNew(h3);
bonjour.visible = (ho.visible = (h1.visible = (h2.visible = (h4.visible = false))));
setChildIndex(h3, 1);
};
if (habit == 4){
videoplayNew(h4);
bonjour.visible = (ho.visible = (h1.visible = (h2.visible = (h3.visible = false))));
setChildIndex(h4, 1);
};
changementHabit = 0;
};
lanceWaiting();
};
};
};
};
}
public function Start_Click(_arg1:MouseEvent){
if (!gameRunning){
startGame();
pointspc = 0;
Start.visible = false;
};
}
public function timerOK_Tick(_arg1:TimerEvent){
timerOK.stop();
CacheS.visible = (Result.visible = (btOk.visible = false));
if (StrVid == "gagne"){
video.gotoAndPlay((1 + TC[habit][11]));
TCfin = TC[habit][12];
if (habit != 4){
changementHabit = 1;
} else {
changementHabit = 10;
};
video.addEventListener(Event.ENTER_FRAME, listenerObject);
};
if (StrVid == "nul"){
video.gotoAndPlay((1 + TC[habit][9]));
TCfin = TC[habit][10];
video.addEventListener(Event.ENTER_FRAME, listenerObject);
};
if (StrVid == "perdu"){
video.gotoAndPlay((1 + TC[habit][10]));
TCfin = TC[habit][11];
if (habit != 0){
changementHabit = -1;
};
video.addEventListener(Event.ENTER_FRAME, listenerObject);
};
StrVid = "";
}
public function startGame(){
changementHabit = 0;
habit = 0;
textMC.visible = false;
gameRunning = true;
pierre.visible = false;
feuille.visible = false;
ciseaux.visible = false;
StrVid = "bonjour";
res = "";
CacheS.visible = (Result.visible = (btOk.visible = false));
videoplayNew(bonjour);
ho.visible = (h1.visible = (h2.visible = (h3.visible = (h4.visible = false))));
video.play();
}
public function pierreClick(_arg1:MouseEvent){
affBool = true;
pierre.visible = (feuille.visible = (ciseaux.visible = (CacheS.visible = (Result.visible = (btOk.visible = (pierre.enabled = (feuille.enabled = (ciseaux.enabled = false))))))));
if (choix == "Ciseaux"){
StrVid = "gagne";
TCfin = TC[habit][2];
video.gotoAndPlay((1 + TC[habit][1]));
} else {
if (choix == "Pierre"){
StrVid = "nul";
TCfin = TC[habit][5];
video.gotoAndPlay((1 + TC[habit][4]));
} else {
if (choix == "Feuille"){
StrVid = "perdu";
TCfin = TC[habit][8];
video.gotoAndPlay((1 + TC[habit][7]));
};
};
};
video.addEventListener(Event.ENTER_FRAME, listenerObject);
}
}
}//package Shifumi_fla
Section 2
//MainTimeline (Shifumi_fla.MainTimeline)
package Shifumi_fla {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
public dynamic class MainTimeline extends MovieClip {
public var progressText:TextField;
public var Link:SimpleButton;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2);
}
public function loadProgress(_arg1:Event){
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
_local2 = this.root.loaderInfo.bytesLoaded;
_local3 = this.root.loaderInfo.bytesTotal;
_local4 = (_local2 / 0x0400);
_local5 = (_local3 / 0x0400);
progressText.text = (((("Loading: " + _local4) + "/") + _local5) + "Kb");
if (_local2 >= _local3){
removeEventListener(Event.ENTER_FRAME, loadProgress);
progressText.visible = false;
gotoAndStop(3);
};
}
function frame1(){
addEventListener(Event.ENTER_FRAME, loadProgress);
Link.addEventListener(MouseEvent.MOUSE_UP, LinkClick);
}
function frame2(){
stop();
}
public function LinkClick(_arg1:MouseEvent){
var _local2:URLRequest;
_local2 = new URLRequest("http://www.free-strip-games.com");
navigateToURL(_local2, "_blank");
}
}
}//package Shifumi_fla
Section 3
//textMC_14 (Shifumi_fla.textMC_14)
package Shifumi_fla {
import flash.display.*;
public dynamic class textMC_14 extends MovieClip {
public function textMC_14(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Shifumi_fla
Section 4
//Bonjour (Bonjour)
package {
import flash.display.*;
public dynamic class Bonjour extends MovieClip {
}
}//package
Section 5
//H0 (H0)
package {
import flash.display.*;
public dynamic class H0 extends MovieClip {
}
}//package
Section 6
//H1 (H1)
package {
import flash.display.*;
public dynamic class H1 extends MovieClip {
}
}//package
Section 7
//H4 (H4)
package {
import flash.display.*;
public dynamic class H4 extends MovieClip {
}
}//package