añadir oyente problemas con xml
- taufiq
- Newbie


- Registrado: Nov 24, 2008
- Mensajes: 7
- Status: Offline
Hola, chicos, soy de nuevo con otros problemas, tengo un xml
Heres el código
y luego quiero cargar películas de este XML con escucha demasiado, pero cuando se trabaja no puede cargar nada, ¿qué me perdí?
esta mi script
resultados i, la función de escucha no puede trabajado tanto, se puede cargar nada
Gracias por su ayuda
Heres el código
Código: [ Select ]
<?xml version="1.0" encoding="UTF-8"?>
<movies total_count="3640" data_count="16" current_page="0" >
<movie id="5">
<id>5</id>
<title><![CDATA[The Matrix]]></title>
<code><![CDATA[085391773726]]></code>
<genre>1</genre>
<multigenre>1,0,0,0,0,0</multigenre>
<description><![CDATA[Mind-bending action/thriller about a programmer who discovers that his world isn't what it seems. The plot is a little convoluted, but it's filled with dazzling effects and blistering action.]]></description>
<starring><![CDATA[Keanu Reeves,Lawrence Fishburne]]></starring>
<director><![CDATA[Andy Wachowski, Larry Wachowski]]></director>
<producer></producer>
<sinematographer></sinematographer>
<studio></studio>
<year_produced>1999</year_produced>
<country></country>
<rating>9</rating>
<rating_user>0</rating_user>
<rating_imdbcom>8</rating_imdbcom>
<types>1</types>
<category>R</category>
<language>1</language>
<subtitle>1</subtitle>
<duration>60</duration>
<picture>5_cover.gif</picture>
<icon>5_icon.gif</icon>
<entry_date>2008-05-29 13:35:48</entry_date>
<update_time>2008-05-29 13:35:48</update_time>
</movie>
<movie id="7">
<id>7</id>
<title><![CDATA[The Corruptor]]></title>
<code><![CDATA[794043477621]]></code>
<genre>1</genre>
<multigenre>1,0,0,0,0,0</multigenre>
<description><![CDATA[A rookie cop teams up with another NYPD detective in an effort to clean up the streets of mob-ruled Chinatown, but he soon realizes that the ties of the Chinese mafia go deeper than he suspected.]]></description>
<starring><![CDATA[Chow Yun-Fat,Mark Wahlberg]]></starring>
<director><![CDATA[James Foley]]></director>
<producer></producer>
<sinematographer><![CDATA[Juan Ruiz Anchía]]></sinematographer>
<studio></studio>
<year_produced>1999</year_produced>
<country></country>
<rating>0</rating>
<rating_user>0</rating_user>
<rating_imdbcom>6</rating_imdbcom>
<types>1</types>
<category>R</category>
<language>1</language>
<subtitle>1</subtitle>
<duration>60</duration>
<picture>7_cover.gif</picture>
<icon>7_icon.gif</icon>
<entry_date>2008-05-29 13:35:48</entry_date>
<update_time>2008-05-29 13:35:48</update_time>
</movie>
<movie id="13">
<id>13</id>
<title><![CDATA[The Mummy]]></title>
<code><![CDATA[025192063626]]></code>
<genre>1</genre>
<multigenre>1,0,0,0,0,0</multigenre>
<description><![CDATA[Spoofy remake of 1930s horror classic about Egyptian expedition disturbing mummy's tomb. Boasting spectacular effects, appealing hero, Indiana Jones-style action, and corny, good-natured humor, this amply entertains fun-loving adventure buffs.
]]></description>
<starring><![CDATA[Brendan Fraser,Rachel Weisz]]></starring>
<director><![CDATA[Stephen Sommers]]></director>
<producer></producer>
<sinematographer></sinematographer>
<studio></studio>
<year_produced>1999</year_produced>
<country></country>
<rating>0</rating>
<rating_user>0</rating_user>
<rating_imdbcom>0</rating_imdbcom>
<types>1</types>
<category>R</category>
<language>1</language>
<subtitle>1</subtitle>
<duration>60</duration>
<picture>13_cover.gif</picture>
<icon>13_icon.gif</icon>
<entry_date>2008-05-29 13:35:48</entry_date>
<update_time>2008-05-29 13:35:48</update_time>
</movie>
</movies>
<movies total_count="3640" data_count="16" current_page="0" >
<movie id="5">
<id>5</id>
<title><![CDATA[The Matrix]]></title>
<code><![CDATA[085391773726]]></code>
<genre>1</genre>
<multigenre>1,0,0,0,0,0</multigenre>
<description><![CDATA[Mind-bending action/thriller about a programmer who discovers that his world isn't what it seems. The plot is a little convoluted, but it's filled with dazzling effects and blistering action.]]></description>
<starring><![CDATA[Keanu Reeves,Lawrence Fishburne]]></starring>
<director><![CDATA[Andy Wachowski, Larry Wachowski]]></director>
<producer></producer>
<sinematographer></sinematographer>
<studio></studio>
<year_produced>1999</year_produced>
<country></country>
<rating>9</rating>
<rating_user>0</rating_user>
<rating_imdbcom>8</rating_imdbcom>
<types>1</types>
<category>R</category>
<language>1</language>
<subtitle>1</subtitle>
<duration>60</duration>
<picture>5_cover.gif</picture>
<icon>5_icon.gif</icon>
<entry_date>2008-05-29 13:35:48</entry_date>
<update_time>2008-05-29 13:35:48</update_time>
</movie>
<movie id="7">
<id>7</id>
<title><![CDATA[The Corruptor]]></title>
<code><![CDATA[794043477621]]></code>
<genre>1</genre>
<multigenre>1,0,0,0,0,0</multigenre>
<description><![CDATA[A rookie cop teams up with another NYPD detective in an effort to clean up the streets of mob-ruled Chinatown, but he soon realizes that the ties of the Chinese mafia go deeper than he suspected.]]></description>
<starring><![CDATA[Chow Yun-Fat,Mark Wahlberg]]></starring>
<director><![CDATA[James Foley]]></director>
<producer></producer>
<sinematographer><![CDATA[Juan Ruiz Anchía]]></sinematographer>
<studio></studio>
<year_produced>1999</year_produced>
<country></country>
<rating>0</rating>
<rating_user>0</rating_user>
<rating_imdbcom>6</rating_imdbcom>
<types>1</types>
<category>R</category>
<language>1</language>
<subtitle>1</subtitle>
<duration>60</duration>
<picture>7_cover.gif</picture>
<icon>7_icon.gif</icon>
<entry_date>2008-05-29 13:35:48</entry_date>
<update_time>2008-05-29 13:35:48</update_time>
</movie>
<movie id="13">
<id>13</id>
<title><![CDATA[The Mummy]]></title>
<code><![CDATA[025192063626]]></code>
<genre>1</genre>
<multigenre>1,0,0,0,0,0</multigenre>
<description><![CDATA[Spoofy remake of 1930s horror classic about Egyptian expedition disturbing mummy's tomb. Boasting spectacular effects, appealing hero, Indiana Jones-style action, and corny, good-natured humor, this amply entertains fun-loving adventure buffs.
]]></description>
<starring><![CDATA[Brendan Fraser,Rachel Weisz]]></starring>
<director><![CDATA[Stephen Sommers]]></director>
<producer></producer>
<sinematographer></sinematographer>
<studio></studio>
<year_produced>1999</year_produced>
<country></country>
<rating>0</rating>
<rating_user>0</rating_user>
<rating_imdbcom>0</rating_imdbcom>
<types>1</types>
<category>R</category>
<language>1</language>
<subtitle>1</subtitle>
<duration>60</duration>
<picture>13_cover.gif</picture>
<icon>13_icon.gif</icon>
<entry_date>2008-05-29 13:35:48</entry_date>
<update_time>2008-05-29 13:35:48</update_time>
</movie>
</movies>
- <?xml version="1.0" encoding="UTF-8"?>
- <movies total_count="3640" data_count="16" current_page="0" >
- <movie id="5">
- <id>5</id>
- <title><![CDATA[The Matrix]]></title>
- <code><![CDATA[085391773726]]></code>
- <genre>1</genre>
- <multigenre>1,0,0,0,0,0</multigenre>
- <description><![CDATA[Mind-bending action/thriller about a programmer who discovers that his world isn't what it seems. The plot is a little convoluted, but it's filled with dazzling effects and blistering action.]]></description>
- <starring><![CDATA[Keanu Reeves,Lawrence Fishburne]]></starring>
- <director><![CDATA[Andy Wachowski, Larry Wachowski]]></director>
- <producer></producer>
- <sinematographer></sinematographer>
- <studio></studio>
- <year_produced>1999</year_produced>
- <country></country>
- <rating>9</rating>
- <rating_user>0</rating_user>
- <rating_imdbcom>8</rating_imdbcom>
- <types>1</types>
- <category>R</category>
- <language>1</language>
- <subtitle>1</subtitle>
- <duration>60</duration>
- <picture>5_cover.gif</picture>
- <icon>5_icon.gif</icon>
- <entry_date>2008-05-29 13:35:48</entry_date>
- <update_time>2008-05-29 13:35:48</update_time>
- </movie>
- <movie id="7">
- <id>7</id>
- <title><![CDATA[The Corruptor]]></title>
- <code><![CDATA[794043477621]]></code>
- <genre>1</genre>
- <multigenre>1,0,0,0,0,0</multigenre>
- <description><![CDATA[A rookie cop teams up with another NYPD detective in an effort to clean up the streets of mob-ruled Chinatown, but he soon realizes that the ties of the Chinese mafia go deeper than he suspected.]]></description>
- <starring><![CDATA[Chow Yun-Fat,Mark Wahlberg]]></starring>
- <director><![CDATA[James Foley]]></director>
- <producer></producer>
- <sinematographer><![CDATA[Juan Ruiz Anchía]]></sinematographer>
- <studio></studio>
- <year_produced>1999</year_produced>
- <country></country>
- <rating>0</rating>
- <rating_user>0</rating_user>
- <rating_imdbcom>6</rating_imdbcom>
- <types>1</types>
- <category>R</category>
- <language>1</language>
- <subtitle>1</subtitle>
- <duration>60</duration>
- <picture>7_cover.gif</picture>
- <icon>7_icon.gif</icon>
- <entry_date>2008-05-29 13:35:48</entry_date>
- <update_time>2008-05-29 13:35:48</update_time>
- </movie>
- <movie id="13">
- <id>13</id>
- <title><![CDATA[The Mummy]]></title>
- <code><![CDATA[025192063626]]></code>
- <genre>1</genre>
- <multigenre>1,0,0,0,0,0</multigenre>
- <description><![CDATA[Spoofy remake of 1930s horror classic about Egyptian expedition disturbing mummy's tomb. Boasting spectacular effects, appealing hero, Indiana Jones-style action, and corny, good-natured humor, this amply entertains fun-loving adventure buffs.
- ]]></description>
- <starring><![CDATA[Brendan Fraser,Rachel Weisz]]></starring>
- <director><![CDATA[Stephen Sommers]]></director>
- <producer></producer>
- <sinematographer></sinematographer>
- <studio></studio>
- <year_produced>1999</year_produced>
- <country></country>
- <rating>0</rating>
- <rating_user>0</rating_user>
- <rating_imdbcom>0</rating_imdbcom>
- <types>1</types>
- <category>R</category>
- <language>1</language>
- <subtitle>1</subtitle>
- <duration>60</duration>
- <picture>13_cover.gif</picture>
- <icon>13_icon.gif</icon>
- <entry_date>2008-05-29 13:35:48</entry_date>
- <update_time>2008-05-29 13:35:48</update_time>
- </movie>
- </movies>
y luego quiero cargar películas de este XML con escucha demasiado, pero cuando se trabaja no puede cargar nada, ¿qué me perdí?
esta mi script
Código: [ Select ]
var mclis:Object = new Object();
var duplicate_movie:MovieClip;
myXML = new XML()
myXML.ignoreWhite = true
myXML.load("http://localhost/subcat/index.php/movie/lists/1/1");
myXML.onLoad = function(succes) {
if (succes) {
var root = this.firstChild;
nodes = root.childNodes;
trace(nodes.length);
for (var i = 0; i<nodes.length; i++){
subnodes = nodes[i].childNodes;
var image_path = subnodes[21].firstChild.toString();
var mclis:Object = new Object();
mclis.onLoadInit = function(target_mc:MovieClip) {//Invoked when the actions on the first frame of the loaded clip have been executed
target_mc._width = 50;//applying new width
target_mc._height = 100;//applying new height
_root.genre.holder_mc0._x = -200;
_root.genre.holder_mc2._x = -100;
target_mc._y=-168;
target_mc.onRelease = function() {
trace("okeh");
};
};
var mcl:MovieClipLoader = new MovieClipLoader();
mcl.addListener(mclis);
duplicate_movie = _root.genre.createEmptyMovieClip(["holder_mc"+i], _root.genre.getNextHighestDepth());
var dom = mcl.loadClip(image_path,_root.duplicate_movie);
}
}else{
trace("gendut")
}
}
var duplicate_movie:MovieClip;
myXML = new XML()
myXML.ignoreWhite = true
myXML.load("http://localhost/subcat/index.php/movie/lists/1/1");
myXML.onLoad = function(succes) {
if (succes) {
var root = this.firstChild;
nodes = root.childNodes;
trace(nodes.length);
for (var i = 0; i<nodes.length; i++){
subnodes = nodes[i].childNodes;
var image_path = subnodes[21].firstChild.toString();
var mclis:Object = new Object();
mclis.onLoadInit = function(target_mc:MovieClip) {//Invoked when the actions on the first frame of the loaded clip have been executed
target_mc._width = 50;//applying new width
target_mc._height = 100;//applying new height
_root.genre.holder_mc0._x = -200;
_root.genre.holder_mc2._x = -100;
target_mc._y=-168;
target_mc.onRelease = function() {
trace("okeh");
};
};
var mcl:MovieClipLoader = new MovieClipLoader();
mcl.addListener(mclis);
duplicate_movie = _root.genre.createEmptyMovieClip(["holder_mc"+i], _root.genre.getNextHighestDepth());
var dom = mcl.loadClip(image_path,_root.duplicate_movie);
}
}else{
trace("gendut")
}
}
- var mclis:Object = new Object();
- var duplicate_movie:MovieClip;
- myXML = new XML()
- myXML.ignoreWhite = true
- myXML.load("http://localhost/subcat/index.php/movie/lists/1/1");
- myXML.onLoad = function(succes) {
- if (succes) {
- var root = this.firstChild;
- nodes = root.childNodes;
- trace(nodes.length);
- for (var i = 0; i<nodes.length; i++){
- subnodes = nodes[i].childNodes;
- var image_path = subnodes[21].firstChild.toString();
- var mclis:Object = new Object();
- mclis.onLoadInit = function(target_mc:MovieClip) {//Invoked when the actions on the first frame of the loaded clip have been executed
- target_mc._width = 50;//applying new width
- target_mc._height = 100;//applying new height
- _root.genre.holder_mc0._x = -200;
- _root.genre.holder_mc2._x = -100;
- target_mc._y=-168;
- target_mc.onRelease = function() {
- trace("okeh");
- };
- };
- var mcl:MovieClipLoader = new MovieClipLoader();
- mcl.addListener(mclis);
- duplicate_movie = _root.genre.createEmptyMovieClip(["holder_mc"+i], _root.genre.getNextHighestDepth());
- var dom = mcl.loadClip(image_path,_root.duplicate_movie);
- }
- }else{
- trace("gendut")
- }
- }
resultados i, la función de escucha no puede trabajado tanto, se puede cargar nada
Gracias por su ayuda
- Anonymous
- Bot


- Registrado: 25 Feb 2008
- Mensajes: ?
- Loc: Ozzuland
- Status: Online
Noviembre 25th, 2008, 1:22 pm
Página 1 de 1
Para responder a este tema que necesita para ingresar o registrarse. Es gratis.
Publicar Información
- Total de mensajes en este tema: 1 mensaje
- Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 31 invitados
- No puede abrir nuevos temas en este Foro
- No puede responder a temas en este Foro
- No puede editar sus mensajes en este Foro
- No puede borrar sus mensajes en este Foro
- No puede enviar adjuntos en este Foro
