Section 1
//compteur_6 (StripMath_fla.compteur_6)
package StripMath_fla {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public dynamic class compteur_6 extends MovieClip {
public var tourn:MovieClip;
public var lbl:TextField;
public function compteur_6(){
addFrameScript(0, frame1);
}
public function updateframe(_arg1:Event):void{
var _local2:*;
_local2 = (60 - Math.floor((currentFrame / 12)));
lbl.text = _local2;
}
function frame1(){
addEventListener(Event.ENTER_FRAME, updateframe);
}
}
}//package StripMath_fla
Section 2
//MainTimeline (StripMath_fla.MainTimeline)
package StripMath_fla {
import flash.events.*;
import flash.display.*;
import flash.text.*;
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.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var Y0;
public var txtTxt;
public var Link:SimpleButton;
public var tcStop;
public var ecartY;
public var myCpt:MovieClip;
public var txt:TextField;
public var TC;
public var myScore:MovieClip;
public var rayY;
public var score:int;
public var btRep2:btRep;
public var btRep3:btRep;
public var btRep0:btRep;
public var btRep1:btRep;
public var btOK:SimpleButton;
public var tcGo;
public var lblQuestion:TextField;
public var myVid:MovieClip;
public var fautes;
public var linkFSG:SimpleButton;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
public function btDebut_Click(_arg1:MouseEvent){
btOK.removeEventListener(MouseEvent.CLICK, btDebut_Click);
gotoAndPlay(3);
}
public function loadProgress(_arg1:Event){
var _local2:int;
var _local3:int;
var _local4:int;
_local2 = this.root.loaderInfo.bytesLoaded;
_local3 = this.root.loaderInfo.bytesTotal;
_local4 = ((100 * _local2) / _local3);
txt.text = (("Please Wait: " + _local4) + "%");
if (_local2 >= _local3){
txt.text = "Click on the Start Button to play";
removeEventListener(Event.ENTER_FRAME, loadProgress);
btOK.visible = true;
};
}
function frame3(){
TC = new Array(85, 109, 134, 171, 201, 228);
tcGo = 1;
tcStop = (TC[0] - 1);
txtTxt = "Ready to Play?";
txt.text = "Get 16 answers right in 60 secondes and you'll get to see the bonus video";
}
function frame1(){
addEventListener(Event.ENTER_FRAME, loadProgress);
btOK.addEventListener(MouseEvent.CLICK, btDebut_Click);
btOK.visible = false;
linkFSG.addEventListener(MouseEvent.MOUSE_UP, linkFSGClick);
Link.addEventListener(MouseEvent.MOUSE_UP, LinkClick);
}
public function LinkClick(_arg1:MouseEvent){
var _local2:URLRequest;
_local2 = new URLRequest("http://www.uplay-istrip.com/");
navigateToURL(_local2, "_blank");
}
public function linkFSGClick(_arg1:MouseEvent){
var _local2:URLRequest;
_local2 = new URLRequest("http://www.free-strip-games.com/");
navigateToURL(_local2, "_blank");
}
public function btRepFausse_click(_arg1:MouseEvent){
fautes++;
if (fautes > 20){
perdu();
} else {
newQ();
};
}
public function btOK_Click(_arg1:MouseEvent){
myVid.removeEventListener(Event.ENTER_FRAME, videoEvent);
btOK.removeEventListener(MouseEvent.CLICK, btOK_Click);
myVid.stop();
this.gotoAndStop(5);
}
public function newQ(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:int;
var _local10:int;
_local1 = Math.floor((Math.random() * 20));
_local2 = Math.floor((Math.random() * 10));
_local3 = (Math.floor((Math.random() * 10)) + 1);
_local4 = (_local1 + (_local2 * _local3));
_local5 = 0;
do {
_local5 = (Math.floor((Math.random() * 10)) - 5);
} while (_local5 == 0);
_local6 = (_local4 + _local5);
do {
_local5 = ((_local4 + Math.floor((Math.random() * 10))) - 5);
} while ((((_local5 == _local4)) || ((_local5 == _local6))));
_local7 = _local5;
do {
_local5 = ((_local4 + Math.floor((Math.random() * 10))) - 5);
} while ((((((_local5 == _local4)) || ((_local5 == _local6)))) || ((_local5 == _local7))));
_local8 = _local5;
_local5 = Math.floor((Math.random() * 4));
btRep0.y = rayY[_local5];
do {
_local5 = Math.floor((Math.random() * 4));
} while (rayY[_local5] == btRep0.y);
btRep1.y = rayY[_local5];
_local9 = 0;
while (_local9 < 4) {
if (((!((rayY[_local9] == btRep0.y))) && (!((rayY[_local9] == btRep1.y))))){
btRep2.y = rayY[_local9];
break;
};
_local9++;
};
_local10 = 0;
while (_local10 < 4) {
if (((((!((rayY[_local10] == btRep0.y))) && (!((rayY[_local10] == btRep1.y))))) && (!((rayY[_local10] == btRep2.y))))){
btRep3.y = rayY[_local10];
break;
};
_local10++;
};
btRep0.lbl.text = _local4;
btRep1.lbl.text = _local6;
btRep2.lbl.text = _local7;
btRep3.lbl.text = _local8;
lblQuestion.text = (((((_local1 + " + ") + _local2) + " x ") + _local3) + " = ?");
}
function frame4(){
stop();
myVid.gotoAndPlay(tcGo);
myVid.addEventListener(Event.ENTER_FRAME, videoEvent);
btOK.addEventListener(MouseEvent.CLICK, btOK_Click);
}
public function newGame(){
btOK.visible = false;
score = 1;
fautes = 0;
myScore.gotoAndStop(0);
newQ();
myCpt.gotoAndPlay(0);
myCpt.addEventListener(Event.ENTER_FRAME, myCptEvent);
}
public function perdu(){
var _local1:*;
myCpt.stop();
myCpt.tourn.stop();
myCpt.removeEventListener(Event.ENTER_FRAME, myCptEvent);
btRep0.visible = (btRep1.visible = (btRep2.visible = (btRep3.visible = false)));
btOK.removeEventListener(MouseEvent.CLICK, btOK2_Click);
_local1 = Math.floor((score / 4));
if (_local1 > 4){
_local1 = 4;
};
tcGo = TC[_local1];
txt.text = "You loose";
btOK.visible = false;
tcStop = (TC[(_local1 + 1)] - 2);
txtTxt = "Play Again?";
gotoAndStop(4);
}
public function btRepBonne_click(_arg1:MouseEvent){
score++;
btRep0.visible = (btRep1.visible = (btRep2.visible = (btRep3.visible = true)));
myScore.gotoAndStop(score);
if (score == 17){
btRep0.visible = (btRep1.visible = (btRep2.visible = (btRep3.visible = false)));
btOK.visible = true;
lblQuestion.text = "You win!";
myCpt.stop();
myCpt.tourn.stop();
myCpt.removeEventListener(Event.ENTER_FRAME, myCptEvent);
} else {
newQ();
};
}
public function btOK2_Click(_arg1:MouseEvent){
btOK.removeEventListener(MouseEvent.CLICK, btOK2_Click);
tcGo = 228;
txt.text = "Bravo, you're good at Math";
btOK.visible = false;
tcStop = 658;
txtTxt = "Play Again?";
gotoAndStop(4);
}
function frame5(){
stop();
btRep0 = new btRep();
addChild(btRep0);
btRep1 = new btRep();
addChild(btRep1);
btRep2 = new btRep();
addChild(btRep2);
btRep3 = new btRep();
addChild(btRep3);
ecartY = 60;
Y0 = 139;
fautes = 0;
rayY = new Array(Y0, (Y0 + ecartY), (Y0 + (2 * ecartY)), (Y0 + (3 * ecartY)));
btRep0.x = (btRep1.x = (btRep2.x = (btRep3.x = 0x0200)));
btOK.addEventListener(MouseEvent.CLICK, btOK2_Click);
newGame();
btRep0.addEventListener(MouseEvent.CLICK, btRepBonne_click);
btRep1.addEventListener(MouseEvent.CLICK, btRepFausse_click);
btRep2.addEventListener(MouseEvent.CLICK, btRepFausse_click);
btRep3.addEventListener(MouseEvent.CLICK, btRepFausse_click);
btRep0.buttonMode = true;
btRep0.useHandCursor = true;
btRep0.mouseChildren = false;
btRep1.buttonMode = true;
btRep1.useHandCursor = true;
btRep1.mouseChildren = false;
btRep2.buttonMode = true;
btRep2.useHandCursor = true;
btRep2.mouseChildren = false;
btRep3.buttonMode = true;
btRep3.useHandCursor = true;
btRep3.mouseChildren = false;
}
public function videoEvent(_arg1:Event){
if (myVid.currentFrame >= tcStop){
myVid.stop();
myVid.removeEventListener(Event.ENTER_FRAME, videoEvent);
txt.text = txtTxt;
btOK.visible = true;
btOK.addEventListener(MouseEvent.CLICK, btOK_Click);
};
}
function frame2(){
stop();
}
public function myCptEvent(_arg1:Event){
if (myCpt.currentFrame >= 720){
perdu();
};
}
}
}//package StripMath_fla
Section 3
//btRep (btRep)
package {
import flash.display.*;
import flash.text.*;
public dynamic class btRep extends MovieClip {
public var lbl:TextField;
}
}//package