Frame 1
_accProps = new Object();
_accProps.silent = false;
Frame 2
stop();
Frame 3
function TraceCours() {
_root.mcTraceT.lineTo(dDay, (100 - dCours) * PasPx);
_global.Last = dCours;
if ((((3 + (dDay / StepD)) * 0.2) - Math.floor((3 + (dDay / StepD)) * 0.2)) == 0) {
if (Math.random() < 0.5) {
if (((dCours - dCoursVeille) / dCoursVeille) > (0.1 + (Math.random() * 0.1))) {
_global.dRate = dRate + 0.01;
EcritList("! +100 bp : Unexpected! Allan Bigspoon said 'I really do worry because we probably are in an economic bubble'");
if (!b_OutofTrade) {
SonRateSurprise.start();
}
} else if ((dRate > 0.0125) && (((dCours - dCoursVeille) / dCoursVeille) < (-0.1 - (Math.random() * 0.1)))) {
_global.dRate = dRate - 0.01;
EcritList("! -100 bp : Unexpected! Allan Bigspoon reassures the operators:'Despite my worries the market is not going to crash'");
if (!b_OutofTrade) {
SonRateSurprise.start();
}
}
}
_global.dCoursVeille = dCours;
}
if ((((dDay / StepD) / iTpsR) - Math.floor((dDay / StepD) / iTpsR)) == 0) {
_global.Effect_ar[0][0] = Math.round(((GLatent * 0.25) + (dRate * 10000)) * 0.002) * 500;
_global.Effect_ar[1][0] = Math.round(((GLatent * 0.25) + (10 * (MaxCours - dCours))) * 0.002) * 500;
_global.Effect_ar[2][0] = Math.round(((GLatent * 0.25) + (10 * (dCours - MinCours))) * 0.002) * 500;
if ((Math.random() < 0.5) && (b_OutofTrade == false)) {
SonRate.start();
}
if (GFerme > ((Math.abs(iQte) * dRef) / Levier)) {
tWinRate = ("You earn " + Math.floor((GFerme - Math.abs((iQte * dRef) / Levier)) * dRate)) + " $ from your cash";
EcritList(tWinRate);
_global.Gferme = _global.Gferme + ((GFerme - Math.abs((iQte * dRef) / Levier)) * dRate);
_global.GLatent = Gferme;
_root.tNom.text = Math.floor(GFerme - ((Math.abs(iQte) * dRef) / Levier));
_root.tPL.text = Math.floor(GLatent);
}
VarRate = (math.floor(((_global.SommeAchat + (((_global.dCours - 100) - ((((_global.dCroissance * 100) * dDay) / StepD) * 0.004)) * 1000)) / 100) / 25) * 25) / 10000;
if (VarRate > 0.001) {
if (math.random() < 0.2) {
VarRate = Math.min(0.02, VarRate);
tChangeRate = ("! +" + Math.round(VarRate * 10000)) + " bp : Allan Bigspoon president of the Central Bank said 'I'm worrying the market is getting out of hand'";
} else {
VarRate = Math.min(0.01, VarRate);
tChangeRate = ("! +" + Math.round(VarRate * 10000)) + " bp : Allan Bigspoon president of the Central Bank worries about the unexpected raise of the market";
}
} else if (VarRate < -0.001) {
if (math.random() < 0.2) {
VarRate = Math.max(-0.02, VarRate);
VarRate = Math.max(0.0025 - dRate, VarRate);
tChangeRate = ("! " + Math.round(VarRate * 10000)) + " bp : Allan Bigspoon president of the Central Bank said 'The lack of confidence of the market is irrational, it is a worry'";
} else {
VarRate = Math.max(-0.01, VarRate);
VarRate = Math.max(0.0025 - dRate, VarRate);
tChangeRate = ("! " + Math.round(VarRate * 10000)) + " bp : Allan Bigspoon president of the Central Bank worries about the greats amounts of savings";
}
} else {
tChangeRate = "! 0 bp : Allan Bigspoon president of the Central Bank declares 'Our enonomy is wealthy, whatever the operators are saying, but somehow, I do worry'";
}
_global.dRate = Math.max(0.0025, dRate + VarRate);
EcritList(tChangeRate);
}
ZoomCours();
}
function ZoomCours() {
if (b_OutofTrade == false) {
if (b_ZoomOn == false) {
_root.mcTraceT._height = Math.min(180, _root.mcTraceT._height);
_root.mcTraceT._width = Math.min(230, _root.mcTraceT._width);
_global.convert1CoursenPx = _root.mcTraceT._height / (MaxCours - MinCours);
_root.mcTraceT._y = 10 + ((MaxCours - 100) * convert1CoursenPx);
_root.mcTraceT._x = 20;
_root.mc_IndicWinLoss._y = 10 + ((MaxCours - dRef) * convert1CoursenPx);
} else {
if (dDay > (20 * StepD)) {
_root.mcTraceT._height = (0.1 * (MaxCours - MinCours)) * Math.min(180, _root.mcTraceT._height);
_root.mcTraceT._width = (0.05 * (dDay / StepD)) * Math.min(230, _root.mcTraceT._width);
}
_global.convert1CoursenPx = _root.mcTraceT._height / (MaxCours - MinCours);
_root.mcTraceT._y = 100 + ((dCours - 100) * convert1CoursenPx);
_root.mcTraceT._x = 180 - _root.mcTraceT._width;
_root.mc_IndicWinLoss._y = 100 + ((dCours - dRef) * convert1CoursenPx);
}
}
}
function enPos() {
if ((iQte * LastQte) > 0) {
if (Math.abs(iQte) < Math.abs(LastQte)) {
_global.GFerme = Math.floor((((LastQte - iQte) * (dCours - dRef)) + GFerme) * 100) * 0.01;
} else {
_global.dRef = ((dRef * LastQte) + (dCours * (iQte - LastQte))) / iQte;
}
_global.GLatent = Math.floor(((iQte * (dCours - dRef)) + GFerme) * 100) * 0.01;
} else if ((iQte * LastQte) < 0) {
_global.GFerme = Math.floor(((LastQte * (dCours - dRef)) + GFerme) * 100) * 0.01;
_global.dRef = dCours;
_global.GLatent = Math.floor(((iQte * (dCours - dRef)) + GFerme) * 100) * 0.01;
} else if ((iQte == 0) && (LastQte != 0)) {
_global.GFerme = Math.floor(((LastQte * (dCours - dRef)) + GFerme) * 100) * 0.01;
_global.GLatent = GFerme;
_global.dRef = 0;
} else if ((iQte != 0) && (LastQte == 0)) {
_global.dRef = dCours;
_global.GLatent = Math.floor(((iQte * (dCours - dRef)) + GFerme) * 100) * 0.01;
}
if (iQte < 0) {
_root.mc_IndicWinLoss._rotation = 180;
} else {
_root.mc_IndicWinLoss._rotation = 0;
}
_root.tQte.text = iQte;
_root.tRef.text = Math.floor(dRef * 100) * 0.01;
_root.tNom.text = Math.floor(GFerme - (Math.abs(iQte * dRef) / Levier));
_root.tPL.text = Math.floor(GLatent);
if ((GLatent <= 0) || (GFerme < 0)) {
gotoAndPlay (40);
} else if (GLatent > 4000000) {
_global.b_win = true;
gotoAndPlay (40);
}
setProperty(stressIndic, _yscale , Math.min(100, Math.abs((iQte * 20000) / (_global.StartMoney * _global.Levier)) * Math.abs(1 - (Glatent / (1 + Gferme)))));
if (iQte > 0) {
setProperty(_root.mc_CptLS.bar_S, _xscale , 0);
setProperty(_root.mc_CptLS.bar_L, _xscale , (((100 * Math.abs(iQte)) * dRef) / Gferme) / _global.Levier);
} else if (iQte < 0) {
setProperty(_root.mc_CptLS.bar_L, _xscale , 0);
setProperty(_root.mc_CptLS.bar_S, _xscale , (((100 * Math.abs(iQte)) * dRef) / Gferme) / _global.Levier);
} else {
setProperty(_root.mc_CptLS.bar_L, _xscale , 0);
setProperty(_root.mc_CptLS.bar_S, _xscale , 0);
}
_root.t_Levier.text = Math.round(((10 * Math.abs(iQte)) * dRef) / Gferme) * 0.1;
if (b_ZoomOn == false) {
_root.mc_IndicWinLoss._y = 10 + ((MaxCours - dRef) * convert1CoursenPx);
} else {
_root.mc_IndicWinLoss._y = 100 + ((dCours - dRef) * convert1CoursenPx);
}
}
function NoChange() {
if (iQte != 0) {
_global.GLatent = Math.floor(((iQte * (dCours - dRef)) + GFerme) * 100) * 0.01;
_root.tPL.text = Math.floor(GLatent);
setProperty(stressIndic, _yscale , Math.min(100, Math.abs((iQte * 20000) / (_global.StartMoney * _global.Levier)) * Math.abs(1 - (Glatent / (1 + Gferme)))));
if (GLatent <= 0) {
gotoAndPlay (40);
} else if (GLatent > 4000000) {
_global.b_win = true;
gotoAndPlay (40);
}
}
i = PrixStrip_ar.length - 1;
while (i > 0) {
if (GLatent > PrixStrip_ar[i][1]) {
break;
}
i--;
}
_global.i_StripNow = i;
_root.t_PLnextStrip.text = PrixStrip_ar[i + 1][1];
_root.mc_MiniStrip.gotoAndStop(PrixStrip_ar[i][0]);
}
function EcritList(t_TextList) {
t_TextList = (MonTps + " :") + t_TextList;
ilongMax = 70;
i = 0;
t_ar = new Array(3);
if (t_TextList.length < ilongMax) {
_root.tNews.addItemAt(0, t_TextList);
} else {
i_maCoupure = ilongMax;
t_ar[0] = t_TextList.substr(0, i_maCoupure);
i_maCoupure = t_ar[0].lastIndexOf(" ");
t_ar[0] = t_ar[0].substr(0, i_maCoupure) + "...";
_root.tNews.addItemAt(0, t_ar[0]);
if (t_TextList.length > ((ilongMax * 2) - 10)) {
t_ar[1] = t_TextList.substr(i_maCoupure, ilongMax);
i_maCoupure2 = t_ar[1].lastIndexOf(" ");
t_ar[1] = ("... " + t_TextList.substr(i_maCoupure, i_maCoupure2)) + "...";
_root.tNews.addItemAt(1, t_ar[1]);
i_maCoupure3 = t_ar[1].lastIndexOf(" ");
t_ar[2] = "..." + t_TextList.substr(i_maCoupure + i_maCoupure2, ilongMax);
_root.tNews.addItemAt(2, t_ar[2]);
} else {
t_ar[1] = "... " + t_TextList.substr(i_maCoupure, ilongMax);
_root.tNews.addItemAt(1, t_ar[1]);
}
}
}
function ajoutzero(num) {
if (num < 10) {
num = "0" + num;
}
return(num);
}
stop();
SonUp = new Sound();
Sondown = new Sound();
SonRate = new Sound();
SonMoan = new Sound();
SonEchec = new Sound();
SonRateSurprise = new Sound();
SonMusicStress = new Sound();
SonMusicStrip = new Sound();
SonEchec.attachSound("SonEchec");
SonMusicStrip.attachSound("SonMusicStrip");
SonMoan.attachSound("SonMoan");
SonUp.attachSound("SonFoule1");
SonDown.attachSound("SonFoule2");
SonRate.attachSound("SonFouleYeah");
SonRate.attachSound("SonRateSurprise");
SonMusicStress.attachSound("SonMusicStress");
SonRate.setVolume(30);
myStyleFormat = new FStyleFormat();
myStyleFormat.shadow = 255;
myStyleFormat.background = 32;
myStyleFormat.selection = 204;
myStyleFormat.scrollTrack = 68;
myStyleFormat.face = 102;
myStyleFormat.arrow = 16776960 /* 0xFFFF00 */;
myStyleFormat.textColor = 16777215 /* 0xFFFFFF */;
myStyleFormat.textFont = "_sans";
myStyleFormat.textSize = 10;
myStyleFormat.textLeftMargin = 0;
myStyleFormat.addListener(tNews);
Achat_Array = new Array();
Achat_Array[0] = {name:"fitness", price:500, period:10, buyed:false};
Achat_Array[1] = {name:"perfum", price:500, period:10, buyed:false};
Achat_Array[2] = {name:"pen", price:500, period:10, buyed:false};
Achat_Array[3] = {name:"watch", price:1000, period:10, buyed:false};
Achat_Array[4] = {name:"Beauty", price:1000, period:10, buyed:false};
Achat_Array[5] = {name:"smoking", price:1000, period:10, buyed:false};
Achat_Array[7] = {name:"Hifi", price:10000, period:50, buyed:false};
Achat_Array[8] = {name:"TV", price:10000, period:50, buyed:false};
Achat_Array[9] = {name:"signet ring", price:10000, period:50, buyed:false};
Achat_Array[10] = {name:"moto", price:50000, period:100, buyed:false};
Achat_Array[11] = {name:"car", price:50000, period:100, buyed:false};
Achat_Array[12] = {name:"house", price:50000, period:100, buyed:false};
Achat_Array[13] = {name:"island", price:100000, period:500, buyed:false};
NomSct_Ar = new Array("Acti", "Adob", "Alte", "Amaz", "Amer", "Apol", "Appl", "Ati ", "Auto", "Bea", "Biog", "Biom", "Broa", "Cisc", "Comc", "Dell", "Disc", "Ebay", "Echo", "Elec", "Eric", "Expe", "Fast", "Flex", "Goog", "Inte", "Joy", "Libe", "Marv", "Maxi", "Medi", "Micr", "Netw", "Orac", "Payc", "Pets", "Pixa", "Qual", "Red", "Sear", "Sigm", "Stap", "Star", "Sun", "Urba", "Veri", "Whol", "Xili", "Yaho");
Nom2Sct_Ar = new Array("a", "abs", "acor", "ar", "arch", "are", "ast", "bucks", "comm", "dcom", " Com", "desk", "dia", "ditors", "e", "ell", "en", "enal", "ene", "erse", "erson", "ess", "et", "hex", "ia", "ican", "ied", "isk", "itive", "ix", "k", "le", "lo", "mart", "nce", "ntec", "nx", "o", "ochip", "on", "ork", "osoft", "per", "ra", "rty", "sign", "sson", "star", "ter", "tronic", " Us", "us", "sion", " Vision", "yme");
NomMark1_Ar = new Array("American", "Burger", "Coca", "Dr.", "E-", "Fed", "Ford", "Grey", "Johnnie", "Krispy", "Land", "Louis", "Mac", "Mo\u00EBt", "New-York", "Oprah", "Phat", "Polo", "Range", "Red", "Rolls", "San", "Sean", "Ralph", "Tiffany", "USA", "Volkswagen", "Viagra", "Kodak", "MTV");
NomMark2_Ar = new Array(" Beetle", " Express", " Times", " Yankees", " Walker", " &Co.", " King", " Kreme", " Vuitton", " Winfrey", " Rover", " Royce", " Mustang", " Goose", " Rover", " Chandon", " Farm", "-Lauren", " John", " Cola", " Pepper", " Ex", " Donald's", " Bull", " Pellegrino", " Today", "-Bay");
NomMarkType_Ar = new Array("car", "drug", "X-rated magazine", "beauty product", "beverage", "drug", "food", "food", "beauty product", "beauty product", "car", "car", "car", "beverage", "car", "beverage", "food", " beauty product", "beverage", "beverage", "beverage", "car", "food", "beverage", "beverage", "X-rated magazine", "drug");
Talk_ar = new Array();
var Talk_ar = [["Talk about your Stress", "Talk about your favorite athlete , the winner of the last Marathon of New-Pork", "Show your muscles to impress her", "Talk about your favorite hard-rock band 'Metalicass'", "Have a small talk about the last Super Bowl", "Bragg about your body health"], ["Talk about your work on the stock market", "Talk about your favorite actress 'Uma Thrumen'", "Show your interrest for the everyday life .. of VIP peoples", "Talk about your favorite pop band 'Aphrodyte's Maid'", "Have a small talk about a popular TV-show", "Bragg about your nice ties"], ["Talk about the actual bullish compagnies", "Talk about your favorite movie 'Wall Stroke'", "Show your feeling .. for expensive paints", "Talk about your favorite classic band 'The Rolling's Balls'", "Have a small talk about the wheather", "Bragg about your Computer skills"]];
ItemPref_ar = new Array();
ItemPref_ar[0] = ["the Fitness Club 'Hard Muscle'", "the precious watch 'Rollass'", "the new Hifi from 'Allufsin'", "The powerfull 'Donkey Hardickson' motor bike"];
ItemPref_ar[1] = ["the U.V. Center 'All Brown'", "the fine perfume 'N\u00B05 from Cocock in the Channel'", "The T-V set from 'Penisonic'", "The new 'Crotshe' fast car"];
ItemPref_ar[2] = ["the upper-class pen 'Mont Bianca'", "the elegant costumes from 'Butto Boss'", "the signet ring from 'Tittany &Co'", "the house plan designed by 'Philippe Stroke'"];
_global.Effect_ar = [[500, 50], [500, 50], [500, 50]];
_global.dCours = 100;
_global.dCoursVeille = 100;
_global.dRef = 0;
_global.dDay = 0;
_global.MaxCours = 100;
_global.MinCours = 100;
_global.Last = 100;
_global.StepD = 5;
_global.Convert5px = 1;
_global.PasPx = 50;
_global.IntervCours = 1000;
_global.StartMoney = 2000;
_global.GFerme = StartMoney;
_global.GLatent = StartMoney;
_global.Levier = 5;
_global.iQte = 0;
_global.LastQte = 0;
_global.SommeAchat = 0;
_global.iTpsR = 30;
_global.dRate = 0.02 + (Math.floor(Math.random() * 5) * 0.01);
_global.dRateT0 = dRate;
_global.dCroissance = 0.03 + (Math.floor(Math.random() * 10) * 0.01);
_global.i_StressReliever = 0;
_global.i_StripNow = 0;
_global.PrixStrip_ar = [[3, 2000], [5, 2250], [7, 2500], [9, 2750], [11, 3000], [13, 4000], [15, 5000], [17, 6000], [19, 7000], [21, 10000], [23, 15000], [25, 20000], [27, 25000], [29, 30000], [31, 50000], [33, 100000], [35, 150000], [37, 200000], [39, 250000], [41, 500000], [43, 750000], [45, 1000000], [47, 1500000], [49, 2000000], [51, 2500000]];
_global.b_OutofTrade = false;
_global.b_ZoomOn = false;
_global.b_win = false;
setProperty(stressIndic, _yscale , 0);
setProperty(_root.mc_CptLS.bar_L, _xscale , 0);
setProperty(_root.mc_CptLS.bar_S, _xscale , 0);
setProperty(_root.mc_StressReliever.mc_IndicReliever, _yscale , 0);
_root.tQte.text = iQte;
_root.tRef.text = dRef;
_root.tNom.text = GFerme;
_root.tPL.text = GLatent;
_root.createEmptyMovieClip("mcTraceT", _root.Fond.getDepth() + 1);
with (_root.mcTraceT) {
_x = 20;
_y = 100;
lineStyle(1, 16711935, 100);
}
EcritList(" New York Stocks Exchange: OPEN");
obj = new Object();
_global.iDepthBandeau = mc_CacheCours.getDepth();
obj.construcCours = function () {
dNow = new Date();
maH = ajoutzero(dNow.getHours());
maM = ajoutzero(dNow.getMinutes());
maS = ajoutzero(dNow.getSeconds());
MonTps = (((maH + ":") + maM) + ":") + maS;
dAlea1 = Math.random();
if (Math.abs(dVar1) > (0.05 + (Math.random() * 0.01))) {
_global.r = r + 1;
_global.dVar2 = (dAlea1 - 0.5) + (dVar1 * Math.sin(r + (2 * Math.random())));
} else {
_global.dVar2 = dAlea1 - 0.5;
_global.r = 0;
}
if (Math.random() > 0.9) {
_global.dVar2 = dVar2 * 2;
s_NomSct = NomSct_Ar[math.floor(math.random() * NomSct_Ar.length)] + Nom2Sct_Ar[math.floor(math.random() * Nom2Sct_Ar.length)];
if (dVar2 < 0) {
if ((Math.random() < 0.5) && (b_OutofTrade == false)) {
SonDown.start();
}
_global.dVar2 = (-Math.abs(dVar2)) * ((1 + ((dRate - dRateT0) * 7)) - ((SommeAchat + (iQte * dCours)) / 50000000));
if (dVar2 < -0.4) {
EcritList(" Profit Warning on " + s_NomSct);
} else {
EcritList(" Profit lower than expected on " + s_NomSct);
}
} else {
if ((Math.random() < 0.5) && (b_OutofTrade == false)) {
SonUp.start(0, 2);
}
_global.dVar2 = dVar2 * ((1 - ((dRate - dRateT0) * 7)) + ((SommeAchat + (iQte * dCours)) / 50000000));
i_aleaProduct = math.floor(math.random() * NomMarkType_Ar.length);
if (dVar2 > 0.4) {
EcritList(((((" New " + NomMarkType_Ar[i_aleaProduct]) + " authorised : The ") + NomMark1_Ar[math.floor(math.random() * NomMark1_Ar.length)]) + " ") + NomMark2_Ar[i_aleaProduct]);
} else {
EcritList(" Profit as expected on " + s_NomSct);
}
}
} else {
_global.dVar2 = ((dVar2 - ((dRate - dRateT0) * 3)) + ((SommeAchat + (iQte * dCours)) / 100000000)) * 0.25;
}
_global.dVar1 = dVar2;
_global.dCours = Math.floor((dCours * (1 + (dVar2 * 0.1))) * 100) * 0.01;
if (dCours > 0) {
_global.MaxCours = Math.max(dCours, MaxCours);
_global.MinCours = Math.min(dCours, MinCours);
if (dVar2 >= 0) {
cp_tcours.tPer.htmlText = ("<font color='#009900'><b>+" + (Math.floor(dVar2 * 1000) / 100)) + "</b> %</font>";
} else {
cp_tcours.tPer.htmlText = ("<font color='#FF0000'><b>" + (Math.floor(dVar2 * 1000) / 100)) + "</b> %</font>";
}
cp_tcours.tCours.text = dCours;
cp_trate.tRate.text = (Math.round(dRate * 10000) * 0.01) + " %";
_global.dDay = dDay + StepD;
NoChange();
TraceCours();
if (b_OutofTrade) {
_global.i_StressReliever = Math.min(100, i_StressReliever + (_root.mc_Strip2._currentframe * 0.1));
_root.mc_StripHouse.mc_StressReliever.mc_IndicReliever._yscale = i_StressReliever;
} else if ((i_StressReliever > 0) && (_root.stressIndic._yscale > 20)) {
_global.i_StressReliever = Math.max(0, i_StressReliever - (_root.stressIndic._yscale * 0.01));
}
_root.mc_StressReliever.mc_IndicReliever._yscale = i_StressReliever;
} else {
_global.dCours = 0;
clearInterval(idIntervalleCours);
gotoAndPlay (40);
}
};
idIntervalleCours = setInterval(obj, "construcCours", IntervCours);
monEcouteur = new Object();
monEcouteur.onKeyDown = function () {
if (Key.isDown(13)) {
if ((_root.mc_Enter._currentframe == 2) && (b_OutofTrade == false)) {
_global.b_OutofTrade = true;
_root.mc_StripHouse.gotoAndPlay(7);
}
}
};
Key.addListener(monEcouteur);
Instance of Symbol 201 MovieClip "cp_tcours" in Frame 3
onClipEvent (enterFrame) {
speed = 10;
limit = 0;
this._x = this._x - speed;
if (this._x < limit) {
this._x = 300;
}
}
Instance of Symbol 204 MovieClip "cp_trate" in Frame 3
onClipEvent (enterFrame) {
speed = 2;
limit = 40;
this._x = this._x - speed;
if (this._x < limit) {
this._x = 280;
}
}
Instance of Symbol 110 MovieClip [FListBoxSymbol] "tNews" in Frame 3
//component parameters
onClipEvent (initialize) {
selectMultiple = false;
changeHandler = "";
}
Instance of Symbol 177 MovieClip "mc_Stress" in Frame 3
onClipEvent (enterFrame) {
if (b_OutofTrade == false) {
if (_root.stressIndic._yscale > 20) {
_root.mc_Enter.gotoAndStop(2);
if (b_SonStress) {
if (_root.SonMusicStress.duration == _root.SonMusicStress.position) {
_global.b_SonStress = false;
}
} else {
_global.b_SonStress = true;
_root.SonMusicStress.setVolume(100);
_root.SonMusicStress.start(7, 1);
}
if (i_StressReliever < 1) {
gotoAndPlay (2);
if (Math.random() < (0.01 * (_root.stressIndic._yscale - 20))) {
Mouse.hide();
duplicateMovieClip (_root.mc_MouseLure, "MouseFx", 1000);
setProperty(_root.MouseFx, _x , _root._xmouse + ((0.5 * _root.stressIndic._yscale) * (Math.random() - 0.5)));
setProperty(_root.MouseFx, _y , _root._ymouse + ((0.5 * _root.stressIndic._yscale) * (Math.random() - 0.5)));
} else {
removeMovieClip(_root.MouseFx);
Mouse.show();
}
}
} else {
removeMovieClip(_root.MouseFx);
Mouse.show();
_root.mc_Enter.gotoAndStop(1);
gotoAndStop (1);
}
} else {
gotoAndStop (1);
removeMovieClip(_root.MouseFx);
Mouse.show();
}
}
Frame 40
Mouse.show();
clearInterval(idIntervalleCours);
_root.mcTraceT.clear();
if (b_win == false) {
_root.t_end1.text = ((("Profit&Loss= " + Math.floor(GLatent)) + " $") + String.fromCharCode(13)) + "You broke!! The market had you.";
} else {
_root.t_end1.text = ("You win with " + Math.floor(GLatent)) + " $ of Profit&Loss. Time for you to enjoy some more strip action:";
}
stopAllSounds();
removeMovieClip(_root.mc_Strip2);
removeMovieClip(_root.MouseFx);
Frame 224
stop();
Symbol 10 MovieClip [FUIComponentSymbol] Frame 1
#initclip 3
function FUIComponentClass() {
this.init();
}
FUIComponentClass.prototype = new MovieClip();
FUIComponentClass.prototype.init = function () {
this.enable = true;
this.focused = false;
this.useHandCursor = false;
this._accImpl = new Object();
this._accImpl.stub = true;
this.styleTable = new Array();
if (_global.globalStyleFormat == undefined) {
_global.globalStyleFormat = new FStyleFormat();
globalStyleFormat.isGlobal = true;
_global._focusControl = new Object();
_global._focusControl.onSetFocus = function (oldFocus, newFocus) {
oldFocus.myOnKillFocus();
newFocus.myOnSetFocus();
};
Selection.addListener(_global._focusControl);
}
if (this._name != undefined) {
this._focusrect = false;
this.tabEnabled = true;
this.focusEnabled = true;
this.tabChildren = false;
this.tabFocused = true;
if (this.hostStyle == undefined) {
globalStyleFormat.addListener(this);
} else {
this.styleTable = this.hostStyle;
}
this.deadPreview._visible = false;
this.deadPreview._width = (this.deadPreview._height = 1);
this.methodTable = new Object();
this.keyListener = new Object();
this.keyListener.controller = this;
this.keyListener.onKeyDown = function () {
this.controller.myOnKeyDown();
};
this.keyListener.onKeyUp = function () {
this.controller.myOnKeyUp();
};
for (var i in this.styleFormat_prm) {
this.setStyleProperty(i, this.styleFormat_prm[i]);
}
}
};
FUIComponentClass.prototype.setEnabled = function (enabledFlag) {
this.enable = ((arguments.length > 0) ? (enabledFlag) : true);
this.tabEnabled = (this.focusEnabled = enabledFlag);
if ((!this.enable) && (this.focused)) {
Selection.setFocus(undefined);
}
};
FUIComponentClass.prototype.getEnabled = function () {
return(this.enable);
};
FUIComponentClass.prototype.setSize = function (w, h) {
this.width = w;
this.height = h;
this.focusRect.removeMovieClip();
};
FUIComponentClass.prototype.setChangeHandler = function (chng, obj) {
this.handlerObj = ((obj == undefined) ? (this._parent) : (obj));
this.changeHandler = chng;
};
FUIComponentClass.prototype.invalidate = function (methodName) {
this.methodTable[methodName] = true;
this.onEnterFrame = this.cleanUI;
};
FUIComponentClass.prototype.cleanUI = function () {
if (this.methodTable.setSize) {
this.setSize(this.width, this.height);
} else {
this.cleanUINotSize();
}
this.methodTable = new Object();
delete this.onEnterFrame;
};
FUIComponentClass.prototype.cleanUINotSize = function () {
for (var funct in this.methodTable) {
this[funct]();
}
};
FUIComponentClass.prototype.drawRect = function (x, y, w, h) {
var inner = this.styleTable.focusRectInner.value;
var outer = this.styleTable.focusRectOuter.value;
if (inner == undefined) {
inner = 16777215 /* 0xFFFFFF */;
}
if (outer == undefined) {
outer = 0;
}
this.createEmptyMovieClip("focusRect", 1000);
this.focusRect.controller = this;
this.focusRect.lineStyle(1, outer);
this.focusRect.moveTo(x, y);
this.focusRect.lineTo(x + w, y);
this.focusRect.lineTo(x + w, y + h);
this.focusRect.lineTo(x, y + h);
this.focusRect.lineTo(x, y);
this.focusRect.lineStyle(1, inner);
this.focusRect.moveTo(x + 1, y + 1);
this.focusRect.lineTo((x + w) - 1, y + 1);
this.focusRect.lineTo((x + w) - 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, y + 1);
};
FUIComponentClass.prototype.pressFocus = function () {
this.tabFocused = false;
this.focusRect.removeMovieClip();
Selection.setFocus(this);
};
FUIComponentClass.prototype.drawFocusRect = function () {
this.drawRect(-2, -2, this.width + 4, this.height + 4);
};
FUIComponentClass.prototype.myOnSetFocus = function () {
this.focused = true;
Key.addListener(this.keyListener);
if (this.tabFocused) {
this.drawFocusRect();
}
};
FUIComponentClass.prototype.myOnKillFocus = function () {
this.tabFocused = true;
this.focused = false;
this.focusRect.removeMovieClip();
Key.removeListener(this.keyListener);
};
FUIComponentClass.prototype.executeCallBack = function () {
this.handlerObj[this.changeHandler](this);
};
FUIComponentClass.prototype.updateStyleProperty = function (styleFormat, propName) {
this.setStyleProperty(propName, styleFormat[propName], styleFormat.isGlobal);
};
FUIComponentClass.prototype.setStyleProperty = function (propName, value, isGlobal) {
if (value == "") {
return(undefined);
}
var tmpValue = parseInt(value);
if (!isNaN(tmpValue)) {
value = tmpValue;
}
var global = ((arguments.length > 2) ? (isGlobal) : false);
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].useGlobal || (!global)) {
this.styleTable[propName].value = value;
if (this.setCustomStyleProperty(propName, value)) {
} else if (propName == "embedFonts") {
this.invalidate("setSize");
} else if (propName.subString(0, 4) == "text") {
if (this.textStyle == undefined) {
this.textStyle = new TextFormat();
}
var textProp = propName.subString(4, propName.length);
this.textStyle[textProp] = value;
this.invalidate("setSize");
} else {
for (var j in this.styleTable[propName].coloredMCs) {
var myColor = new Color(this.styleTable[propName].coloredMCs[j]);
if (this.styleTable[propName].value == undefined) {
var myTObj = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
myColor.setTransform(myTObj);
} else {
myColor.setRGB(value);
}
}
}
this.styleTable[propName].useGlobal = global;
}
};
FUIComponentClass.prototype.registerSkinElement = function (skinMCRef, propName) {
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].coloredMCs == undefined) {
this.styleTable[propName].coloredMCs = new Object();
}
this.styleTable[propName].coloredMCs[skinMCRef] = skinMCRef;
if (this.styleTable[propName].value != undefined) {
var myColor = new Color(skinMCRef);
myColor.setRGB(this.styleTable[propName].value);
}
};
_global.FStyleFormat = function () {
this.nonStyles = {listeners:true, isGlobal:true, isAStyle:true, addListener:true, removeListener:true, nonStyles:true, applyChanges:true};
this.listeners = new Object();
this.isGlobal = false;
if (arguments.length > 0) {
for (var i in arguments[0]) {
this[i] = arguments[0][i];
}
}
};
_global.FStyleFormat.prototype = new Object();
FStyleFormat.prototype.addListener = function () {
var arg = 0;
while (arg < arguments.length) {
var mcRef = arguments[arg];
this.listeners[arguments[arg]] = mcRef;
for (var i in this) {
if (this.isAStyle(i)) {
mcRef.updateStyleProperty(this, i.toString());
}
}
arg++;
}
};
FStyleFormat.prototype.removeListener = function (component) {
this.listeners[component] = undefined;
for (var prop in this) {
if (this.isAStyle(prop)) {
if (component.styleTable[prop].useGlobal == this.isGlobal) {
component.styleTable[prop].useGlobal = true;
var value = (this.isGlobal ? undefined : (globalStyleFormat[prop]));
component.setStyleProperty(prop, value, true);
}
}
}
};
FStyleFormat.prototype.applyChanges = function () {
var count = 0;
for (var i in this.listeners) {
var component = this.listeners[i];
if (arguments.length > 0) {
var j = 0;
while (j < arguments.length) {
if (this.isAStyle(arguments[j])) {
component.updateStyleProperty(this, arguments[j]);
}
j++;
}
} else {
for (var j in this) {
if (this.isAStyle(j)) {
component.updateStyleProperty(this, j.toString());
}
}
}
}
};
FStyleFormat.prototype.isAStyle = function (name) {
return((this.nonStyles[name] ? false : true));
};
#endinitclip
Symbol 23 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 33 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 42 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "foregroundDisabled");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 43 MovieClip [UpArrow] Frame 1
stop();
Symbol 43 MovieClip [UpArrow] Frame 2
stop();
Symbol 43 MovieClip [UpArrow] Frame 3
stop();
Symbol 50 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 57 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 62 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(highlight3D_mc, "highlight3D");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
Symbol 63 MovieClip [ScrollThumb] Frame 1
stop();
Symbol 71 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 79 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 87 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "foregroundDisabled");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 88 MovieClip [DownArrow] Frame 1
stop();
Symbol 88 MovieClip [DownArrow] Frame 2
stop();
Symbol 88 MovieClip [DownArrow] Frame 3
stop();
Symbol 91 MovieClip [FHighlightSymbol] Frame 1
var component = _parent.controller;
component.registerSkinElement(highlight_mc, "selection");
stop();
Symbol 91 MovieClip [FHighlightSymbol] Frame 2
component.registerSkinElement(highlight_mc2, "selectionDisabled");
stop();
Symbol 91 MovieClip [FHighlightSymbol] Frame 3
component.registerSkinElement(highlight_mc3, "selectionUnfocused");
stop();
Symbol 94 MovieClip [FLabelSymbol] Frame 1
#initclip 1
_global.FLabelClass = function () {
if (this.hostComponent == undefined) {
this.hostComponent = ((this._parent.controller == undefined) ? (this._parent) : (this._parent.controller));
}
if (this.customTextStyle == undefined) {
if (this.hostComponent.textStyle == undefined) {
this.hostComponent.textStyle = new TextFormat();
}
this.textStyle = this.hostComponent.textStyle;
this.enable = true;
}
};
FLabelClass.prototype = new MovieClip();
Object.registerClass("FLabelSymbol", FLabelClass);
FLabelClass.prototype.setLabel = function (label) {
var val = this.hostComponent.styleTable.embedFonts.value;
if (val != undefined) {
this.labelField.embedFonts = val;
}
this.labelField.setNewTextFormat(this.textStyle);
this.labelField.text = label;
this.labelField._height = this.labelField.textHeight + 2;
};
FLabelClass.prototype.setSize = function (width) {
this.labelField._width = width;
};
FLabelClass.prototype.setEnabled = function (enable) {
this.enable = enable;
var tmpColor = this.hostComponent.styleTable[(enable ? "textColor" : "textDisabled")].value;
if (tmpColor == undefined) {
tmpColor = (enable ? 0 : 8947848);
}
this.setColor(tmpColor);
};
FLabelClass.prototype.getLabel = function () {
return(this.labelField.text);
};
FLabelClass.prototype.setColor = function (col) {
this.labelField.textColor = col;
};
#endinitclip
Symbol 97 MovieClip Frame 1
var component = _parent;
component.registerSkinElement(track_mc, "scrollTrack");
Symbol 98 MovieClip [FScrollBarSymbol] Frame 1
#initclip 4
FScrollBarClass = function () {
if (this._height == 4) {
return(undefined);
}
this.init();
this.minPos = (this.maxPos = (this.pageSize = (this.largeScroll = 0)));
this.smallScroll = 1;
this.width = (this.horizontal ? (this._width) : (this._height));
this._xscale = (this._yscale = 100);
this.setScrollPosition(0);
this.tabEnabled = false;
if (this._targetInstanceName.length > 0) {
this.setScrollTarget(this._parent[this._targetInstanceName]);
}
this.tabChildren = false;
this.setSize(this.width);
};
FScrollBarClass.prototype = new FUIComponentClass();
FScrollBarClass.prototype.setHorizontal = function (flag) {
if (this.horizontal && (!flag)) {
this._xscale = 100;
this._rotation = 0;
} else if (flag && (!this.horizontal)) {
this._xscale = -100;
this._rotation = -90;
}
this.horizontal = flag;
};
FScrollBarClass.prototype.setScrollProperties = function (pSize, mnPos, mxPos) {
if (!this.enable) {
return(undefined);
}
this.pageSize = pSize;
this.minPos = Math.max(mnPos, 0);
this.maxPos = Math.max(mxPos, 0);
this.scrollPosition = Math.max(this.minPos, this.scrollPosition);
this.scrollPosition = Math.min(this.maxPos, this.scrollPosition);
if ((this.maxPos - this.minPos) <= 0) {
this.scrollThumb_mc.removeMovieClip();
this.upArrow_mc.gotoAndStop(3);
this.downArrow_mc.gotoAndStop(3);
this.downArrow_mc.onPress = (this.downArrow_mc.onRelease = (this.downArrow_mc.onDragOut = null));
this.upArrow_mc.onPress = (this.upArrow_mc.onRelease = (this.upArrow_mc.onDragOut = null));
this.scrollTrack_mc.onPress = (this.scrollTrack_mc.onRelease = null);
this.scrollTrack_mc.onDragOut = (this.scrollTrack_mc.onRollOut = null);
this.scrollTrack_mc.useHandCursor = false;
} else {
var tmp = this.getScrollPosition();
this.upArrow_mc.gotoAndStop(1);
this.downArrow_mc.gotoAndStop(1);
this.upArrow_mc.onPress = (this.upArrow_mc.onDragOver = this.startUpScroller);
this.upArrow_mc.onRelease = (this.upArrow_mc.onDragOut = this.stopScrolling);
this.downArrow_mc.onPress = (this.downArrow_mc.onDragOver = this.startDownScroller);
this.downArrow_mc.onRelease = (this.downArrow_mc.onDragOut = this.stopScrolling);
this.scrollTrack_mc.onPress = (this.scrollTrack_mc.onDragOver = this.startTrackScroller);
this.scrollTrack_mc.onRelease = this.stopScrolling;
this.scrollTrack_mc.onDragOut = this.stopScrolling;
this.scrollTrack_mc.onRollOut = this.stopScrolling;
this.scrollTrack_mc.useHandCursor = false;
this.attachMovie("ScrollThumb", "scrollThumb_mc", 3);
this.scrollThumb_mc._x = 0;
this.scrollThumb_mc._y = this.upArrow_mc._height;
this.scrollThumb_mc.onPress = this.startDragThumb;
this.scrollThumb_mc.controller = this;
this.scrollThumb_mc.onRelease = (this.scrollThumb_mc.onReleaseOutside = this.stopDragThumb);
this.scrollThumb_mc.useHandCursor = false;
this.thumbHeight = (this.pageSize / ((this.maxPos - this.minPos) + this.pageSize)) * this.trackSize;
this.thumbMid_mc = this.scrollThumb_mc.mc_sliderMid;
this.thumbTop_mc = this.scrollThumb_mc.mc_sliderTop;
this.thumbBot_mc = this.scrollThumb_mc.mc_sliderBot;
this.thumbHeight = Math.max(this.thumbHeight, 6);
this.midHeight = (this.thumbHeight - this.thumbTop_mc._height) - this.thumbBot_mc._height;
this.thumbMid_mc._yScale = (this.midHeight * 100) / this.thumbMid_mc._height;
this.thumbMid_mc._y = this.thumbTop_mc._height;
this.thumbBot_mc._y = this.thumbTop_mc._height + this.midHeight;
this.scrollTop = this.scrollThumb_mc._y;
this.trackHeight = this.trackSize - this.thumbHeight;
this.scrollBot = this.trackHeight + this.scrollTop;
tmp = Math.min(tmp, this.maxPos);
this.setScrollPosition(Math.max(tmp, this.minPos));
}
};
FScrollBarClass.prototype.getScrollPosition = function () {
return(this.scrollPosition);
};
FScrollBarClass.prototype.setScrollPosition = function (pos) {
this.scrollPosition = pos;
if (this.scrollThumb_mc != undefined) {
pos = Math.min(pos, this.maxPos);
pos = Math.max(pos, this.minPos);
}
this.scrollThumb_mc._y = (((pos - this.minPos) * this.trackHeight) / (this.maxPos - this.minPos)) + this.scrollTop;
this.executeCallBack();
};
FScrollBarClass.prototype.setLargeScroll = function (lScroll) {
this.largeScroll = lScroll;
};
FScrollBarClass.prototype.setSmallScroll = function (sScroll) {
this.smallScroll = sScroll;
};
FScrollBarClass.prototype.setEnabled = function (enabledFlag) {
var wasEnabled = this.enable;
if (enabledFlag && (!wasEnabled)) {
this.enable = enabledFlag;
if (this.textField != undefined) {
this.setScrollTarget(this.textField);
} else {
this.setScrollProperties(this.pageSize, this.cachedMinPos, this.cachedMaxPos);
this.setScrollPosition(this.cachedPos);
}
this.clickFilter = undefined;
} else if ((!enabledFlag) && (wasEnabled)) {
this.textField.removeListener(this);
this.cachedPos = this.getScrollPosition();
this.cachedMinPos = this.minPos;
this.cachedMaxPos = this.maxPos;
if (this.clickFilter == undefined) {
this.setScrollProperties(this.pageSize, 0, 0);
} else {
this.clickFilter = true;
}
this.enable = enabledFlag;
}
};
FScrollBarClass.prototype.setSize = function (hgt) {
if (this._height == 1) {
return(undefined);
}
this.width = hgt;
this.scrollTrack_mc._yscale = 100;
this.scrollTrack_mc._yscale = (100 * this.width) / this.scrollTrack_mc._height;
if (this.upArrow_mc == undefined) {
this.attachMovie("UpArrow", "upArrow_mc", 1);
this.attachMovie("DownArrow", "downArrow_mc", 2);
this.downArrow_mc.controller = (this.upArrow_mc.controller = this);
this.upArrow_mc.useHandCursor = (this.downArrow_mc.useHandCursor = false);
this.upArrow_mc._x = (this.upArrow_mc._y = 0);
this.downArrow_mc._x = 0;
}
this.scrollTrack_mc.controller = this;
this.downArrow_mc._y = this.width - this.downArrow_mc._height;
this.trackSize = this.width - (2 * this.downArrow_mc._height);
if (this.textField != undefined) {
this.onTextChanged();
} else {
this.setScrollProperties(this.pageSize, this.minPos, this.maxPos);
}
};
FScrollBarClass.prototype.scrollIt = function (inc, mode) {
var delt = this.smallScroll;
if (inc != "one") {
delt = ((this.largeScroll == 0) ? (this.pageSize) : (this.largeScroll));
}
var newPos = (this.getScrollPosition() + (mode * delt));
if (newPos > this.maxPos) {
newPos = this.maxPos;
} else if (newPos < this.minPos) {
newPos = this.minPos;
}
this.setScrollPosition(newPos);
};
FScrollBarClass.prototype.startDragThumb = function () {
this.lastY = this._ymouse;
this.onMouseMove = this.controller.dragThumb;
};
FScrollBarClass.prototype.dragThumb = function () {
this.scrollMove = this._ymouse - this.lastY;
this.scrollMove = this.scrollMove + this._y;
if (this.scrollMove < this.controller.scrollTop) {
this.scrollMove = this.controller.scrollTop;
} else if (this.scrollMove > this.controller.scrollBot) {
this.scrollMove = this.controller.scrollBot;
}
this._y = this.scrollMove;
var c = this.controller;
c.scrollPosition = Math.round(((c.maxPos - c.minPos) * (this._y - c.scrollTop)) / c.trackHeight) + c.minPos;
this.controller.isScrolling = true;
updateAfterEvent();
this.controller.executeCallBack();
};
FScrollBarClass.prototype.stopDragThumb = function () {
this.controller.isScrolling = false;
this.onMouseMove = null;
};
FScrollBarClass.prototype.startTrackScroller = function () {
this.controller.trackScroller();
this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "page", -1);
};
FScrollBarClass.prototype.scrollInterval = function (inc, mode) {
clearInterval(this.scrolling);
if (inc == "page") {
this.trackScroller();
} else {
this.scrollIt(inc, mode);
}
this.scrolling = setInterval(this, "scrollInterval", 35, inc, mode);
};
FScrollBarClass.prototype.trackScroller = function () {
if ((this.scrollThumb_mc._y + this.thumbHeight) < this._ymouse) {
this.scrollIt("page", 1);
} else if (this.scrollThumb_mc._y > this._ymouse) {
this.scrollIt("page", -1);
}
};
FScrollBarClass.prototype.stopScrolling = function () {
this.controller.downArrow_mc.gotoAndStop(1);
this.controller.upArrow_mc.gotoAndStop(1);
clearInterval(this.controller.scrolling);
};
FScrollBarClass.prototype.startUpScroller = function () {
this.controller.upArrow_mc.gotoAndStop(2);
this.controller.scrollIt("one", -1);
this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "one", -1);
};
FScrollBarClass.prototype.startDownScroller = function () {
this.controller.downArrow_mc.gotoAndStop(2);
this.controller.scrollIt("one", 1);
this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "one", 1);
};
FScrollBarClass.prototype.setScrollTarget = function (tF) {
if (tF == undefined) {
this.textField.removeListener(this);
delete this.textField[(this.horizontal ? "hScroller" : "vScroller")];
if ((this.textField.hScroller != undefined) && (this.textField.vScroller != undefined)) {
this.textField.unwatch("text");
this.textField.unwatch("htmltext");
}
}
this.textField = undefined;
if (!(tF instanceof TextField)) {
return(undefined);
}
this.textField = tF;
this.textField[(this.horizontal ? "hScroller" : "vScroller")] = this;
this.onTextChanged();
this.onChanged = function () {
this.onTextChanged();
};
this.onScroller = function () {
if (!this.isScrolling) {
if (!this.horizontal) {
this.setScrollPosition(this.textField.scroll);
} else {
this.setScrollPosition(this.textField.hscroll);
}
}
};
this.textField.addListener(this);
this.textField.watch("text", this.callback);
this.textField.watch("htmlText", this.callback);
};
FScrollBarClass.prototype.callback = function (prop, oldVal, newVal) {
clearInterval(this.hScroller.synchScroll);
clearInterval(this.vScroller.synchScroll);
this.hScroller.synchScroll = setInterval(this.hScroller, "onTextChanged", 50);
this.vScroller.synchScroll = setInterval(this.vScroller, "onTextChanged", 50);
return(newVal);
};
FScrollBarClass.prototype.onTextChanged = function () {
if ((!this.enable) || (this.textField == undefined)) {
return(undefined);
}
clearInterval(this.synchScroll);
if (this.horizontal) {
var pos = this.textField.hscroll;
this.setScrollProperties(this.textField._width, 0, this.textField.maxhscroll);
this.setScrollPosition(Math.min(pos, this.textField.maxhscroll));
} else {
var pos = this.textField.scroll;
var pageSize = (this.textField.bottomScroll - this.textField.scroll);
this.setScrollProperties(pageSize, 1, this.textField.maxscroll);
this.setScrollPosition(Math.min(pos, this.textField.maxscroll));
}
};
FScrollBarClass.prototype.executeCallBack = function () {
if (this.textField == undefined) {
super.executeCallBack();
} else if (this.horizontal) {
this.textField.hscroll = this.getScrollPosition();
} else {
this.textField.scroll = this.getScrollPosition();
}
};
Object.registerClass("FScrollBarSymbol", FScrollBarClass);
#endinitclip
Symbol 99 MovieClip [FListItemSymbol] Frame 1
#initclip 9
function FListItemClass() {
this.init();
}
FListItemClass.prototype = new FSelectableItemClass();
Object.registerClass("FListItemSymbol", FListItemClass);
#endinitclip
Symbol 100 MovieClip [DataProviderSymbol] Frame 1
#initclip 2
_global.DataProviderClass = function () {
this.init();
};
DataProviderClass.prototype.init = function () {
this.items = new Array();
this.uniqueID = 0;
this.views = new Array();
};
DataProviderClass.prototype.addView = function (viewRef) {
this.views.push(viewRef);
var eventObj = {event:"updateAll"};
viewRef.modelChanged(eventObj);
};
DataProviderClass.prototype.addItemAt = function (index, value) {
if (index < this.getLength()) {
this.items.splice(index, 0, "tmp");
}
this.items[index] = new Object();
if (typeof(value) == "object") {
this.items[index] = value;
} else {
this.items[index].label = value;
}
this.items[index].__ID__ = this.uniqueID++;
var eventObj = {event:"addRows", firstRow:index, lastRow:index};
this.updateViews(eventObj);
};
DataProviderClass.prototype.addItem = function (value) {
this.addItemAt(this.getLength(), value);
};
DataProviderClass.prototype.removeItemAt = function (index) {
var tmpItm = this.items[index];
this.items.splice(index, 1);
var eventObj = {event:"deleteRows", firstRow:index, lastRow:index};
this.updateViews(eventObj);
return(tmpItm);
};
DataProviderClass.prototype.removeAll = function () {
this.items = new Array();
this.updateViews({event:"deleteRows", firstRow:0, lastRow:this.getLength() - 1});
};
DataProviderClass.prototype.replaceItemAt = function (index, itemObj) {
if ((index < 0) || (index >= this.getLength())) {
return(undefined);
}
var tmpID = this.getItemID(index);
if (typeof(itemObj) == "object") {
this.items[index] = itemObj;
} else {
this.items[index].label = itemObj;
}
this.items[index].__ID__ = tmpID;
this.updateViews({event:"updateRows", firstRow:index, lastRow:index});
};
DataProviderClass.prototype.getLength = function () {
return(this.items.length);
};
DataProviderClass.prototype.getItemAt = function (index) {
return(this.items[index]);
};
DataProviderClass.prototype.getItemID = function (index) {
return(this.items[index].__ID__);
};
DataProviderClass.prototype.sortItemsBy = function (fieldName, order) {
this.items.sortOn(fieldName);
if (order == "DESC") {
this.items.reverse();
}
this.updateViews({event:"sort"});
};
DataProviderClass.prototype.updateViews = function (eventObj) {
var i = 0;
while (i < this.views.length) {
this.views[i].modelChanged(eventObj);
i++;
}
};
#endinitclip
Symbol 101 MovieClip [FSelectableItemSymbol] Frame 1
#initclip 6
function FSelectableItemClass() {
this.init();
}
FSelectableItemClass.prototype = new FUIComponentClass();
FSelectableItemClass.prototype.init = function () {
if (this._name != "itemAsset") {
this.highlighted = false;
this.layoutContent(100);
}
};
FSelectableItemClass.prototype.drawItem = function (itmObj, selected) {
this.displayContent(itmObj, selected);
if ((this.highlighted != selected) || ((this.controller.focused != this.oldFocus) && (selected))) {
this.setHighlighted(selected);
}
this.oldFocus = this.controller.focused;
};
FSelectableItemClass.prototype.setSize = function (width, height) {
var LOWEST_DEPTH = -16384;
this.width = width;
this.layoutContent(width);
this.attachMovie("FHighlightSymbol", "highlight_mc", LOWEST_DEPTH);
this.highlight_mc._x = 0.5;
this.highlight_mc._width = width - 0.5;
this.highlight_mc._height = height;
this.highlight_mc.controller = this;
this.highlight_mc._alpha = 0;
this.highlight_mc.trackAsMenu = true;
this.highlight_mc.onPress = function () {
if (this.controller.enable) {
this.controller.controller.clickHandler(this.controller.itemNum);
}
};
this.highlight_mc.onDragOver = function () {
if (this.controller.controller.focused) {
this.onPress();
}
};
this.highlight_mc.useHandCursor = false;
this.highlight_mc.trackAsMenu = true;
};
FSelectableItemClass.prototype.setEnabled = function (enabledFlag) {
this.enable = enabledFlag;
this.fLabel_mc.setEnabled(enabledFlag);
this.highlight_mc.gotoAndStop((enabledFlag ? "unfocused" : "disabled"));
};
FSelectableItemClass.prototype.layoutContent = function (width) {
this.attachMovie("FLabelSymbol", "fLabel_mc", 2, {hostComponent:this.controller});
this.fLabel_mc._x = 2;
this.fLabel_mc._y = 0;
this.fLabel_mc.setSize(width - 2);
this.fLabel_mc.labelField.selectable = false;
};
FSelectableItemClass.prototype.displayContent = function (itmObj, selected) {
var tmpLabel = "";
if (itmObj.label != undefined) {
tmpLabel = itmObj.label;
} else if (typeof(itmObj) == "object") {
for (var i in itmObj) {
if (i != "__ID__") {
tmpLabel = (itmObj[i] + ", ") + tmpLabel;
}
}
tmpLabel = tmpLabel.substring(0, tmpLabel.length - 2);
} else {
tmpLabel = itmObj;
}
if (this.fLabel_mc.labelField.text != tmpLabel) {
this.fLabel_mc.setLabel(tmpLabel);
}
var clr = (selected ? (this.controller.styleTable.textSelected.value) : (this.controller.styleTable.textColor.value));
if (clr == undefined) {
clr = (selected ? 16777215 : 0);
}
this.fLabel_mc.setColor(clr);
};
FSelectableItemClass.prototype.getItemIndex = function () {
return(this.controller.getScrollPosition() + this.itemNum);
};
FSelectableItemClass.prototype.getItemModel = function () {
return(this.controller.getItemAt(this.getItemIndex()));
};
FSelectableItemClass.prototype.getHostDataProvider = function () {
return(this.controller.dataProvider);
};
FSelectableItemClass.prototype.setHighlighted = function (flag) {
fade = this.controller.styleTable.fadeRate.value;
if (((fade == undefined) || (fade == 0)) || (!flag)) {
this.highlight_mc._alpha = (flag ? 100 : 0);
delete this.onEnterFrame;
} else {
this.fadeN = fade;
this.fadeX = 1;
this.highLight_mc._alpha = 20;
this.onEnterFrame = function () {
this.highLight_mc._alpha = (60 * Math.sqrt((this.fadeX++) / this.fadeN)) + 40;
if (this.fadeX > this.fadeN) {
delete this.onEnterFrame;
}
};
}
this.highlighted = flag;
};
#endinitclip
Symbol 102 MovieClip [FSelectableListSymbol] Frame 1
#initclip 5
function FSelectableListClass() {
this.init();
}
FSelectableListClass.prototype = new FUIComponentClass();
FSelectableListClass.prototype.init = function () {
super.init();
this.enable = true;
this.selected = new Array();
this.topDisplayed = (this.numDisplayed = 0);
this.lastSelected = 0;
this.tabChildren = false;
if (this._name != undefined) {
this.dataProvider = new DataProviderClass();
this.dataProvider.addView(this);
}
};
FSelectableListClass.prototype.addItemAt = function (index, label, data) {
if ((index < 0) || (!this.enable)) {
return(undefined);
}
this.dataProvider.addItemAt(index, {label:label, data:data});
};
FSelectableListClass.prototype.addItem = function (label, data) {
if (!this.enable) {
return(undefined);
}
this.dataProvider.addItem({label:label, data:data});
};
FSelectableListClass.prototype.removeItemAt = function (index) {
this.selectHolder = this.getSelectedIndex();
var item = this.getItemAt(index);
this.dataProvider.removeItemAt(index);
return(item);
};
FSelectableListClass.prototype.removeAll = function () {
this.dataProvider.removeAll();
};
FSelectableListClass.prototype.replaceItemAt = function (index, newLabel, newData) {
this.dataProvider.replaceItemAt(index, {label:newLabel, data:newData});
};
FSelectableListClass.prototype.sortItemsBy = function (fieldName, order) {
this.lastSelID = this.dataProvider.getItemID(this.lastSelected);
this.dataProvider.sortItemsBy(fieldName, order);
};
FSelectableListClass.prototype.getLength = function () {
return(this.dataProvider.getLength());
};
FSelectableListClass.prototype.getSelectedIndex = function () {
for (var uniqueID in this.selected) {
var tmpInd = this.selected[uniqueID].sIndex;
if (tmpInd != undefined) {
return(tmpInd);
}
}
};
FSelectableListClass.prototype.getSelectedItem = function () {
return(this.getItemAt(this.getSelectedIndex()));
};
FSelectableListClass.prototype.getItemAt = function (index) {
return(this.dataProvider.getItemAt(index));
};
FSelectableListClass.prototype.getEnabled = function () {
return(this.enable);
};
FSelectableListClass.prototype.getValue = function () {
var item = this.getSelectedItem();
return(((item.data == undefined) ? (item.label) : (item.data)));
};
FSelectableListClass.prototype.setSelectedIndex = function (index, flag) {
if (((index >= 0) && (index < this.getLength())) && (this.enable)) {
this.clearSelected();
this.selectItem(index, true);
this.lastSelected = index;
this.invalidate("updateControl");
if (flag != false) {
this.executeCallBack();
}
}
};
FSelectableListClass.prototype.setDataProvider = function (obj) {
this.setScrollPosition(0);
this.clearSelected();
if (obj instanceof Array) {
this.dataProvider = new DataProviderClass();
var i = 0;
while (i < obj.length) {
var value = ((typeof(obj[i]) == "string") ? ({label:obj[i]}) : (obj[i]));
this.dataProvider.addItem(value);
i++;
}
} else {
this.dataProvider = obj;
}
this.dataProvider.addView(this);
};
FSelectableListClass.prototype.setItemSymbol = function (linkID) {
this.tmpPos = this.getScrollPosition();
this.itemSymbol = linkID;
this.invalidate("setSize");
this.setScrollPosition(this.tmpPos);
};
FSelectableListClass.prototype.setEnabled = function (enabledFlag) {
this.cleanUI();
super.setEnabled(enabledFlag);
this.enable = enabledFlag;
this.boundingBox_mc.gotoAndStop((this.enable ? "enabled" : "disabled"));
var limit = Math.min(this.numDisplayed, this.getLength());
var i = 0;
while (i < limit) {
this.container_mc[("fListItem" + i) + "_mc"].setEnabled(this.enable);
i++;
}
if (this.enable) {
this.invalidate("updateControl");
}
};
FSelectableListClass.prototype.updateControl = function () {
var i = 0;
while (i < this.numDisplayed) {
this.container_mc[("fListItem" + i) + "_mc"].drawItem(this.getItemAt(this.topDisplayed + i), this.isSelected(this.topDisplayed + i));
i++;
}
};
FSelectableListClass.prototype.setSize = function (w, h) {
super.setSize(w, h);
this.boundingBox_mc._xscale = (this.boundingBox_mc._yscale = 100);
this.boundingBox_mc._xscale = (this.width * 100) / this.boundingBox_mc._width;
this.boundingBox_mc._yscale = (this.height * 100) / this.boundingBox_mc._height;
var i = 0;
while (i < this.numDisplayed) {
this.container_mc.attachMovie(this.itemSymbol, ("fListItem" + i) + "_mc", 10 + i, {controller:this, itemNum:i});
var item_mc = this.container_mc[("fListItem" + i) + "_mc"];
var offset = ((this.scrollOffset == undefined) ? 0 : (this.scrollOffset));
item_mc.setSize(this.width - offset, this.itmHgt);
item_mc._y = (this.itmHgt - 2) * i;
i++;
}
this.updateControl();
};
FSelectableListClass.prototype.modelChanged = function (eventObj) {
var firstRow = eventObj.firstRow;
var lastRow = eventObj.lastRow;
var event = eventObj.event;
if (event == "addRows") {
for (var i in this.selected) {
if ((this.selected[i].sIndex != undefined) && (this.selected[i].sIndex >= firstRow)) {
this.selected[i].sIndex = this.selected[i].sIndex + ((lastRow - firstRow) + 1);
this.setSelectedIndex(this.selected[i].sIndex, false);
}
}
} else if (event == "deleteRows") {
if (firstRow == lastRow) {
var index = firstRow;
if (this.selectHolder == index) {
this.selectionDeleted = true;
}
if (((this.topDisplayed + this.numDisplayed) >= this.getLength()) && (this.topDisplayed > 0)) {
this.topDisplayed--;
if (this.selectionDeleted && ((index - 1) >= 0)) {
this.setSelectedIndex(index - 1, false);
}
} else if (this.selectionDeleted) {
var len = this.getLength();
if (((index == (len - 1)) && (len > 1)) || (index > (len / 2))) {
this.setSelectedIndex(index - 1, false);
} else {
this.setSelectedIndex(index, false);
}
}
for (var i in this.selected) {
if (this.selected[i].sIndex > firstRow) {
this.selected[i].sIndex--;
}
}
} else {
this.clearSelected();
this.topDisplayed = 0;
}
} else if (event == "sort") {
var len = this.getLength();
var i = 0;
while (i < len) {
if (this.isSelected(i)) {
var id = this.dataProvider.getItemID(i);
if (id == this.lastSelID) {
this.lastSelected = i;
}
this.selected[String(id)].sIndex = i;
}
i++;
}
}
this.invalidate("updateControl");
};
FSelectableListClass.prototype.measureItmHgt = function () {
this.attachMovie(this.itemSymbol, "tmpItem_mc", 0, {controller:this});
this.tmpItem_mc.drawItem({label:"Sizer: PjtTopg"}, false);
this.itmHgt = this.tmpItem_mc._height;
this.tmpItem_mc.removeMovieClip();
};
FSelectableListClass.prototype.selectItem = function (index, selectedFlag) {
if (selectedFlag && (!this.isSelected(index))) {
this.selected[String(this.dataProvider.getItemID(index))] = {sIndex:index};
} else if (!selectedFlag) {
delete this.selected[String(this.dataProvider.getItemID(index))];
}
};
FSelectableListClass.prototype.isSelected = function (index) {
return(this.selected[String(this.dataProvider.getItemID(index))].sIndex != undefined);
};
FSelectableListClass.prototype.clearSelected = function () {
for (var uniqueID in this.selected) {
var index = this.selected[uniqueID].sIndex;
if (((index != undefined) && (this.topDisplayed <= index)) && (index < (this.topDisplayed + this.numDisplayed))) {
this.container_mc[("fListItem" + (index - this.topDisplayed)) + "_mc"].drawItem(this.getItemAt(index), false);
}
}
delete this.selected;
this.selected = new Array();
};
FSelectableListClass.prototype.selectionHandler = function (itemNum) {
var tmpInd = (this.topDisplayed + itemNum);
if (this.getItemAt(tmpInd == undefined)) {
this.changeFlag = false;
return(undefined);
}
this.changeFlag = true;
this.clearSelected();
this.selectItem(tmpInd, true);
this.container_mc[("fListItem" + itemNum) + "_mc"].drawItem(this.getItemAt(tmpInd), this.isSelected(tmpInd));
};
FSelectableListClass.prototype.moveSelBy = function (incr) {
var itmNum = this.getSelectedIndex();
var newItm = (itmNum + incr);
newItm = Math.max(0, newItm);
newItm = Math.min(this.getLength() - 1, newItm);
if (newItm == itmNum) {
return(undefined);
}
if ((itmNum < this.topDisplayed) || (itmNum >= (this.topDisplayed + this.numDisplayed))) {
this.setScrollPosition(itmNum);
}
if ((newItm >= (this.topDisplayed + this.numDisplayed)) || (newItm < this.topDisplayed)) {
this.setScrollPosition(this.topDisplayed + incr);
}
this.selectionHandler(newItm - this.topDisplayed);
};
FSelectableListClass.prototype.clickHandler = function (itmNum) {
this.focusRect.removeMovieClip();
if (!this.focused) {
this.pressFocus();
}
this.selectionHandler(itmNum);
this.onMouseUp = this.releaseHandler;
};
FSelectableListClass.prototype.releaseHandler = function () {
if (this.changeFlag) {
this.executeCallBack();
}
this.changeFlag = false;
this.onMouseUp = undefined;
};
FSelectableListClass.prototype.myOnSetFocus = function () {
super.myOnSetFocus();
var i = 0;
while (i < this.numDisplayed) {
this.container_mc[("fListItem" + i) + "_mc"].highlight_mc.gotoAndStop("enabled");
i++;
}
};
FSelectableListClass.prototype.myOnKillFocus = function () {
super.myOnKillFocus();
var i = 0;
while (i < this.numDisplayed) {
this.container_mc[("fListItem" + i) + "_mc"].highlight_mc.gotoAndStop("unfocused");
i++;
}
};
#endinitclip
Instance of Symbol 100 MovieClip [DataProviderSymbol] "dPAsset" in Symbol 102 MovieClip [FSelectableListSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
}
Instance of Symbol 101 MovieClip [FSelectableItemSymbol] "ItemAsset" in Symbol 102 MovieClip [FSelectableListSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
}
Symbol 103 MovieClip [FScrollSelectListSymbol] Frame 1
#initclip 7
function FScrollSelectListClass() {
this.init();
}
FScrollSelectListClass.prototype = new FSelectableListClass();
FScrollSelectListClass.prototype.getScrollPosition = function () {
return(this.topDisplayed);
};
FScrollSelectListClass.prototype.setScrollPosition = function (pos) {
if (this.enable) {
pos = Math.min(pos, this.getLength() - this.numDisplayed);
pos = Math.max(pos, 0);
this.scrollBar_mc.setScrollPosition(pos);
}
};
FScrollSelectListClass.prototype.setAutoHideScrollBar = function (flag) {
this.permaScrollBar = !flag;
this.setSize(this.width, this.height);
};
FScrollSelectListClass.prototype.setEnabled = function (enabledFlag) {
super.setEnabled(enabledFlag);
this.scrollBar_mc.setEnabled(this.enable);
};
FScrollSelectListClass.prototype.setSize = function (w, h) {
var pos = this.getScrollPosition();
super.setSize(w, h);
if (this.scrollBar_mc != undefined) {
this.removed = true;
}
this.scrollBar_mc = undefined;
this.initScrollBar();
this.setScrollPosition(pos);
};
FScrollSelectListClass.prototype.modelChanged = function (eventObj) {
super.modelChanged(eventObj);
this.invalidate("initScrollBar");
};
FScrollSelectListClass.prototype.initScrollBar = function () {
if ((!this.permaScrollBar) && (this.getLength() <= this.numDisplayed)) {
if (this.removed) {
this.scrollBar_mc.removeMovieClip();
this.scrollBar_mc = undefined;
this.scrollOffset = undefined;
this.invalidate("setSize");
}
} else {
if (this.scrollBar_mc == undefined) {
this.container_mc.attachMovie("FScrollBarSymbol", "scrollBar_mc", 3000, {hostStyle:this.styleTable});
this.scrollBar_mc = this.container_mc.scrollBar_mc;
this.scrollBar_mc.setChangeHandler("scrollHandler", this);
this.scrollBar_mc.setSize(this.height);
this.scrollBar_mc._x = this.width - this.scrollBar_mc._width;
this.scrollBar_mc._y = 0;
this.scrollBar_mc.setLargeScroll(this.numDisplayed - 1);
this.scrollOffset = this.scrollBar_mc._width;
this.invalidate("setSize");
}
this.scrollBar_mc.setScrollProperties(this.numDisplayed, 0, this.getLength() - this.numDisplayed);
}
};
FScrollSelectListClass.prototype.scrollHandler = function (scrollBar) {
var pos = scrollBar.getScrollPosition();
this.topDisplayed = pos;
if (this.lastPosition != pos) {
this.updateControl();
}
this.lastPosition = pos;
};
FScrollSelectListClass.prototype.clickHandler = function (itmNum) {
super.clickHandler(itmNum);
if ((this.dragScrolling == undefined) && (this.scrollBar_mc != undefined)) {
this.dragScrolling = setInterval(this, "dragScroll", 15);
}
};
FScrollSelectListClass.prototype.releaseHandler = function () {
clearInterval(this.dragScrolling);
this.dragScrolling = undefined;
super.releaseHandler();
};
FScrollSelectListClass.prototype.dragScroll = function () {
clearInterval(this.dragScrolling);
if (this.container_mc._ymouse < 0) {
this.setScrollPosition(this.getScrollPosition() - 1);
this.selectionHandler(0);
this.scrollInterval = Math.max(25, (-23.8 * (-this.container_mc._ymouse)) + 500);
this.dragScrolling = setInterval(this, "dragScroll", this.scrollInterval);
} else if (this.container_mc._ymouse > ((this.itmHgt - 2) * this.numDisplayed)) {
this.setScrollPosition(this.getScrollPosition() + 1);
this.selectionHandler(this.numDisplayed - 1);
this.scrollInterval = Math.max(25, (-23.8 * Math.abs((this.container_mc._ymouse - ((this.itmHgt - 2) * this.numDisplayed)) - 2)) + 500);
this.dragScrolling = setInterval(this, "dragScroll", this.scrollInterval);
} else {
this.dragScrolling = setInterval(this, "dragScroll", 15);
}
};
FScrollSelectListClass.prototype.myOnKeyDown = function () {
if (this.focused) {
this.keyCodes = new Array(40, 38, 34, 33, 36, 35);
this.keyIncrs = new Array(1, -1, this.numDisplayed - 1, -(this.numDisplayed - 1), -this.getLength(), this.getLength());
var i = 0;
while (i < this.keyCodes.length) {
if (Key.isDown(this.keyCodes[i])) {
this.moveSelBy(this.keyIncrs[i]);
return(undefined);
}
i++;
}
this.findInputText();
}
};
FScrollSelectListClass.prototype.findInputText = function () {
var tmpCode = Key.getAscii();
if ((tmpCode >= 33) && (tmpCode <= 126)) {
this.findString(String.fromCharCode(tmpCode));
}
};
FScrollSelectListClass.prototype.findString = function (str) {
if (this.getLength() == 0) {
return(undefined);
}
var itemNum = this.getSelectedIndex();
var jump = 0;
var i = (itemNum + 1);
while (i != itemNum) {
var itmStr = this.getItemAt(i).label.substring(0, str.length);
if ((str == itmStr) || (str.toUpperCase() == itmStr.toUpperCase())) {
var jump = (i - itemNum);
break;
}
if (i >= (this.getLength() - 1)) {
i = -1;
}
i++;
}
if (jump != 0) {
this.moveSelBy(jump);
}
};
#endinitclip
Instance of Symbol 98 MovieClip [FScrollBarSymbol] "scrollBarAsset" in Symbol 103 MovieClip [FScrollSelectListSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
_targetInstanceName = "";
horizontal = false;
}
onClipEvent (load) {
this._width = (this._height = 1);
}
Instance of Symbol 102 MovieClip [FSelectableListSymbol] "superClassAsset" in Symbol 103 MovieClip [FScrollSelectListSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
}
Symbol 107 MovieClip [FBoundingBoxSymbol] Frame 1
var component = _parent;
component.registerSkinElement(boundingBox, "background");
stop();
Symbol 107 MovieClip [FBoundingBoxSymbol] Frame 2
component.registerSkinElement(boundingBox2, "backgroundDisabled");
stop();
Symbol 110 MovieClip [FListBoxSymbol] Frame 1
#initclip 8
function FListBoxClass() {
this.itemSymbol = "FListItemSymbol";
this.init();
this.permaScrollBar = true;
var i = 0;
while (i < this.labels.length) {
this.addItem(this.labels[i], this.data[i]);
i++;
}
this.boundingBox_mc.gotoAndStop(1);
this.width = this._width;
this.height = this._height;
this._yscale = (this._xscale = 100);
this.setSize(this.width, this.height);
if (this.changeHandler.length > 0) {
this.setChangeHandler(this.changeHandler);
}
}
FListBoxClass.prototype = new FScrollSelectListClass();
Object.registerClass("FListBoxSymbol", FListBoxClass);
FListBoxClass.prototype.getSelectedIndices = function () {
var tmpArray = new Array();
for (var i in this.selected) {
tmpArray.push(this.selected[i].sIndex);
}
return(((tmpArray.length > 0) ? (tmpArray) : undefined));
};
FListBoxClass.prototype.getSelectedItems = function () {
var indices = this.getSelectedIndices();
var tmpArray = new Array();
var i = 0;
while (i < indices.length) {
tmpArray.push(this.getItemAt(indices[i]));
i++;
}
return(((tmpArray.length > 0) ? (tmpArray) : undefined));
};
FListBoxClass.prototype.getSelectMultiple = function () {
return(this.selectMultiple);
};
FListBoxClass.prototype.getRowCount = function () {
return(this.numDisplayed);
};
FListBoxClass.prototype.setSelectedIndices = function (indexArray) {
this.clearSelected();
var i = 0;
while (i < indexArray.length) {
this.selectItem(indexArray[i], true);
i++;
}
this.updateControl();
};
FListBoxClass.prototype.setSelectMultiple = function (flag) {
this.selectMultiple = flag;
};
FListBoxClass.prototype.setRowCount = function (count) {
var hgt = ((count * (this.itmHgt - 2)) + 2);
this.setSize(this.width, hgt);
};
FListBoxClass.prototype.setWidth = function (wdt) {
this.setSize(wdt, this.height);
};
FListBoxClass.prototype.setSize = function (w, h) {
if (!this.enable) {
return(undefined);
}
w = Math.max(w, 20);
h = Math.max(h, 40);
this.container_mc.removeMovieClip();
this.container_mc = this.createEmptyMovieClip("container", 3);
this.measureItmHgt();
this.numDisplayed = Math.floor(h / (this.itmHgt - 2));
this.height = (this.numDisplayed * (this.itmHgt - 2)) + 2;
super.setSize(w, this.height);
};
FListBoxClass.prototype.removeItemAt = function (index) {
this.selectHolder = this.getSelectedIndices();
return(super.removeItemAt(index));
};
FListBoxClass.prototype.selectionHandler = function (itemNum) {
if (this.clickFilter) {
var index = (this.topDisplayed + itemNum);
if (this.getItemAt(index) == undefined) {
this.changeFlag = false;
return(undefined);
}
this.changeFlag = true;
if (((!this.selectMultiple) && (!Key.isDown(17))) || ((!Key.isDown(16)) && (!Key.isDown(17)))) {
this.clearSelected();
this.selectItem(index, true);
this.lastSelected = index;
this.container_mc[("fListItem" + itemNum) + "_mc"].drawItem(this.getItemAt(index), this.isSelected(index));
} else if (Key.isDown(16) && (this.selectMultiple)) {
if (this.lastSelected == -1) {
this.lastSelected = index;
}
var incr = ((this.lastSelected < index) ? 1 : -1);
this.clearSelected();
var i = this.lastSelected;
while (i != index) {
this.selectItem(i, true);
if ((i >= this.topDisplayed) && (i < (this.topDisplayed + this.numDisplayed))) {
this.container_mc[("fListItem" + (i - this.topDisplayed)) + "_mc"].drawItem(this.getItemAt(i), this.isSelected(i));
}
i = i + incr;
}
this.selectItem(index, true);
this.container_mc[("fListItem" + (index - this.topDisplayed)) + "_mc"].drawItem(this.getItemAt(index), this.isSelected(index));
} else if (key.isDown(17)) {
var selectedFlag = this.isSelected(index);
if (!this.selectMultiple) {
this.clearSelected();
}
if (!((!this.selectMultiple) && (selectedFlag))) {
this.selectItem(index, !selectedFlag);
this.container_mc[("fListItem" + itemNum) + "_mc"].drawItem(this.getItemAt(this.topDisplayed + itemNum), this.isSelected(this.topDisplayed + itemNum));
}
this.lastSelected = index;
}
} else {
this.clickFilter = true;
}
};
FListBoxClass.prototype.moveSelBy = function (itemNum) {
super.moveSelBy(itemNum);
this.releaseHandler();
};
#endinitclip
this.deadPreview._visible = false;
Instance of Symbol 103 MovieClip [FScrollSelectListSymbol] "superClassAsset" in Symbol 110 MovieClip [FListBoxSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
}
Symbol 118 Button
on (release) {
getURL ("http://www.newgrounds.com", "blank");
}
Symbol 131 Button
on (release) {
_root.gotoAndPlay(3);
}
Symbol 134 Button
on (release) {
_root.gotoAndPlay(2);
}
Symbol 135 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndPlay (3);
}
Symbol 135 MovieClip Frame 2
gotoAndPlay (1);
Symbol 135 MovieClip Frame 3
SonTombe = new Sound();
SonTombe.attachSound("SonTombe");
Symbol 135 MovieClip Frame 7
stop();
this.SonTombe.start();
Symbol 177 MovieClip Frame 1
stop();
Symbol 177 MovieClip Frame 2
Symbol 186 Button
on (release) {
this.gotoAndStop(2);
}
Symbol 189 Button
on (release) {
this.gotoAndPlay(1);
}
Symbol 193 MovieClip Frame 1
stop();
Instance of Symbol 177 MovieClip "mc_Stress" in Symbol 193 MovieClip Frame 1
onClipEvent (enterFrame) {
if (b_OutofTrade == false) {
if (_root.stressIndic._yscale > 20) {
_root.mc_Enter.gotoAndStop(2);
if (b_SonStress) {
} else {
_global.b_SonStress = true;
_root.SonMusicStress.start(7, 1);
}
if (i_StressReliever < 1) {
gotoAndPlay (2);
if (Math.random() < (0.01 * (_root.stressIndic._yscale - 20))) {
Mouse.hide();
duplicateMovieClip (_root.mc_MouseLure, "MouseFx", 1000);
setProperty(_root.MouseFx, _x , _root._xmouse + ((0.5 * _root.stressIndic._yscale) * (Math.random() - 0.5)));
setProperty(_root.MouseFx, _y , _root._ymouse + ((0.5 * _root.stressIndic._yscale) * (Math.random() - 0.5)));
} else {
removeMovieClip(_root.MouseFx);
Mouse.show();
}
}
} else {
if (_root.SonMusicStress.duration == _root.SonMusicStress.position) {
_global.b_SonStress = false;
}
removeMovieClip(_root.MouseFx);
Mouse.show();
_root.mc_Enter.gotoAndStop(1);
gotoAndStop (1);
}
} else {
gotoAndStop (1);
removeMovieClip(_root.MouseFx);
Mouse.show();
}
}
Symbol 193 MovieClip Frame 2
stop();
Symbol 211 Button
on (release) {
if (Math.abs((_global.iQte * _global.dRef) - (1000 * _global.dCours)) < (_global.GFerme * _global.Levier)) {
_global.LastQte = iQte;
_global.iQte = iQte - 1000;
enPos();
}
}
Symbol 222 Button
on (release) {
if (Math.abs((_global.iQte * _global.dRef) + (1 * _global.dCours)) < (_global.GFerme * _global.Levier)) {
_global.LastQte = iQte;
_global.iQte = iQte + 1;
enPos();
}
}
Symbol 232 Button
on (release) {
if (Math.abs((_global.iQte * _global.dRef) + (10 * _global.dCours)) < (_global.GFerme * _global.Levier)) {
_global.LastQte = iQte;
_global.iQte = iQte + 10;
enPos();
}
}
Symbol 237 Button
on (release) {
if (Math.abs((_global.iQte * _global.dRef) + (100 * _global.dCours)) < (_global.GFerme * _global.Levier)) {
_global.LastQte = iQte;
_global.iQte = iQte + 100;
enPos();
}
}
Symbol 245 Button
on (release) {
if (Math.abs((_global.iQte * _global.dRef) - (1 * _global.dCours)) < (_global.GFerme * _global.Levier)) {
_global.LastQte = iQte;
_global.iQte = iQte - 1;
enPos();
}
}
Symbol 250 Button
on (release) {
if (Math.abs((_global.iQte * _global.dRef) - (10 * _global.dCours)) < (_global.GFerme * _global.Levier)) {
_global.LastQte = iQte;
_global.iQte = iQte - 10;
enPos();
}
}
Symbol 255 Button
on (release) {
if (Math.abs((_global.iQte * _global.dRef) - (100 * _global.dCours)) < (_global.GFerme * _global.Levier)) {
_global.LastQte = iQte;
_global.iQte = iQte - 100;
enPos();
}
}
Symbol 259 Button
on (release) {
if (Math.abs((_global.iQte * _global.dRef) + (1000 * _global.dCours)) < (_global.GFerme * _global.Levier)) {
_global.LastQte = iQte;
_global.iQte = iQte + 1000;
enPos();
}
}
Symbol 265 Button
on (release) {
if (this._currentframe == 1) {
_global.b_ZoomOn = true;
this.gotoAndStop(2);
} else {
_global.b_ZoomOn = false;
this.gotoAndStop(1);
}
}
Symbol 268 Button
on (release) {
if (this._currentframe == 1) {
_global.b_ZoomOn = true;
this.gotoAndStop(2);
} else {
_global.b_ZoomOn = false;
this.gotoAndStop(1);
}
}
Symbol 269 MovieClip Frame 1
stop();
Symbol 269 MovieClip Frame 2
stop();
Symbol 323 MovieClip Frame 1
stop();
Symbol 323 MovieClip Frame 3
stop();
Symbol 323 MovieClip Frame 5
stop();
Symbol 323 MovieClip Frame 7
stop();
Symbol 323 MovieClip Frame 9
stop();
Symbol 323 MovieClip Frame 11
stop();
Symbol 323 MovieClip Frame 13
stop();
Symbol 323 MovieClip Frame 15
stop();
Symbol 323 MovieClip Frame 17
stop();
Symbol 323 MovieClip Frame 19
stop();
Symbol 323 MovieClip Frame 21
stop();
Symbol 323 MovieClip Frame 23
stop();
Symbol 323 MovieClip Frame 25
stop();
Symbol 323 MovieClip Frame 27
stop();
Symbol 323 MovieClip Frame 29
stop();
Symbol 323 MovieClip Frame 31
stop();
Symbol 323 MovieClip Frame 33
stop();
Symbol 323 MovieClip Frame 35
stop();
Symbol 323 MovieClip Frame 37
stop();
Symbol 323 MovieClip Frame 39
stop();
Symbol 323 MovieClip Frame 41
stop();
Symbol 323 MovieClip Frame 43
stop();
Symbol 323 MovieClip Frame 45
stop();
Symbol 323 MovieClip Frame 47
stop();
Symbol 323 MovieClip Frame 49
stop();
Symbol 323 MovieClip Frame 51
stop();
Symbol 330 Button
on (rollOver) {
VarTxtRapport = (((((("Effect: +1% I.Rate" + String.fromCharCode(13)) + "Chance: ") + Effect_Ar[0][1]) + " %") + String.fromCharCode(13)) + "$ : ") + Effect_Ar[0][0];
}
on (release) {
if ((GFerme - Math.abs((iQte * dRef) / Levier)) > Effect_Ar[0][0]) {
_global.GFerme = _global.GFerme - Effect_Ar[0][0];
_global.GLatent = _global.GLatent - Effect_Ar[0][0];
_root.tNom.text = Math.floor(GFerme - (Math.abs(iQte * dRef) / Levier));
_root.tPL.text = Math.floor(GLatent);
_root.mc_Effect.gotoAndPlay(2);
} else {
_root.SonEchec.start();
}
}
Symbol 334 Button
on (rollOver) {
VarTxtStrike = (((((("Effect: -10% S&P" + String.fromCharCode(13)) + "Chance: ") + Effect_Ar[1][1]) + " %") + String.fromCharCode(13)) + "$ : ") + Effect_Ar[1][0];
}
on (release) {
if ((GFerme - Math.abs((iQte * dRef) / Levier)) > Effect_Ar[1][0]) {
_global.GFerme = _global.GFerme - Effect_Ar[1][0];
_global.GLatent = _global.GLatent - Effect_Ar[1][0];
_root.tNom.text = Math.floor(GFerme - (Math.abs(iQte * dRef) / Levier));
_root.tPL.text = Math.floor(GLatent);
_root.mc_Effect.gotoAndPlay(50);
} else {
_root.SonEchec.start();
}
}
Symbol 338 Button
on (rollOver) {
VarTxtRumor = (((((("Effect: +10% S&P" + String.fromCharCode(13)) + "Chance: ") + Effect_Ar[2][1]) + " %") + String.fromCharCode(13)) + "$ : ") + Effect_Ar[2][0];
}
on (release) {
if ((GFerme - Math.abs((iQte * dRef) / Levier)) > Effect_Ar[2][0]) {
_global.GFerme = _global.GFerme - Effect_Ar[2][0];
_global.GLatent = _global.GLatent - Effect_Ar[2][0];
_root.tNom.text = Math.floor(GFerme - (Math.abs(iQte * dRef) / Levier));
_root.tPL.text = Math.floor(GLatent);
_root.mc_Effect.gotoAndPlay(100);
} else {
_root.SonEchec.start();
}
}
Symbol 372 Button
on (release) {
stopAllSounds();
_global.b_OutofTrade = true;
_root.mc_StripHouse.gotoAndPlay(7);
}
Symbol 374 MovieClip Frame 1
stop();
Symbol 374 MovieClip Frame 2
stop();
Symbol 382 Button
on (release) {
_global.b_dejaLance = false;
stopAllSounds();
clearInterval(idIntervalleStrip);
removeMovieClip(_root.mc_Strip2);
_global.b_OutofTrade = false;
_root.gotoAndStop(3);
this.gotoAndStop(1);
}
Symbol 384 Button
on (release) {
if (b_dejaLance) {
} else {
iGoTo = PrixStrip_ar[i_StripNow][0];
t_ComStrip.text = "";
_root.SonMusicStrip.setVolume(100);
_root.SonMusicStrip.start(Math.random() * 100, 2);
_global.b_dejaLance = true;
objStrip = new Object();
objStrip.joueStrip = function () {
_global.i_StressReliever = Math.min(100, i_StressReliever + 2);
iCurrentFrame = _root.mc_Strip2._currentframe;
if (Math.random() < 0.3) {
if ((i_StripNow > 10) && (Math.random() < 0.1)) {
d_debSonMoan = (0.5 + (0.5 * Math.random())) * SonMoan.duration;
_root.SonMoan.setVolume(Math.random() * 30);
_root.SonMoan.start(d_debSonMoan, 1);
_root.SonMusicStrip.setVolume(100);
}
iGoTo = Math.round(Math.random() * i_StripNow);
}
if (iCurrentFrame > PrixStrip_ar[iGoTo][0]) {
_root.mc_Strip2.gotoAndStop(Math.max(1, iCurrentFrame - 2));
} else {
_root.mc_Strip2.gotoAndStop(Math.min(PrixStrip_ar[i_StripNow][0], iCurrentFrame + 2));
}
};
idIntervalleStrip = setInterval(objStrip, "joueStrip", 1500);
}
}
Symbol 386 Button
on (release) {
_global.b_dejaLance = false;
stopAllSounds();
clearInterval(idIntervalleStrip);
t_ComStrip.text = "";
}
Symbol 388 Button
on (release) {
_global.b_dejaLance = false;
stopAllSounds();
clearInterval(idIntervalleStrip);
i_frameGoTo = Math.min(PrixStrip_ar[i_StripNow][0], _root.mc_Strip2._currentframe + 2);
if ((_root.mc_Strip2._currentframe + 2) > PrixStrip_ar[PrixStrip_ar.length - 1][0]) {
t_ComStrip.text = "You win Honey";
} else if ((_root.mc_Strip2._currentframe + 2) > PrixStrip_ar[i_StripNow][0]) {
t_ComStrip.text = ("You need more than " + PrixStrip_ar[i_StripNow + 1][1]) + " $ of P&L to watch the next strip Honey";
}
_root.mc_Strip2.gotoAndStop(i_frameGoTo);
}
Symbol 390 Button
on (release) {
_global.b_dejaLance = false;
stopAllSounds();
clearInterval(idIntervalleStrip);
t_ComStrip.text = "";
i_frameGoTo = Math.max(1, _root.mc_Strip2._currentframe - 2);
_root.mc_Strip2.gotoAndStop(i_frameGoTo);
}
Symbol 392 MovieClip Frame 1
stop();
Symbol 392 MovieClip Frame 7
stop();
stopAllSounds();
_global.b_SonStress = false;
duplicateMovieClip (_root.mc_MiniStrip, "mc_Strip2", 2000);
btn_Sfond.useHandCursor = false;
setProperty(_root.mc_Strip2, _height , 270);
setProperty(_root.mc_Strip2, _width , 200);
setProperty(_root.mc_Strip2, _x , 200);
setProperty(_root.mc_Strip2, _y , 135);
_root.mc_Strip2.gotoAndStop(PrixStrip_ar[i_StripNow][0]);
Symbol 412 MovieClip Frame 1
stop();
Symbol 412 MovieClip Frame 35
stop();
if (Math.random() < (Effect_Ar[0][1] * 0.01)) {
_root.EcritList("!+100 bp: 'Some recent economical report are worrying me' said Allan Bigspoon");
_global.dRate = _global.dRate + 0.01;
_root.cp_tcours.tCours.text = dCours;
} else {
_root.EcritList("the Central Bank denied the truth of the recent report about an economic bubble");
}
_root.NoChange();
this.gotoAndStop(1);
Symbol 412 MovieClip Frame 96
stop();
s_NomSct = _root.NomSct_Ar[math.floor(math.random() * _root.NomSct_Ar.length)] + _root.Nom2Sct_Ar[math.floor(math.random() * _root.Nom2Sct_Ar.length)];
if (Math.random() < (Effect_Ar[1][1] * 0.01)) {
_root.EcritList(("A strike in " + s_NomSct) + " cause a fall down of the Market");
_global.dCours = dCours * 0.9;
_root.cp_tcours.tCours.text = dCours;
_root.NoChange();
_root.TraceCours();
} else {
_root.EcritList("A strike was avoided in " + s_NomSct);
}
gotoAndStop (1);
Symbol 412 MovieClip Frame 133
stop();
i_aleaProduct = math.floor(math.random() * _root.NomMarkType_Ar.length);
if (Math.random() < Effect_Ar[2][1]) {
_root.EcritList(((((("A rumor of approval of a new " + _root.NomMarkType_Ar[i_aleaProduct]) + " , The ") + _root.NomMark1_Ar[math.floor(math.random() * _root.NomMark1_Ar.length)]) + " ") + _root.NomMark2_Ar[i_aleaProduct]) + " cause a raise of the market");
_global.dCours = dCours * 1.1;
_root.cp_tcours.tCours.text = dCours;
_root.NoChange();
_root.TraceCours();
} else {
_root.EcritList(((("'The " + NomMark1_Ar[math.floor(math.random() * NomMark1_Ar.length)]) + " ") + NomMark2_Ar[i_aleaProduct]) + " is still to be approved' said the finance minister reacting to some rumors");
}
gotoAndStop (1);
Symbol 434 MovieClip Frame 1
stop();
if (GLatent > 3999999) {
this.gotoAndPlay(2);
}
Symbol 439 Button
on (release) {
removeMovieClip(mcTraceT);
gotoAndPlay (1);
}