ho modularizzato un attimo il codice perchè non stavo riuscendo a leggerlo e ho aggiunto un valore booleano, anche se potrebbe non essere sufficiente allo scopo
codice:
var slideImages:Function = function(){
img = "slide1/foto"+foto+".jpg"
_root.big.cont.loadMovie(img);
_root.big.cont._alpha = 0;
_root.big.onEnterFrame = function() {
_root.superPartes = false;
car=this.cont.getBytesLoaded()
tot=this.cont.getBytesTotal()
percentuale = Math.floor((this.cont.getBytesLoaded()/tot)*100);
Int(this.cont.getBytesTotal()/1024)
_root.cont_perc.perc.text = percentuale+"% ";
if (car == tot && car > 1024) {
_root.superPartes = true;
larg =this.cont._width;
alt = this.cont._height;
_root.resizeimg._height=0
_root.resizeimg._width=0
_root.cont_perc.perc.text = "";
_root.resizeimg._alpha=100
_root.resizeimg.onEnterFrame = function() {
if (this._width<=larg-1 && this._height <=alt-1) {
myResize(this,larg+20,alt+20,4)
trace("largh resizeimg="+this._width+" alt resizeimg="+this._height+alt+larg)
trace("sto scalando " + this._width)
} else {
_root.big._x =_root.resizeimg._x-larg/2;
_root.big._y =_root.resizeimg._y-alt/2;
_root.big.cont._alpha = 100;
var scale:Object = new ScaleSquare(_root.big, 4,4,_root.big._width, _root.big._height, true, Elastic.easeOut);
_root.cont_slide_expo._y = _root.big._y+_root.big._height + 30
_root.dx._y = _root.big._y+_root.big._height + 55
_root.sx._y = _root.big._y+_root.big._height + 55
_root.totalefoto._y = _root.big._y+_root.big._height +35
trace("cancello il resize")
foto++;
delete this.onEnterFrame;
}
}
delete this.onEnterFrame;
}
}
trace(foto+""+totali)
if (foto == totali){
clearInterval(intervalID)
}
}
_root.slide.onRelease=function(){
this.enabled = false;
intervalID = setInterval(function(){
if(_root.superPartes){
slideImages()
}, 6000);
}
al massimo potresti sfruttare l'evento isFinished della mia classe così finchè quell'animazione non viene eseguita stai sicuro che non ci sarà il cambio di immagine
ScaleSquare.isFinished (target:MovieClip):Boolean
nel tuo caso dovresti fare una cosa tipo
codice:
_root.slide.onRelease=function(){
this.enabled = false;
intervalID = setInterval(function(){
if(scale.isFinished(_root.big)){
slideImages()
}, 6000);
}