Comunidad de diseño web y desarrollo en internet online

Problema con archivo flash.

Citar            
MensajeEscrito el 27 Feb 2006 05:07 pm
Hola.
Estoy montando una web y me encuentro con problema.
Tengo un fichero llamado inicio.swf el cual me carga desde la Agenda (php) la ultima noticia introducida y con la variante de <mostrar en primera pagina Si o NO>
Pues bien el problema radica que la imagen no aparece y eso que al introducir la noticia y la foto, la imagen se sube al servidor y el texto de la noticia se almacena correctamente ya que desde la agenda aparece, y todo eso habiendo dicho que se muestre en primera pagina.
Os muestro aqui el codigo por si tuviera algun error:
stop();
function inicio() {
var Register_1_ = _root;
Loading();
if (Cartulinas.length > 0) {
ft = 0;
while (ft < Cartulinas.length) {
Register_1_.titulares_mc[Cartulinas[ft]].removeMovieClip();
ft++;
}
}
pagXmlFichas.load(((ObjVars.UrlNoticias + paginacion) + temporada));
pagXmlFichas.ignoreWhite = true;
PreCarga = setInterval(Leidos, 5);
}
function Leidos() {
_root.loading_txt._visible = false;
if (Fin) {
_root.loading_txt._visible = true;
} else {
clearInterval(PreCarga);
}
pagXmlFichas.onLoad = function() {
clearInterval(PreCarga);
Fin = false;
ParseFichas();
};
}
function Loading() {
_root.createTextField("loading_txt", 1, 0, 0, 0, 0);
with (loading_txt) {
autoSize = true;
background = false;
_visible = true;
_x = 160;
_y = 90;
text = "Cargando noticias...";
}
var css = new TextFormat();
with (css) {
font = "Verdana";
size = 10;
bold = true;
color = 9605778;
}
_root.loading_txt.setTextFormat(css);
}
function ParseFichas() {
clearInterval(PreCarga);
_root.loading_txt._visible = false;
Fin = true;
var Register_2_ = new Array();
var Register_2_ = pagXmlFichas.firstChild.childNodes;
ArrayNoticias.titulo = Array();
ArrayNoticias.noticia = Array();
ArrayNoticias.fecha = Array();
ArrayNoticias.imagen = Array();
var Register_1_ = 0;
while (Register_1_ <= (Register_2_.length - 1)) {
ArrayNoticias.titulo[Register_1_] = Register_2_[Register_1_].childNodes[0].firstChild.nodeValue;
ArrayNoticias.noticia[Register_1_] = Register_2_[Register_1_].childNodes[1].firstChild.nodeValue;
ArrayNoticias.fecha[Register_1_] = Register_2_[Register_1_].childNodes[2].firstChild.nodeValue;
ArrayNoticias.imagen[Register_1_] = Register_2_[Register_1_].childNodes[3].firstChild.nodeValue;
Register_1_++;
}
PintarTitulos();
ParseTemporadas();
}
function PintarTitulos() {
var Register_2_ = _root;
var yEspacio = (Register_2_.titulares_mc.linea_mc._height + JccYspacio);
var Register_3_ = (Register_2_.titulares_mc.linea_mc._y - yEspacio);
i = 0;
while (i < ArrayNoticias.titulo.length) {
var Register_1_ = ("titulo" + i);
Cartulinas[i] = Register_1_;
Register_2_.titulares_mc.linea_mc.duplicateMovieCl ip(Register_1_, i);
var Register_3_ = (Register_3_ + yEspacio);
Register_2_.titulares_mc[Register_1_]._y = Register_3_;
Register_2_.titulares_mc[Register_1_].linea_txt.text = ArrayNoticias.titulo[i];
Register_2_.titulares_mc[Register_1_].ID = i;
Imagen = ArrayNoticias.imagen[i] == "" ? Imagen : ArrayNoticias.imagen[i];
Register_2_.titulares_mc[Register_1_].onRelease = function() {
VerNoticia(this.ID);
};
i++;
}
VerNoticia(0);
}
function VerNoticia(id) {
var Register_1_ = id;
var Register_2_ = _root;
if (anterior) {
anterior.backgroundColor = 16514302;
anterior.textColor = 0;
}
Register_2_.textbox.noticia_txt.text = ArrayNoticias.noticia[Register_1_];
Register_2_.titulares_mc[("titulo" + Register_1_)].linea_txt.background = true;
Register_2_.titulares_mc[("titulo" + Register_1_)].linea_txt.backgroundColor = 0;
Register_2_.titulares_mc[("titulo" + Register_1_)].linea_txt.textColor = 16514302;
anterior = Register_2_.titulares_mc[("titulo" + Register_1_)].linea_txt;
Imagen = ArrayNoticias.imagen[Register_1_] == undefined ? Imagen : ArrayNoticias.imagen[Register_1_];
var Register_3_ = (((((ObjVars.UrImages + ArrayNoticias.imagen[Register_1_]) + "&x=") + AnchoImg) + "&y=") + AltoImg);
if (Register_3_ != undefined) {
loadMovie(Register_3_, Register_2_.imagen_mc);
}
}
function ParseTemporadas() {
var Register_3_ = _root;
var pagXmlTemp = new XML();
pagXmlTemp.load(ObjVars.UrlTemporadas);
pagXmlTemp.ignoreWhite = true;
ArrayTemporadas.visto = Array();
ArrayTemporadas.ref = Array();
pagXmlTemp.onLoad = function() {
var Register_3_ = _root;
pagXmlTemp.ignoreWhite = true;
var Temporadas = new Array();
Temporadas = pagXmlTemp.firstChild.childNodes;
var Register_1_ = 0;
while (Register_1_ <= (Temporadas.length - 1)) {
ArrayTemporadas.visto[Register_1_] = Temporadas[Register_1_].childNodes[0].firstChild.nodeValue;
ArrayTemporadas.ref[Register_1_] = Temporadas[Register_1_].childNodes[1].firstChild.nodeValue;
Register_1_++;
}
var yEspacio = (Register_3_.temporadas_mc._height + JccYspacio);
var yStart = (Register_3_.temporadas_mc._y - yEspacio);
var Register_1_ = 0;
while (Register_1_ < ArrayTemporadas.visto.length) {
var Register_2_ = ("temporada" + Register_1_);
Register_3_.temporadas_mc.duplicateMovieClip(Regis ter_2_, Register_1_);
yStart += yEspacio;
Register_3_[Register_2_]._y = yStart;
Register_3_[Register_2_].linea_txt.text = ArrayTemporadas.visto[Register_1_];
Register_3_[Register_2_].ID = ArrayTemporadas.ref[Register_1_];
Register_3_[Register_2_].onRelease = function() {
VerTemporada(this.ID);
};
Register_1_++;
}
};
}
function VerTemporada(fecha) {
temporada = "&desde=" + fecha;
inicio();
}
system.useCodepage = true;
var idioma = "es";
var ObjVars = new LoadVars();
ObjVars.load((("rutas_" + idioma) + ".txt"));
ObjVars.onLoad = function() {
inicio();
};
var pagXmlFichas = new XML();
var paginacion = 0;
var paginacionInv = 0;
var JccYspacio = 5;
var Imagen = "";
var AnchoImg = 327;
var AltoImg = 297;
var temporada = "";
var Cartulinas = new Array();
var ArrayNoticias = new Array();
var ArrayTemporadas = new Array();
var anterior;

Por cierto lo de las temporadas es que hay 2005-2006 y 2006-2007.
Por favor revisar el codigo y que alguien me diga si puede tener algun error.
Gracias y un saludo.

Por bytezero

3 de clabLevel



 

msie
Citar            
MensajeEscrito el 27 Feb 2006 07:30 pm
pon en tu agenda.swf "_lockroot = true;" en el primer frame de la primera capa (sin las comillas claro)

Por _CONEJO

BOFH

7639 de clabLevel

17 tutoriales
21 articulos

 

clabbrowser
Citar            
MensajeEscrito el 27 Feb 2006 08:27 pm
La web carga de principio un nieve.swf (efecto de nieve) despues un noticia-inicio.swf donde muestra el texto de la ultima noticia introducida y con el parametro PP=SI (Portada Principal) y por ultimo el inicio.swf (que es el fichero de mas arriba) que ese se encarga de la imagen introducida con la noticia. Dicha imagen se sube bien al servidor ya que en el directorio me aparece.
He introducido _lockroot = true; tanto en el noticia-inicio.swf como en el inicio.swf y me sigue sin aparecer la maldita foto.
Los datos de entrar la noticia se hacen desde un fichero PHP y lo he verificado y en la base de datos aparece todo correcto, incluido el parametro pp.
Por favor, que alguien revise el codigo porque algo debe estar mal.
Un saludo para todos.
Ahh! ICEM4N mira tu privado please.
Gracias a todos.

Por bytezero

3 de clabLevel



 

msie
Citar            
MensajeEscrito el 27 Feb 2006 11:21 pm
Los mensajes PRIVADOS, son para temas PRIVADOS

Tu problema es un problema de rutas, algo de estar mal. Revísalas todas

Por _CONEJO

BOFH

7639 de clabLevel

17 tutoriales
21 articulos

 

clabbrowser
Citar            
MensajeEscrito el 27 Feb 2006 11:41 pm
Pero como de rutas? A que te refieres?
Perdonad las molestias ante todo.
Saludos.

Por bytezero

3 de clabLevel



 

msie
Citar            
MensajeEscrito el 28 Feb 2006 01:36 am
rutas... si no me equivoco refiere a por ejemplo /fotos/imagen.jpg verifica si las rutas de las imagenes son correctas..o si estan bien vinculadas en el flash.., porque por lo que entiendo ese es tu problema no te carga las imagenes... o si no es con las imagenes... verifica que la ruta que esta en el flash te lleve al destino correcto, es decir al fichero que carga o ejecuta..

Por kvsol

4 de clabLevel



Genero:Masculino  

msie
Citar            
MensajeEscrito el 28 Feb 2006 03:24 pm
o si no será un problema con los permisos de la imagen

Por _CONEJO

BOFH

7639 de clabLevel

17 tutoriales
21 articulos

 

clabbrowser
Citar            
MensajeEscrito el 28 Feb 2006 04:41 pm
Me he mirado el codigo y he detectado que yo ponia:

var Register_3_ = (((((ObjVars.UrImages + ArrayNoticias.imagen[Register_1_]) + "&x=") + AnchoImg) + "&y=") + AltoImg);

Y lo varie por UrlImages, vamos le añadi una L.
Aun asi, sigue sin funcionar. os juro que no lo puedo entender.
Lo extraño es que desde la agenda al pulsar la noticia la imagen carga perfecta, pero desde aqui nada de nada.
He mirado los permisos y yo creo que estan bien ya que se ven desde la agenda.
La ruta donde se almacenan las imagenes es images_upload/ se podria quitar la variable url_Stok_Images (mysql) y poner en el actionscript directamente ese directorio?
Gracias por ayudarme. Haber si conseguimos que funcione, please.

Por bytezero

3 de clabLevel



 

msie
Citar            
MensajeEscrito el 28 Feb 2006 04:46 pm
Entonces es una ruta "interna" de flash, es decir el loadMovie no está indicando bien el movie clip donde debe de ir la foto

Por _CONEJO

BOFH

7639 de clabLevel

17 tutoriales
21 articulos

 

clabbrowser
Citar            
MensajeEscrito el 28 Feb 2006 05:17 pm
Y como miro eso?

Por bytezero

3 de clabLevel



 

msie
Citar            
MensajeEscrito el 28 Feb 2006 06:47 pm
Y el premio de hoy a la Impaciencia es para .... (redoble) .... bytezero .... (aplausos)

¿ Qué parte de

ICEM4N escribió:


Los mensajes PRIVADOS, son para temas PRIVADOS

NO entendiste ? Y por temas PRIVADOS no me refiero a que tengas una duda TÉCNICA "personal"

Después de vomitar el código (y es que poner semejante tocho es para quedarse a gusto) y de hacer caso omiso a los consejos que te dimos... te repito

loadMovie(Register_3_, Register_2_.imagen_mc); <<--- ESA linea que es donde tienes el loadMovie!!! Debes de asegurarte que exista el MovieClip de destino!! debido a que cargas agenda en otro SWF puede ser que falle por eso!

Por _CONEJO

BOFH

7639 de clabLevel

17 tutoriales
21 articulos

 

clabbrowser
Citar            
MensajeEscrito el 28 Feb 2006 08:54 pm
Lo he mirado todo y existe el movieclib (vamos la imagen). He verificado todas las rutas y son correctas.
Ademas deben serlo porque el agenda.swf carga a la perfeccion.
Empieza la web y carga ese inicio.swf y el agenda.swf es del menu, o sea que no los carga a la vez.
Yo sinceramente has aqui he llegado. Voy muy perdido con el tema.
Si alguien se ve capaz de ayudarme (se recompensara) que me envie un email a [email protected] o bien me agrege al msn y hablamos.
Saludos y gracias a todos.

Por bytezero

3 de clabLevel



 

msie
Citar            
MensajeEscrito el 28 Feb 2006 10:22 pm

bytezero escribió:

Si alguien se ve capaz de ayudarme (se recompensara)


Ok, si te urge tanto envíame los FLA y 50€ y te lo soluciono.

Imagino que debe de ser un problema de rutas porque en agenda.swf se ve bien pero al cargar agenda dentro de inicio.swf las rutas cambian el _root de agenda ya no es ese _root por ejemplo...

Por _CONEJO

BOFH

7639 de clabLevel

17 tutoriales
21 articulos

 

clabbrowser

 

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