Comunidad de diseño web y desarrollo en internet online

Problema SWF Anidado

Citar            
MensajeEscrito el 06 May 2011 08:01 pm
Buenas Tardes Comunidad de Cristalab

Esta vez les escribo por un error que me tiene la cabeza echa trizas. la cosa es esta tengo varios swf anidados, es decir:

index.swf
!
noticias.swf
!
calendario.swf

Donde calendario.swf tiene algunos botones, y hace una búsqueda a un script de php. Pero no me funcionan los botones, ni hace nada. Este es el código

Código ActionScript :

var url_5:String = path+"swf/calendario2.swf";
var loader_5:Loader = new Loader();
var peticion_5:URLRequest = new URLRequest(url_5);

//INICIALIZA
   //Le añado los listeners
   ponerListeners_5(loader_5.contentLoaderInfo);
   loader_5.load(peticion_5);
   addEventListener("HA_CARGADO_5",cargado_5);

function ponerListeners_5(dispatcher:IEventDispatcher):void {
   dispatcher.addEventListener(Event.COMPLETE, completado_5);
}

function completado_5(event:Event):void {
   //clip_5 = MovieClip(event.target.content);
   event.target.content.x = 100;
   event.target.content.y = 120;
   dispatchEvent(new Event("HA_CARGADO_5"));
}

function cargado_5(e:Event){
   var num:int = componentes.length;
   //num++;
   componentes.push(loader_5);
   
   addChild(componentes[num]);
        //Pruebo creando una funcion dentro del calendario2.swf q se llame init() para q comience la carga en el primer fotograma
   componentes[num].init();
        //Tambien he probado creando un listener para comenzar la carga y nada
        dispatchEvent(new Event("CARGA_LISTA"));
   //envia al fondo
   //this.setChildIndex(componentes[num],3)
}


Es como si ese swf anidado no tuviera funciones ni iniciara a cargar.

Por favor! ayudaaa

Por freddydg

16 de clabLevel



 

chrome
Citar            
MensajeEscrito el 07 May 2011 03:29 am
Bueh.. terminé usando UILoader xD y funcionó bien!

Por freddydg

16 de clabLevel



 

chrome

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.