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

Mostrar datos de un xml mediante Action Script

Estas en el tema de Mostrar datos de un xml mediante Action Script en el foro de Flash y Actionscript en Foros del Web. Hola mundo! Recurro a vosotros por que llevo mas de 2 meses dando vuletas y empapandome foros y manuales, y no saco nada en claro ...
  #1 (permalink)  
Antiguo 05/05/2010, 03:40
 
Fecha de Ingreso: marzo-2010
Mensajes: 3
Antigüedad: 14 años
Puntos: 0
Mostrar datos de un xml mediante Action Script

Hola mundo!

Recurro a vosotros por que llevo mas de 2 meses dando vuletas y empapandome foros y manuales, y no saco nada en claro en algo tan sencillo para algunos...

Pretendo mostrar datos de un xml de yahoo de meteorologia mediante action script, pero me lio mucho cuando asigno nobres a la caja de texto variable y esta se entiende con AScript.

Tan solo necesito que me enseñeis la luz de como mostrar datos por ej. el nombre de la ciudad que en este caso es tarragona la temperatura o el sunrise o sunset...

URL del yahoo: http://xml.weather.yahoo.com/forecastrss?p=SPXX0076&u=c

PD. Con el codigo lo mas sencillo posible me conformo porfavor, asi aprendo el mecanismo.

MUchas gracias un poquito de luz!!! please!

El xml es el siguiente:

<?xml version="1.0" encoding="UTF-8" ?>
- <channels>
- <rss version="2.0" xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
- <channel>
<title>Yahoo! Weather - Tarragona, SP</title>
<link>http://us.rd.yahoo.com/dailynews/rss/weather/Tarragona__SP/*http://weather.yahoo.com/forecast/SPXX0076_c.html</link>
<description>Yahoo! Weather for Tarragona, SP</description>
<language>en-us</language>
<lastBuildDate>Wed, 05 May 2010 8:30 am CEST</lastBuildDate>
<ttl>60</ttl>
<yweather:location city="Tarragona" region="" country="SP" />
<yweather:units temperature="C" distance="km" pressure="mb" speed="km/h" />
<yweather:wind chill="8" direction="260" speed="9.66" />
<yweather:atmosphere humidity="62" visibility="9.99" pressure="982.05" rising="1" />
<yweather:astronomy sunrise="6:48 am" sunset="8:56 pm" />
- <image>
<title>Yahoo! Weather</title>
<width>142</width>
<height>18</height>
<link>http://weather.yahoo.com</link>
<url>http://l.yimg.com/a/i/us/nws/th/main_142b.gif</url>
</image>
- <item>
<title>Conditions for Tarragona, SP at 8:30 am CEST</title>
<geo:lat>41.12</geo:lat>
<geo:long>1.25</geo:long>
<link>http://us.rd.yahoo.com/dailynews/rss/weather/Tarragona__SP/*http://weather.yahoo.com/forecast/SPXX0076_c.html</link>
<pubDate>Wed, 05 May 2010 8:30 am CEST</pubDate>
<yweather:condition text="Partly Cloudy" code="30" temp="9" date="Wed, 05 May 2010 8:30 am CEST" />
- <description>
- <![CDATA[ <img src="http://l.yimg.com/a/i/us/we/52/30.gif"/><br />
<b>Current Conditions:</b><br />
Partly Cloudy, 9 C<BR />
<BR /><b>Forecast:</b><BR />
Wed - AM Light Rain. High: 18 Low: 8<br />
Thu - Mostly Cloudy. High: 19 Low: 11<br />
<br />
<a href="http://us.rd.yahoo.com/dailynews/rss/weather/Tarragona__SP/*http://weather.yahoo.com/forecast/SPXX0076_c.html">Full Forecast at Yahoo! Weather</a><BR/><BR/>
(provided by <a href="http://www.weather.com" >The Weather Channel</a>)<br/>

]]>
</description>
<yweather:forecast day="Wed" date="5 May 2010" low="8" high="18" text="AM Light Rain" code="11" />
<yweather:forecast day="Thu" date="6 May 2010" low="11" high="19" text="Mostly Cloudy" code="28" />
<guid isPermaLink="false">SPXX0076_2010_05_05_8_30_CEST</guid>
</item>
</channel>
</rss>
- <!-- api1.weather.ch1.yahoo.com uncompressed/chunked Tue May 4 23:59:24 PDT 2010
-->
</channels>
  #2 (permalink)  
Antiguo 05/05/2010, 09:20
Avatar de Diegoazul  
Fecha de Ingreso: mayo-2007
Ubicación: { Dash Berlin }
Mensajes: 1.879
Antigüedad: 16 años, 9 meses
Puntos: 67
Respuesta: Mostrar datos de un xml mediante Action Script

Aqui esta tu luz:

http://www.cristalab.com/tutoriales/...en-flash-c12l/

ó en flash (f1), también está documentada la clase XML, ahora quizás no entiendas por que no sabes programar, si es así toma un curso ó un tutorial de programación basica antes de querer programar , Saludos!.
__________________
{ Flash }
  #3 (permalink)  
Antiguo 10/05/2010, 05:27
 
Fecha de Ingreso: marzo-2010
Mensajes: 3
Antigüedad: 14 años
Puntos: 0
Respuesta: Mostrar datos de un xml mediante Action Script

no si esa pagina la estuve viendo y es magnifica! , es mas pude seguir las pautas para mostrar datos xml de los nodes sin problema, pero el xml que adjunto se me resiste y no consigo mostrar ningun parametro...

Aun asi si hay alguien que pueda orientarme respecto a este xml...

gracias de todas maneras.

Etiquetas: flash, acciones
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:28.