Section 1
//compteur_6 (MathQuizAngelica_fla.compteur_6)
package MathQuizAngelica_fla {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public dynamic class compteur_6 extends MovieClip {
public var lbl:TextField;
public var tourn:MovieClip;
public function compteur_6(){
addFrameScript(0, frame1);
}
public function updateframe(_arg1:Event):void{
var _local2:* = (60 - Math.floor((currentFrame / 12)));
lbl.text = _local2;
}
function frame1(){
addEventListener(Event.ENTER_FRAME, updateframe);
}
}
}//package MathQuizAngelica_fla
Section 2
//Diaporama_9 (MathQuizAngelica_fla.Diaporama_9)
package MathQuizAngelica_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Diaporama_9 extends MovieClip {
public var btSuiv:SimpleButton;
public var btPrec:SimpleButton;
public function Diaporama_9(){
addFrameScript(0, frame1, 1, frame2, 15, frame16, 16, frame17);
}
public function btSuiv_Click(_arg1:MouseEvent){
gotoAndStop((this.currentFrame + 1));
}
public function btPrec_Click(_arg1:MouseEvent){
gotoAndStop((this.currentFrame - 1));
}
function frame1(){
stop();
btPrec.visible = false;
btSuiv.visible = true;
btSuiv.addEventListener(MouseEvent.CLICK, btSuiv_Click);
btPrec.addEventListener(MouseEvent.CLICK, btPrec_Click);
}
function frame2(){
btPrec.visible = true;
btSuiv.visible = true;
}
function frame16(){
btPrec.visible = true;
btSuiv.visible = true;
}
function frame17(){
btPrec.visible = true;
btSuiv.visible = false;
}
}
}//package MathQuizAngelica_fla
Section 3
//MainTimeline (MathQuizAngelica_fla.MainTimeline)
package MathQuizAngelica_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.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var myScore:MovieClip;
public var btOK:SimpleButton;
public var txt:TextField;
public var linkFSG:SimpleButton;
public var btStartAgain:SimpleButton;
public var txtFautes:TextField;
public var lblQuestion:TextField;
public var myCpt:MovieClip;
public var bullesQ:MovieClip;
public var Link:SimpleButton;
public var myVid:MovieClip;
public var TC;
public var nomAppli;
public var tcGo;
public var tcStop;
public var txtTxt;
public var win:Boolean;
public var score:int;
public var btRep0:btRep;
public var btRep1:btRep;
public var btRep2:btRep;
public var btRep3:btRep;
public var ecartY;
public var Y0;
public var fautes;
public var rayY;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
}
public function loadProgress(_arg1:Event){
var _local2:int = this.root.loaderInfo.bytesLoaded;
var _local3:int = this.root.loaderInfo.bytesTotal;
var _local4:int = ((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;
};
}
public function btDebut_Click(_arg1:MouseEvent){
btOK.removeEventListener(MouseEvent.CLICK, btDebut_Click);
gotoAndPlay(3);
}
public function linkFSGClick(_arg1:MouseEvent){
var _local2:URLRequest = new URLRequest("http://www.free-strip-games.com/");
navigateToURL(_local2, "_blank");
}
public function LinkClick(_arg1:MouseEvent){
var _local2:URLRequest = new URLRequest("http://www.uplay-istrip.com/");
navigateToURL(_local2, "_blank");
}
public function videoEvent(_arg1:Event){
if (myVid.currentFrame >= tcStop){
myVid.stop();
myVid.removeEventListener(Event.ENTER_FRAME, videoEvent);
txt.text = txtTxt;
btOK.visible = true;
};
}
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 btOKDiaporama_Click(_arg1:MouseEvent){
myVid.removeEventListener(Event.ENTER_FRAME, videoEvent);
btOK.removeEventListener(MouseEvent.CLICK, btOKDiaporama_Click);
myVid.stop();
this.gotoAndStop(6);
}
public function btOK2_Click(_arg1:MouseEvent){
btOK.removeEventListener(MouseEvent.CLICK, btOK2_Click);
tcGo = 297;
txt.text = "Bravo, you're good at math!";
btOK.visible = false;
win = true;
tcStop = 676;
txtTxt = "See the photos again?";
gotoAndStop(4);
}
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 myCptEvent(_arg1:Event){
if (myCpt.currentFrame >= 720){
perdu();
};
}
public function perdu(){
win = false;
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);
var _local1:* = Math.floor((score / 4));
if (_local1 > 4){
_local1 = 4;
};
tcGo = TC[_local1];
txt.text = "You lose";
btOK.visible = false;
tcStop = (TC[(_local1 + 1)] - 2);
txtTxt = "Play Again?";
gotoAndStop(4);
}
public function btRepBonne_click(_arg1:MouseEvent){
score++;
myScore.gotoAndStop(score);
if (score == 17){
bullesQ.visible = false;
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 {
btRep0.visible = (btRep1.visible = (btRep2.visible = (btRep3.visible = true)));
newQ();
};
}
public function btRepFausse_click(_arg1:MouseEvent){
fautes++;
txtFautes.text = fautes;
if (fautes > 9){
perdu();
} else {
newQ();
};
}
public function newQ(){
var _local1:* = Math.floor((Math.random() * 20));
var _local2:* = Math.floor((Math.random() * 10));
var _local3:* = (Math.floor((Math.random() * 10)) + 1);
var _local4:* = (_local1 + (_local2 * _local3));
var _local5:* = 0;
do {
_local5 = (Math.floor((Math.random() * 10)) - 5);
} while (_local5 == 0);
var _local6:* = (_local4 + _local5);
do {
_local5 = ((_local4 + Math.floor((Math.random() * 10))) - 5);
} while ((((_local5 == _local4)) || ((_local5 == _local6))));
var _local7:* = _local5;
do {
_local5 = ((_local4 + Math.floor((Math.random() * 10))) - 5);
} while ((((((_local5 == _local4)) || ((_local5 == _local6)))) || ((_local5 == _local7))));
var _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];
var _local9:int;
while (_local9 < 4) {
if (((!((rayY[_local9] == btRep0.y))) && (!((rayY[_local9] == btRep1.y))))){
btRep2.y = rayY[_local9];
break;
};
_local9++;
};
var _local10:int;
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) + ") = ?");
}
public function btStartAgain_Click(_arg1:MouseEvent){
btStartAgain.removeEventListener(MouseEvent.CLICK, btStartAgain_Click);
var _local2:URLRequest = new URLRequest(nomAppli);
var _local3:Loader = new Loader();
_local3.load(_local2);
addChild(_local3);
}
function frame1(){
txtFautes.text = "0";
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);
}
function frame2(){
stop();
}
function frame3(){
TC = new Array(54, 114, 165, 219, 245, 296);
nomAppli = "MathQuizAngelica.swf";
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";
win = false;
}
function frame4(){
stop();
myVid.gotoAndPlay(tcGo);
myVid.addEventListener(Event.ENTER_FRAME, videoEvent);
if (win){
btOK.addEventListener(MouseEvent.CLICK, btOKDiaporama_Click);
} else {
btOK.addEventListener(MouseEvent.CLICK, btOK_Click);
};
}
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;
}
function frame6(){
stop();
btStartAgain.addEventListener(MouseEvent.CLICK, btStartAgain_Click);
lblQuestion.text = "Click on Start to start again.";
}
}
}//package MathQuizAngelica_fla
Section 4
//btRep (btRep)
package {
import flash.display.*;
import flash.text.*;
public dynamic class btRep extends MovieClip {
public var lbl:TextField;
}
}//package