Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/04/2006, 15:49
Rvela
 
Fecha de Ingreso: junio-2005
Ubicación: Trujillo - Peru
Mensajes: 31
Antigüedad: 18 años, 10 meses
Puntos: 0
Ayuda con asfunction

Tengo una pelicula en la cual cargo un swf externo ... el swf externo tiene una funcion a la cual llamo con asfunction (Es un sistema de noticias, primero carga el resumen de noticias y de ahi cuando se hace click llama a la funcion donde carga el contenido de la noticia )... el codigo es el siguiente

Código:
ref.unloadMovie();
Obj_resumen = new LoadVars();
Obj_resumen.load("consulta.php");
myTexto2.htmlText = "Cargando noticias ...";
Obj_resumen.onLoad = function() {
	codigo = Obj_resumen.codigo.split("@@@");
	titulo = Obj_resumen.titulo.split("@@@");
	resumen = Obj_resumen.resumen.split("@@@");
	fecha = Obj_resumen.fecha.split("@@@");
	separador = "------------------------";
	myTexto2.htmlText = "";
	for (var i = 0; i<titulo.length; i++) {
		myTexto2.htmlText += "<b>"+"<u>"+"<a href=\"asfunction:linkFuenteNoticias,"+codigo[i]+"\">"+titulo[i]+"</a></u></b><br>"+resumen[i]+"<br><br>"+"Fecha: <u><i>"+fecha[i]+"</i></u>"+"<br>"+separador;
	}
};

Y la funcion a que llamo en href es :


Código:
function LinkFuenteNoticias(codigo) {
	myTexto2.text = "";
	ref.unloadMovie();
	Obj_det = new LoadVars();
	myTexto2.htmlText = "Cargando noticia ...";
	Obj_det.load("consulta_det.php?cod="+codigo);
	Obj_det.onLoad = function() {
	titulo = Obj_det.titulo;
	contenido = Obj_det.contenido;
	fecha = obj_det.fecha;
	imagen = Obj_det.imagen;
	myTexto2.htmlText = "";
	if(imagen != ""){
	              myTexto2.htmlText = "<u>"+"<b>"+titulo+"</b></u>"+"<br><A HREF=\"asfunction:CargarImagen,"+imagen+"\"><u>(Ver Imagen)</u></A><br>"+contenido+"<br><br><A HREF=\"asfunction:LinkFuenteNoticias,principal\"><u>Volver</u></A>";
	}else{
		myTexto2.htmlText = "<u>"+"<b>"+titulo+"</b></u>"+"<br>"+contenido+"<br><br><A HREF=\"asfunction:LinkFuenteNoticias,principal\"><u>Volver</u></A>";
	}
	
}
Pero no me funciona, osea cargan las noticias pero cuando quiero ver el detalle de noticias no carga .. supongo q es por q esta dentro de otro swf, intente poner asfunction:_root.LinkFuenteNoticias .. y nada tampoco ... tambien intente con asfunction:this.LinkFuenteNoticias

Ahh .. el codigo anterior esta en el primer frame de la pelicula q carga dentro del swf principal y tambien la instancia ref ...

Agradesco su ayuda !!