El swf se llama Galeria y lo cargo desde un escenario_mc dentro de otro swf. Lo carga y barbaro, pero el tema es que si cargo del escenario_mc con otro swf se cruzan las rutas...Cuelgo el codigo entero, y cuelgo la parte del mismo codigo que me parece que hay lio de rutas...
Este es el codigo de la galeria:
Código :
this._lockroot = true; var imgNum; var t = 1; var yy = 415; var cargando = true; var xx = 103; var imgSelected = null; var imgLoader = new MovieClipLoader(); imgLoader.onLoadProgress = function (targetMC, loadedBytes, totalBytes){ _root["imgBtn"+t].porcentaje_txt.text = Math.round((loadedBytes/totalBytes) * 100)+ "%"; } imgLoader.onLoadComplete = function (targetMC){ _root["imgBtn"+t].gotoAndStop("cargado"); _root["imgBtn"+t].imgToShow = _root["img"+t]; _root["imgBtn"+t].porcentaje_txt.text = t; if(t == 1){ // _alpha del clip de película a 0 _root["img"+t]._alpha = 0; //Definimos cual es la imagen seleccionada imgSelected = _root["img"+t]; //efecto de "fade in" en las imagenes imgSelected.onEnterFrame = function(){ if (imgSelected._alpha<100){ imgSelected._alpha=imgSelected._alpha+5; }} } t++; loadImg(); } loadImg = function(){ if(xx > (Stage.width - 150)){ xx = 103; yy = 460; } if(t <= imgNum){ this.attachMovie("imgBtn", "imgBtn"+t, this.getNextHighestDepth()); this["imgBtn"+t]._x = xx; this["imgBtn"+t]._y = yy; this.createEmptyMovieClip("img" + t, this.getNextHighestDepth()); this["img"+t]._x = 147; this["img"+t]._y = 5; this["img"+t]._alpha = 0; imgLoader.loadClip("../Imagenes/"+t+".jpg", _root["img"+t]); } xx +=60; } //Llamamos a la función LoadImg() loadImg(); stop(); this.onUnload=function(){ if(cargando == true){ this._lockroot = false; } } this.onEnterFrame = function(){ if(imgNum == (t-1)){ cargando = false; } if(_ymouse < 0){ if(cargando == false){ this._lockroot = false; } } if(_ymouse > 0){ this._lockroot = true; } }
(Al principio, tranca la ruta)
Esta parte es la que trata las rutas, no la entiendo bien...
Código :
this.onUnload=function(){ if(cargando == true){ this._lockroot = false; } } this.onEnterFrame = function(){ if(imgNum == (t-1)){ cargando = false; } if(_ymouse < 0){ if(cargando == false){ this._lockroot = false; } } if(_ymouse > 0){ this._lockroot = true; } }