Comunidad de diseño web y desarrollo en internet online

Ayuda con insercion de imagenes

Citar            
MensajeEscrito el 18 Ago 2008 05:46 pm
Hola a todos, tengo un pequeño problemita con un codigo... les comento:
Tengo un componente que compre el cual carga las imagenes desde una carpeta especifica a traves de un XML.

Este flash es un banner que rota imagenes y conjuntamente su titulo y descripcion con el pasar del maus. He agregado algunas lineas al codigo AS y tambien al XML con el objetio de personalizar mas dicho flash.
Lo que quiero hacer ahora es aumentar un pequeño icono que cuando cambie de imagen (conjuntamente cambia el texto titulo y descripcion) tambien lo haga el icono (como haciendo referencia de que se trata dicha imagen).
Espero haber sido lo suficientemente claro con mi explicacion.

Miren, les pongo el AS3 :

Código :

//import event
import com.digicrafts.events.*;

//add click action to the photoflip
photoflip.addEventListener(ItemEvent.CLICK, iEventHandler);
photoflip.addEventListener(ItemEvent.CHANGE, iEventHandler);

photoflip.addEventListener(ItemEvent.CLICK, iEventHandler2);
photoflip.addEventListener(ItemEvent.CHANGE, iEventHandler2);

/*
photoflip.addEventListener(ItemEvent.DOUBLE_CLICK, iEventHandler);
photoflip.addEventListener(ItemEvent.MOUSE_OVER, iEventHandler);
photoflip.addEventListener(ItemEvent.MOUSE_OUT, iEventHandler);
photoflip.addEventListener(ItemEvent.SELECT, iEventHandler);
*/

////event handler for the gallery
//function eventHandler3(event:ItemEvent) {
//   switch (event.type) {
//      case ItemEvent.CHANGE :
//         // load a icon image into icon_mc
//         icon_mc.loadMovie(event.target.item.icon);
//      case ItemEvent.CLICK :
//         break;
//      default :
//         break;
//   }
//}


function iEventHandler2(event:ItemEvent) {
   switch (event.type) {
         //Event when selection change
      case ItemEvent.CHANGE :
         //change the caption to filename
         caption2.htmlText = event.item.title_sup;
         //Event when click on the item
      case ItemEvent.CLICK :
         break;
      default :
         break;
   }
}

function iEventHandler(event:ItemEvent) {
   switch (event.type) {
         //Event when selection change
      case ItemEvent.CHANGE :
         //change the caption to filename
         caption.htmlText = event.item.title;
         //Event when click on the item
      case ItemEvent.CLICK :
         break;
      default :
         break;
   }
}


Y el xml es asi:

Código :

<gallery
base = ""
background = "#FFFFFF"
banner = "#F0F0F0"
text = "#000000"
link = "#0000FF"
alink = "#FF0000"
vlink = "#800080"
date = "24/8/2007">
   <sitename>Adobe Web Photo Gallery</sitename>
   <photographer></photographer>
   <contactinfo></contactinfo>
   <email></email>
   <security><![CDATA[]]> </security>

<banner font = "Arial" fontsize = "3" color =  "#F0F0F0"> </banner>
<thumbnail base ="thumbnails/" font = "Arial" fontsize = "4" color = "#F0F0F0" border = "0" rows = "3" col = "5" valing="middle"> </thumbnail> 
<large base ="images/" font = "Arial" fontsize = "3" color = "#F0F0F0" border = "0"> </large>
<images id = "images">

<image

path = "0.jpg"
width = "350"

height = "350"

thumbpath = "0.jpg"

thumbwidth = "200"

thumbheight = "200">

<meta name = "title"><![CDATA[<b>Melgar derrota al Bolognesi</b> con gol de Sergio Ibarra 14/08/2008]]></meta>

<!-- Titulo de tipo de archivo -->
<meta name = "title_sup"><![CDATA[<b>AUDIO</b> ]]></meta>
<!-- fin -->
<meta name = "link"><![CDATA[http://www.abc.com]]></meta>

<meta name = "linktarget"><![CDATA[http://www.abc.com]]></meta>

<meta name = "icon"><![CDATA[2_.jpg]]></meta>

</image>


<image
path = "1.jpg"
width = "350"
height = "350"
thumbpath = "1.jpg"
thumbwidth = "200"
thumbheight = "200">
<meta name = "title"><![CDATA[<b>Construcciòn de la Presa Limon del Proyecto Olmos</b>. Foto: ANDINA /Carlos Lezama. 13/08/2008]]></meta>
<!-- Titulo de tipo de archivo -->
<meta name = "title_sup"><![CDATA[<b>AUDIO</b> ]]></meta>
<!-- fin -->
<meta name = "link"><![CDATA[http://www.abc.com]]></meta>

<meta name = "linktarget"><![CDATA[http://www.abc.com]]></meta>

</image>

<image
path = "2.jpg"
width = "350"
height = "350"
thumbpath = "2.jpg"
thumbwidth = "200"
thumbheight = "200">
<meta name = "title"><![CDATA[<b>Tala indiscriminada</b> de bosques secos de Mórrope. Foto: ANDINA / Gobierno regional de Lambayeque. 13/08/2008]]></meta>
<!-- Titulo de tipo de archivo -->
<meta name = "title_sup"><![CDATA[<b>VIDEO</b> ]]></meta>
<!-- fin -->
<meta name = "link"><![CDATA[http://www.abc.com]]></meta>

<meta name = "linktarget"><![CDATA[http://www.abc.com]]></meta>

</image>


<image
path = "3.jpg"
width = "350"
height = "350"
thumbpath = "3.jpg"
thumbwidth = "200"
thumbheight = "200">
<meta name = "title"><![CDATA[<b>Ministro de Energía y Minas</b>, Juan Valdivia, y presidente regional de Loreto, Yván Vásquez, tras suscribir convenio marco 

para electrificar comunidades en extrema pobreza. Foto: ANDINA / MEM. 13/08/2008 ]]></meta>
<!-- Titulo de tipo de archivo -->
<meta name = "title_sup"><![CDATA[<b>FOTOGRAFÍA</b> ]]></meta>
<!-- fin -->
<meta name = "link"><![CDATA[http://www.abc.com]]></meta>

<meta name = "linktarget"><![CDATA[http://www.abc.com]]></meta>

</image>


<image
path = "4.jpg"
width = "350"
height = "350"
thumbpath = "4.jpg"
thumbwidth = "200"
thumbheight = "200">
<meta name = "title"><![CDATA[<b>Enrique Gubbins</b>, gerente general de SDF Energía, presentó a la prensa la primera planta de cogeneración de energía 

eléctrica en el Perú. Foto : ANDINA / Jorge Paz H 13/08/2008]]></meta>
<!-- Titulo de tipo de archivo -->
<meta name = "title_sup"><![CDATA[<b>VIDEO</b> ]]></meta>
<!-- fin -->
<meta name = "link"><![CDATA[http://www.abc.com]]></meta>

<meta name = "linktarget"><![CDATA[http://www.abc.com]]></meta>

</image>


<image
path = "5.jpg"
width = "350"
height = "350"
thumbpath = "5.jpg"
thumbwidth = "200"
thumbheight = "200">
<meta name = "title"><![CDATA[<b>Declaraciones del Ministro de Defensa</b>, Antero Flores, tras participar en consejo de ministros.Foto:SEPRES/OscarFarje 

Gomero 13/08/2008 ]]></meta>
<!-- Titulo de tipo de archivo -->
<meta name = "title_sup"><![CDATA[<b>VIDEO</b> ]]></meta>
<!-- fin -->
<meta name = "link"><![CDATA[http://www.abc.com]]></meta>

<meta name = "linktarget"><![CDATA[http://www.abc.com]]></meta>

</image>


<image
path = "6.jpg"
width = "318"
height = "350"
thumbpath = "6.jpg"
thumbwidth = "181"
thumbheight = "200">
<meta name = "title"><![CDATA[<b>La esposa del Presidente de la República</b>, inauguró la II Convención Nacional de la Familia: “Las familias, como eje 

estratégico para la inclusión y desarrollo”.Foto:ANDINA/Norman Cordova 13/08/2008 ]]></meta>
<!-- Titulo de tipo de archivo -->
<meta name = "title_sup"><![CDATA[<b>MULTIMEDIA</b> ]]></meta>
<!-- fin -->
<meta name = "link"><![CDATA[http://www.abc.com]]></meta>

<meta name = "linktarget"><![CDATA[http://www.abc.com]]></meta>

</image>


<image
path = "7.jpg"
width = "350"
height = "350"
thumbpath = "7.jpg"
thumbwidth = "200"
thumbheight = "200">
<meta name = "title"><![CDATA[<b>Por segundo día consecutivo</b>, el presidente Alan García visitó Pisco y Chincha para inspeccionar el avance de las obras 

que se realizan en las zonas afectadas por el terremoto. 13/08/2008 ]]></meta>
<!-- Titulo de tipo de archivo -->
<meta name = "title_sup"><![CDATA[<b>VIDEO</b> ]]></meta>
<!-- fin -->
<meta name = "link"><![CDATA[http://www.abc.com]]></meta>

<meta name = "linktarget"><![CDATA[http://www.abc.com]]></meta>

</image>


<image
path = "8.jpg"
width = "350"
height = "350"
thumbpath = "8.jpg"
thumbwidth = "200"
thumbheight = "200">
<meta name = "title"><![CDATA[<b>El presidente Alan García visitó Pisco y Chincha</b> para inspeccionar el avance de las obras que se realizan en las zonas 

afectadas por el terremoto. Foto: ANDINA /Sepres/ Oscar Farje. 13/08/2008 ]]></meta>
<!-- Titulo de tipo de archivo -->
<meta name = "title_sup"><![CDATA[<b>FOTOGRAFÍA</b> ]]></meta>
<!-- fin -->
<meta name = "link"><![CDATA[http://www.abc.com]]></meta>

<meta name = "linktarget"><![CDATA[http://www.abc.com]]></meta>

</image>


<image
path = "9.jpg"
width = "350"
height = "350"
thumbpath = "9.jpg"
thumbwidth = "200"
thumbheight = "200">
<meta name = "title"><![CDATA[<b>La cantante Damaris en ceremonia por el Dia Internacional de la Juventud</b> en Palacio de Gobierno. Foto: ANDINA/ Vidal 

Tarqui 12/08/2008 ]]></meta>
<!-- Titulo de tipo de archivo -->
<meta name = "title_sup"><![CDATA[<b>MULTIMEDIA</b> ]]></meta>
<!-- fin -->
<meta name = "link"><![CDATA[http://www.abc.com]]></meta>

<meta name = "linktarget"><![CDATA[http://www.abc.com]]></meta>

</image>

<image
path = "10.jpg"
width = "350"
height = "350"
thumbpath = "10.jpg"
thumbwidth = "200"
thumbheight = "200">
<meta name = "title"><![CDATA[<b>Mig 29 de la Fuerza Aérea del Perú</b>. 12/08/2008 ]]></meta>
<!-- Titulo de tipo de archivo -->
<meta name = "title_sup"><![CDATA[<b>VIDEO</b> ]]></meta>
<!-- fin -->
<meta name = "link"><![CDATA[http://www.abc.com]]></meta>

<meta name = "linktarget"><![CDATA[http://www.abc.com]]></meta>

</image>


<image
path = "11.jpg"
width = "350"
height = "350"
thumbpath = "11.jpg"
thumbwidth = "200"
thumbheight = "200">
<meta name = "title"><![CDATA[<b>Ministro del interior,Luis Alva Castro</b>,entrega patrulleros y motocicletas y presenta a los cien nuevos policias que 

prestaran seguridad a la ciudad de pisco. Foto:ANDINA/Jack Ramón Morales 11/08/2008 ]]></meta>
<!-- Titulo de tipo de archivo -->
<meta name = "title_sup"><![CDATA[<b>AUDIO</b> ]]></meta>
<!-- fin -->
<meta name = "link"><![CDATA[http://www.abc.com]]></meta>

<meta name = "linktarget"><![CDATA[http://www.abc.com]]></meta>

</image>


<image
path = "12.jpg"
width = "234"
height = "350"
thumbpath = "12.jpg"
thumbwidth = "133"
thumbheight = "200">
<meta name = "title"><![CDATA[<b>Municipalidad de Miraflores</b> dona a Compañia de Bomberos Miraflores 28, moderna y equipada autobomba. Foto: ANDINA/Rafael 

Cornejo 11/08/2008 ]]></meta>
<!-- Titulo de tipo de archivo -->
<meta name = "title_sup"><![CDATA[<b>FOTOGRAFÍA</b> ]]></meta>
<!-- fin -->
<meta name = "link"><![CDATA[http://www.abc.com]]></meta>

<meta name = "linktarget"><![CDATA[http://www.abc.com]]></meta>

</image>


<image
path = "13.jpg"
width = "350"
height = "350"
thumbpath = "13.jpg"
thumbwidth = "200"
thumbheight = "200">
<meta name = "title"><![CDATA[<b>Director de cine, Alex Rivero</b>. Foto: ANDINA/Rubén Grández 10/08/2008 ]]></meta>
<!-- Titulo de tipo de archivo -->
<meta name = "title_sup"><![CDATA[<b>VIDEO</b> ]]></meta>
<!-- fin -->
<meta name = "link"><![CDATA[http://www.abc.com]]></meta>

<meta name = "linktarget"><![CDATA[http://www.abc.com]]></meta>

</image>


<image
path = "14.jpg"
width = "260"
height = "350"
thumbpath = "14.jpg"
thumbwidth = "148"
thumbheight = "200">
<meta name = "title"><![CDATA[<b>Presidente del Congreso</b> se presentò esta mañana en RPP. Foto:ANDINA/Hector Vinces. 10/08/2008 ]]></meta>
<!-- Titulo de tipo de archivo -->
<meta name = "title_sup"><![CDATA[<b>MULTIMEDIA</b> ]]></meta>
<!-- fin -->
<meta name = "link"><![CDATA[http://www.abc.com]]></meta>

<meta name = "linktarget"><![CDATA[http://www.abc.com]]></meta>

</image>



</images>
</gallery>


Espero me puedanespero me puedan ayudar, muchas gracias de antemano

Por julfit0

45 de clabLevel



 

msie7
Citar            
MensajeEscrito el 18 Ago 2008 07:13 pm
Como te había comentado en el foro de AS, te falta código, aquí solamente has puesto los eventos, pero debe haber otras clases, entre ellas una para leer el XML y otra para crear los thumbnails.

Por elchininet

Claber

3921 de clabLevel

17 tutoriales

Genero:Masculino  

Front-end developer at Booking.com

firefox
Citar            
MensajeEscrito el 18 Ago 2008 08:56 pm
Es decir, unas 300 líneas más ;)
Sugerencia: postear solo la porción relevante

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 18 Ago 2008 11:17 pm
El XML con que pongas un ejemplo de nodo basta.

Por elchininet

Claber

3921 de clabLevel

17 tutoriales

Genero:Masculino  

Front-end developer at Booking.com

firefox

 

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