posteo la funcion y esta funcion es la que quiero cancelar con algun evento.
aver si entiendes lo que hago con la funcion
Código PHP:
function LoadFirtsFame() {
Array.prototype.shuffle = function() {
for (i=0; i<this.length; i++) {
var tmp = this[i];
var randomNum = random(this.length);
this[i] = this[randomNum];
this[randomNum] = tmp;
}
};
var photos:Array = new Array();
photos[0] = "jettacity";
photos[1] = "golfcity";
photos[2] = "newbeetle";
photos[3] = "newbeattleconv";
photos[4] = "gti";
photos[5] = "rabbit";
photos[6] = "jetta";
photos[7] = "passat";
photos[8] = "passatwagon";
photos[9] = "eos";
photos[10] = "tuareg";
photos[11] = "tdi";
photos.shuffle();
_global.whichToShow = showFirst;
function modelRam() {
varModel = (photos[movieCrap++]);
if (movieCrap == photos.length) {
movieCrap = 0;
}
whichToShow();
}
modelRam();
function showFirst() {
var tw2:Tween = new Tween(varModel4, "_alpha", Strong.easeOut, 100, 0, 2, true);
varModel3 = eval(loaderModels+"."+varModel+"_large");
varModel3.loadMovie(varModel+".jpg");
varModel3.swapDepths(getNextHighestDepth());
var tw1:Tween = new Tween(varModel3, "_alpha", Strong.easeOut, 0, 100, 2, true);
myTimeOut= setTimeout(modelRam, timeLap);
whichToShow = showSecond;
trace(varModel3);
trace(varModel4);
}
function showSecond() {
var tw2:Tween = new Tween(varModel3, "_alpha", Strong.easeOut, 100, 0, 2, true);
varModel4 = eval(loaderModels+"."+varModel+"_large");
varModel4.loadMovie(varModel+".jpg");
varModel4.swapDepths(getNextHighestDepth());
var tw1:Tween = new Tween(varModel4, "_alpha", Strong.easeOut, 0, 100, 2, true);
myTimeOut = setTimeout(modelRam, timeLap);
whichToShow = showFirst;
trace(varModel4);
trace(varModel3);
}
}
LoadFirtsFame();
Al final de la funcion te das cuenta que estoy llamando a la funcion y dentro de esta funcion tengo tras que se llaman una a la otra al terminar de ejecutarse