Foros del Web » Creando para Internet » Flash y Actionscript »

Como se extrae una imagen de una carpeta?

Estas en el tema de Como se extrae una imagen de una carpeta? en el foro de Flash y Actionscript en Foros del Web. Hola. Estoy haceindo un gestor de noticias en Flash + Php + Mysql Tengo ya hecho la salida de datos. Un swf que genera noticia ...
  #1 (permalink)  
Antiguo 01/08/2005, 06:16
Avatar de zocotoo  
Fecha de Ingreso: febrero-2003
Mensajes: 74
Antigüedad: 21 años, 2 meses
Puntos: 0
Exclamación Como se extrae una imagen de una carpeta?

Hola.

Estoy haceindo un gestor de noticias en Flash + Php + Mysql

Tengo ya hecho la salida de datos.
Un swf que genera noticia tras noticia sacadas rodas ellas de una base de datos.
Tengo 5 campos:
  • Titulo
  • Subtitulo
  • Fecha
  • Noticia
  • Foto

El campo de foto lo que me tira ahora mismo es el nombre de la misma pero realmente lo que quiero es que me saque la imagen.

¿Como hago esto?

Sería un buen comienzo aprender a sacar imágenes de una carpeta para luego conectarlo todo con este código y que todo funcionase maravillosamente... pero...

Dejo el código de getdata.php:

Código PHP:
<?
    $database 
"bbdd";
    
$conexion mysql_connect("localhost","user","password") or die ("No se ha encontrado el servidor");
    
    
mysql_select_db($database);
    
    
$query "SELECT * FROM ofertas ORDER BY fecha ASC";
    
    
$result mysql_query($query) or die ("Error en la query");
    
    
$num_rows mysql_num_rows($result);
    
    for(
$i=0;$i<$num_rows;$i++){
    
        
$row mysql_fetch_array($result);
        
        
$titulo "titulo$i";
        
$titulo $row['titulo'] ;
        
        
$subtitulo "subtitulo$i";
        
$subtitulo $row['subtitulo'];

        
$fecha "fecha$i";
        
$fecha $row['fecha'];
        
        
$noticia "noticia$i";
        
$noticia $row['noticia'];
        
        
$foto "foto$i";
        
$foto $row['foto'];
        
        print(
"&foto$i=$foto");
        
        print(
"&noticia$i=$noticia");        
        
        print(
"&fecha$i=$fecha");
        
        print(
"&subtitulo$i=$subtitulo");
        
        print(
"&titulo$i=$titulo");


        
    }
    
    
mysql_close($conexion);
    
?>

EL actionscript:

Código HTML:
System.useCodepage = true;
format = new TextFormat();

noticia.html = true;

function formatText(textBox,ita,siz,Bold,colour){
	format.italic = ita;
	format.size = siz;
	format.bold = Bold;
	format.font = "Arial";
	format.align = "left";
	format.color = colour;
	textBox.setTextFormat(format);
}

titulo.text = "Loading news...";
formatText(titulo,true,12,true);
subtitulo.text = "Loading...";
formatText(subtitulo,true,12,true,"0xFF0000");
fecha.text = "Loading...";
formatText(fecha,true,12,true,"0xFF0000");
noticia.text = "Loading...";
formatText(noticia,true,12,true,"0xFF0000");
foto.text = "Loading...";
formatText(foto,true,12,true,"0xFF0000");

temp = new LoadVars();
temp.load("http://www.blabla.net/blabla/getdata.php");
temp.onLoad = function(){
	myArray = new Array();
	for(var a in this){
		if(a != "onLoad"){
			myArray.push(this[a]);
		}
	}
	titulo.text = myArray[0];
	formatText(titulo,false,12,true,"0xFF0000");
	subtitulo.text = myArray[1];
	formatText(subtitulo,false,12,true,"0xFF0000");
	fecha.text = myArray[2];
	formatText(fecha,false,12,true,"0xFF0000");
	noticia.htmlText = myArray[3];
	formatText(noticia,true,12,true);
	foto.htmlText = myArray[4];
	formatText(foto,true,12,true);
	var oldt = getTimer();
	var ok = true;
	var l = myArray.length;
	var i = 5;
	_root.onEnterFrame = function(){
		t = getTimer();
		if(t-oldt>2000){
			titulo.text = myArray[i];
			formatText(titulo,false,12,true,"0xFF0000");
			subtitulo.text = myArray[i+1];
			formatText(subtitulo,false,12,true,"0xFF0000");
			fecha.text = myArray[i+2];
			formatText(fecha,false,12,true,"0xFF0000");
			noticia.htmlText = myArray[i+3];
			formatText(noticia,true,12,true);
			foto.htmlText = myArray[i+4];
			formatText(foto,true,12,true);
			if(i<(l-5)){
				i += 5;
			}else{
				i = 0;
			}
			oldt = getTimer();
		}
	};
};

Gracias a todos...
__________________
Yip yop Dafunk!!
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 11:57.