Onloadinit low speed as2 flash8

[COLOR=#000000][FONT=verdana]hello
I have been having a problem which has ended driving me mad. It turns out that I had tested a flash site locally and it seemed to work fine. Nonetheless, right after uploading the site to my server I realized that there was something wrong. After that, I did some additional test by using the simulated download option from the view menu from the window shown when testing a movie in flash. What I have seen is that it works fine if I use T1 speed or when I don’t use the simulated download. Otherwise, if I use a simulated download with a speed under T1, for example, DSL 32.6k the movie doesn’t have the behaviour I expect.
The problem is because I implemented the onloadinit method to try to scale and set the position of an image after it is loaded:


#include "actionscript/auxiliar.as"

var esto:MovieClip=this;
esto = this;


		
function actualiza(p_texto:String, p_file:String){
	if (!_root.contenido_mc)
		{
			_root.attachMovie("Contenido_mc","contenido_mc",getNextHighestDepth(),{_x:50,_y:272.1,_width:700,_height:305});
			_root.Menu_mc.swapDepths(_root.contenido_mc);
			}
	_root.contenido_mc.gotoAndStop("Servicios");
	_root.contenido_mc.texto_txt.text = p_texto;
		//trace(_root.contenido_mc.imagen2_mc["imagen_mc"] == undefined);
	_root.contenido_mc.imagen2_mc.createEmptyMovieClip("imagen_mc", 1);
	var pic_mcl:MovieClipLoader = new MovieClipLoader();
	//pic_mcl.unloadClip(_root.contenido_mc.imagen2_mc.imagen_mc);
	esto.onLoadInit=function($target_mc:MovieClip) {
// this is called after the image has completely loaded
		esto.escala(253, _root.contenido_mc.imagen2_mc.imagen_mc);		
		$target_mc._x = - $target_mc._width/2;
		$target_mc._y = - $target_mc._height/2;
		}
	pic_mcl.addListener(esto);
	pic_mcl.loadClip(p_file,_root.contenido_mc.imagen2_mc.imagen_mc);
	}
	
function escala(tamFinal:Number,p_contenedor:MovieClip){

//	if (_root.imagenEscalada==0){
		if (p_contenedor._width>p_contenedor._height) {
			p_contenedor._yscale = p_contenedor._xscale=(tamFinal*100)/(p_contenedor._width);
			}
		else {
			p_contenedor._yscale = p_contenedor._xscale=(tamFinal*100)/(p_contenedor._height);
			}
//		_root.imagenEscalada = 1;
//		}
	}



enablePseudoButtonEvents(incidencias1_mc, true, "onEnterFrame");
incidencias1_mc.Texto_mc.texto_txt.text="Sonido y video";
incidencias1_mc.onReleaseHandler = function(){
	actualiza("Resolución de problemas con el sonido y el vídeo de archivos: winxp, windows vista, etc.",
			  "images/codecs.jpg");			  
	}

enablePseudoButtonEvents(incidencias2_mc, true, "onEnterFrame");	
incidencias2_mc.Texto_mc.texto_txt.text="Drivers";
incidencias2_mc.onReleaseHandler = function(){
	actualiza("Localización, descarga, instalación y configuración de drivers para que tu ordenador funcione perfectamente.",
			  "images/windows_logo_02.jpg");			  	
	
	}

enablePseudoButtonEvents(incidencias3_mc, true, "onEnterFrame");	
incidencias3_mc.Texto_mc.texto_txt.text="Impresora, escaner, ...";
incidencias3_mc.onReleaseHandler = function(){
	actualiza(" Configuración de dispositivos de entrada/salida como impresora, escáner,...",
			  "images/impresora.jpg");
	}
	
enablePseudoButtonEvents(incidencias4_mc, true, "onEnterFrame");	
incidencias4_mc.Texto_mc.texto_txt.text="Programas";
incidencias4_mc.onReleaseHandler = function(){
	actualiza("Localización, descarga, instalación y configuración de programas y actualizaciones.",
			  "images/ordenador3.jpg");
	}	

enablePseudoButtonEvents(incidencias5_mc, true, "onEnterFrame");	
incidencias5_mc.Texto_mc.texto_txt.text="Copias de seguridad";
incidencias5_mc.onReleaseHandler = function(){
	actualiza("¿Necesitas realizar copias de seguridad? Entonces, estás en el sitio correcto.",
			  "images/cd.jpg");	
	}	

enablePseudoButtonEvents(incidencias6_mc, true, "onEnterFrame");	
incidencias6_mc.Texto_mc.texto_txt.text="Virus";
incidencias6_mc.onReleaseHandler = function(){
	actualiza("Se eliminan virus peleones.",
			  "images/virus.jpg");	
	}	
	

enablePseudoButtonEvents(incidencias7_mc, true, "onEnterFrame");	
incidencias7_mc.Texto_mc.texto_txt.text="Conexión a internet";
incidencias7_mc.onReleaseHandler = function(){
	_root.contenido_mc.texto_txt.text="";
	actualiza("Configuración de tu conexión a internet: adsl o analógica.",
			  "images/internet.gif");	
	}		

enablePseudoButtonEvents(incidencias8_mc, true, "onEnterFrame");	
incidencias8_mc.Texto_mc.texto_txt.text="Redes locales";
incidencias8_mc.onReleaseHandler = function(){
	_root.contenido_mc.texto_txt.text="Configurar redes domésticas para acceder a una impresora desde dos ordenadores distintos o para compartir archivos.
"+
									  "Cifrar conexiones inalámbricas para evitar el acceso a tu red por personas ajenas";
	actualiza("Configurar redes domésticas para acceder a una impresora desde dos ordenadores distintos o para compartir archivos.
"+
			  "Cifrar conexiones inalámbricas para evitar el acceso a tu red por personas ajenas",
			  "images/network.gif");	
	}		
	
enablePseudoButtonEvents(incidencias9_mc, true, "onEnterFrame");	
incidencias9_mc.Texto_mc.texto_txt.text="Recuperacion de archivos";
incidencias9_mc.onReleaseHandler = function(){
	actualiza("Recuperación de archivos borrados del disco, cd o tarjeta de memoria. ",
			  "images/recoverfiles2.jpg");
	}		

enablePseudoButtonEvents(incidencias10_mc, true, "onEnterFrame");	
incidencias10_mc.Texto_mc.texto_txt.text="Cuentas de email";
incidencias10_mc.onReleaseHandler = function(){
	actualiza("Dar de alta cuentas de email gratuitas y configuración de las mismas en microsoft outlook.",
			  "images/emailsettings.jpg");
	}		

enablePseudoButtonEvents(incidencias11_mc, true, "onEnterFrame");	
incidencias11_mc.Texto_mc.texto_txt.text="Escaneado de documentos a word";
incidencias11_mc.onReleaseHandler = function(){
	actualiza("¿Necesitas obtener el documento word editable asociado a un documento físico en papel independientemente del tamaño del documento físico: A3, A2, …?",
			  "images/scanner.jpg");
	}		

enablePseudoButtonEvents(incidencias12_mc, true, "onEnterFrame");	
incidencias12_mc.Texto_mc.texto_txt.text="Plantillas de email y fax";
incidencias12_mc.onReleaseHandler = function(){
	actualiza("Creación de plantillas de email y fax personalizadas con logo y demás datos fijos.",
			  "images/emailtemplate.jpg");
	}		

The problem turns out when I try to load an image scaled into a container called p_contenedor. If I test this movie locally or with a speed of T1(132kb) then, the images are positioned and scaled successfully. Otherwise, if we are using simulated download with low speed, the images get neither positioned nor scaled properly.
Does someone have any suggestion about why this problem might be happening?

You can take a look at this at:
www.arreglaordenador.com if you go to->Servicios->Asesoramiento->Antivirus then you will be running the previous code and you will be able to see what I mean when I say that the image does not get properly positioned and scaled. Anyways, you still can check this clicking at any other option from those sub menus from the Servicios menu because they all have the same implementation. Something strange I just realized is that sometimes the corresponding image does get centered and scaled properly after clicking for a second time in the corresponding option chosen from the menu.

Thanks in advance[/FONT][/COLOR]

try this

pic_mcl.onLoadInit=function($target_mc:MovieClip) {

you have a method of the movieClipLoader class assigned to a regular movie clip! it needs to be assigned to your movieClipLoader object.

thanks natronp