Ver Mensaje Individual
  #4 (permalink)  
Antiguo 30/05/2007, 08:47
Avatar de karemlis
karemlis
 
Fecha de Ingreso: agosto-2006
Mensajes: 153
Antigüedad: 17 años, 7 meses
Puntos: 0
Re: se puede llamar una imagen con una variable..??

Gracias rizzo..

bueno sabes..probe tu solucion..y aun asi no resulto..pero despues encontre otra mejor...igual la doy a concoer por si a alguien le sirve...

en el php seria asi:
Código PHP:
<?    
    $ruta_img
="ATM/caso1/circulos_.jpg";
    
/*$ruta_img=$_GET["direccion"]."/".$_GET["imagen"];*/

?>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
b#version=6,0,29,0" width="550" height="400">
      <param name="movie" value="cargaimagen.swf">
      <param name="FlashVars" value="ruta_img=<?php echo $ruta_img  ?>" />
      <embed src="cargaimagen.swf" FlashVars="ruta_img=<?php echo $ruta_img
?>
" pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="550" height="400" />    
      <param name="quality" value="high">
    </object>


</body>
</html>
si se fijan la variable ruta_img se llama en el param de la llamada al flash... asi como tambien en el embed para el caso de mozilla...

bueno el codigo del flash seria este:
Código:
ruta_img=_root.ruta_img;
texto.text=ruta_img
function cargar_imagen(nombre_clip, ruta_imagen) { 
      this.createEmptyMovieClip(nombre_clip, 5); 
      this[nombre_clip].loadMovie(ruta_imagen, 9); 
      this.onEnterFrame = function() { 
            if (this[nombre_clip].getBytesTotal()>50 && this[nombre_clip].getBytesLoaded()>=this[nombre_clip].getBytesTotal()) { 
                  this[nombre_clip]._width=300; 
                  this[nombre_clip]._height=250; 
                  delete this.onEnterFrame; 
            } else { 
                  tot = this.getBytesTotal(); 
                  car = this.getBytesLoaded(); 
                  por = Math.round(car*100/tot); 
                  porcentaje.text = por+"%"; 
            } 
      }
} 
cargar_imagen(aqui_imagen,ruta_img);
Bueno esta solucion funciono ok...ojal le sirva a alguien mas que ande por ahi desesperado como estaba yo...

yap..aah!! y a rizzo..bueno te cuento que si me manejo en php..pero ahora me estoy metiendo mas en lo que es actionscript..

bueno saludos y gracias!!

karem