mantener el valor de nodo en eventos
- taufiq
- Newbie


- Registrado: Nov 24, 2008
- Mensajes: 7
- Status: Offline
Hola a todos, gracias por leer mi hilo, im a tener problemas para mantener el nodo de valor, en el controlador de eventos cuando se carga la película i.
Heres mi XML
como pueden ver tengo ID en mi película no pare, ahora quiero cargar la película y el título, también ahorrar idea que load_film mc [i] / / i invocado es el nodo de valor, aquí mi guión
Yo no tengo problemas para cubrir la carga y el título de la película, pero, no puedo contener el valor para ello, siempre bucle. y obtener el ID de última
¿Alguien ha tenido soluciones,
, será grande, y respetuoso,
gracias
p / si sé que mi esperanza graphixbox problemas me puede ayudar
,
Heres mi XML
Código: [ Select ]
<?xml version="1.0" encoding="UTF-8"?>
<movies total_count="517" 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>
<data_total>
<total_count>517</total_count>
<data_count>16</data_count>
<current_page>0</current_page>
</data_total>
</xml>
<movies total_count="517" 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>
<data_total>
<total_count>517</total_count>
<data_count>16</data_count>
<current_page>0</current_page>
</data_total>
</xml>
- <?xml version="1.0" encoding="UTF-8"?>
- <movies total_count="517" 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>
- <data_total>
- <total_count>517</total_count>
- <data_count>16</data_count>
- <current_page>0</current_page>
- </data_total>
- </xml>
como pueden ver tengo ID en mi película no pare, ahora quiero cargar la película y el título, también ahorrar idea que load_film mc [i] / / i invocado es el nodo de valor, aquí mi guión
Código: [ Select ]
myXML = new XML();
myXML.ignoreWhite = true;
myXML.load("http://www.subtitlesgroup.com/subcat/index.php/movie/list/1/1");
myXML.ref = this;
myXML.onLoad = function(succes) {
if (succes) {
var root = this.firstChild;
var nodes = root.childNodes;
for (var i = 0; i<nodes.length; i++) {
subnodes = nodes[i].childNodes;
var duplicate_movie:MovieClip=_root.genre["load_film"+i];//
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 = 60;//applying new width
target_mc._height = 100;//applying new height
target_mc.onRelease = function() {
_root.genre.attachMovie("description_bg", "instance", _root.genre.getNextHighestDepth());//attach description bg on library to stage to display details
target_mc.movie_idsaves = movieid ;//hold value "id"
var path_movieid = this.movie_idsaves;//display id which suitable with load_film in our click
trace(path_movieid)
detailXML.load("http://www.subtitlesgroup.com/subcat/index.php/movie/detail/"+path_movieid+"/1");//load new xml when get id
detailXML.ref = this;
detailXML.onLoad = function(succes){
if(succes){
var root = this.firstChild
nodes = root.childNodes
subnodes = nodes[0].childNodes
_root.genre.instance.title_txt.text = subnodes[1].firstChild.toString()
_root.genre.instance.descriptions_txt.text = subnodes[5].firstChild.toString()
_root.genre.instance.starring_txt.text = subnodes[6].firstChild.toString()
_root.genre.instance.director_txt.text = subnodes[7].firstChild.toString()
_root.genre.instance.genre_txt.text = subnodes[3].firstChild.toString()
_root.genre.instance.format_txt.text = "undefined"
_root.genre.instance.language_txt.text = subnodes[18].firstChild.toString()
_root.genre.instance.subtitles_txt.text = subnodes[19].firstChild.toString()
_root.genre.instance.status_txt.text = "undefined"
_root.genre.instance.coverdetails_mc.loadMovie("http://www.subtitlesgroup.com/movies_pictures/"+subnodes[21].firstChild.toString())
} else trace("Error loading XML document")
}
};
};
var text_btn=_root.genre["cover_title"+i].text = subnodes[1].firstChild.toString();/*function for display movie name*/
var image_path ="http://www.subtitlesgroup.com/movies_pictures/"+subnodes[21].firstChild.toString();
var movieid = subnodes[0].firstChild.toString();
var mcl:MovieClipLoader = new MovieClipLoader();
mcl.addListener(mclis);
mcl.loadClip(image_path, duplicate_movie);
}
} else {
trace("Error loading otherXML");
}
};/*end other xml load function*/
myXML.ignoreWhite = true;
myXML.load("http://www.subtitlesgroup.com/subcat/index.php/movie/list/1/1");
myXML.ref = this;
myXML.onLoad = function(succes) {
if (succes) {
var root = this.firstChild;
var nodes = root.childNodes;
for (var i = 0; i<nodes.length; i++) {
subnodes = nodes[i].childNodes;
var duplicate_movie:MovieClip=_root.genre["load_film"+i];//
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 = 60;//applying new width
target_mc._height = 100;//applying new height
target_mc.onRelease = function() {
_root.genre.attachMovie("description_bg", "instance", _root.genre.getNextHighestDepth());//attach description bg on library to stage to display details
target_mc.movie_idsaves = movieid ;//hold value "id"
var path_movieid = this.movie_idsaves;//display id which suitable with load_film in our click
trace(path_movieid)
detailXML.load("http://www.subtitlesgroup.com/subcat/index.php/movie/detail/"+path_movieid+"/1");//load new xml when get id
detailXML.ref = this;
detailXML.onLoad = function(succes){
if(succes){
var root = this.firstChild
nodes = root.childNodes
subnodes = nodes[0].childNodes
_root.genre.instance.title_txt.text = subnodes[1].firstChild.toString()
_root.genre.instance.descriptions_txt.text = subnodes[5].firstChild.toString()
_root.genre.instance.starring_txt.text = subnodes[6].firstChild.toString()
_root.genre.instance.director_txt.text = subnodes[7].firstChild.toString()
_root.genre.instance.genre_txt.text = subnodes[3].firstChild.toString()
_root.genre.instance.format_txt.text = "undefined"
_root.genre.instance.language_txt.text = subnodes[18].firstChild.toString()
_root.genre.instance.subtitles_txt.text = subnodes[19].firstChild.toString()
_root.genre.instance.status_txt.text = "undefined"
_root.genre.instance.coverdetails_mc.loadMovie("http://www.subtitlesgroup.com/movies_pictures/"+subnodes[21].firstChild.toString())
} else trace("Error loading XML document")
}
};
};
var text_btn=_root.genre["cover_title"+i].text = subnodes[1].firstChild.toString();/*function for display movie name*/
var image_path ="http://www.subtitlesgroup.com/movies_pictures/"+subnodes[21].firstChild.toString();
var movieid = subnodes[0].firstChild.toString();
var mcl:MovieClipLoader = new MovieClipLoader();
mcl.addListener(mclis);
mcl.loadClip(image_path, duplicate_movie);
}
} else {
trace("Error loading otherXML");
}
};/*end other xml load function*/
- myXML = new XML();
- myXML.ignoreWhite = true;
- myXML.load("http://www.subtitlesgroup.com/subcat/index.php/movie/list/1/1");
- myXML.ref = this;
- myXML.onLoad = function(succes) {
- if (succes) {
- var root = this.firstChild;
- var nodes = root.childNodes;
- for (var i = 0; i<nodes.length; i++) {
- subnodes = nodes[i].childNodes;
- var duplicate_movie:MovieClip=_root.genre["load_film"+i];//
- 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 = 60;//applying new width
- target_mc._height = 100;//applying new height
- target_mc.onRelease = function() {
- _root.genre.attachMovie("description_bg", "instance", _root.genre.getNextHighestDepth());//attach description bg on library to stage to display details
- target_mc.movie_idsaves = movieid ;//hold value "id"
- var path_movieid = this.movie_idsaves;//display id which suitable with load_film in our click
- trace(path_movieid)
- detailXML.load("http://www.subtitlesgroup.com/subcat/index.php/movie/detail/"+path_movieid+"/1");//load new xml when get id
- detailXML.ref = this;
- detailXML.onLoad = function(succes){
- if(succes){
- var root = this.firstChild
- nodes = root.childNodes
- subnodes = nodes[0].childNodes
- _root.genre.instance.title_txt.text = subnodes[1].firstChild.toString()
- _root.genre.instance.descriptions_txt.text = subnodes[5].firstChild.toString()
- _root.genre.instance.starring_txt.text = subnodes[6].firstChild.toString()
- _root.genre.instance.director_txt.text = subnodes[7].firstChild.toString()
- _root.genre.instance.genre_txt.text = subnodes[3].firstChild.toString()
- _root.genre.instance.format_txt.text = "undefined"
- _root.genre.instance.language_txt.text = subnodes[18].firstChild.toString()
- _root.genre.instance.subtitles_txt.text = subnodes[19].firstChild.toString()
- _root.genre.instance.status_txt.text = "undefined"
- _root.genre.instance.coverdetails_mc.loadMovie("http://www.subtitlesgroup.com/movies_pictures/"+subnodes[21].firstChild.toString())
- } else trace("Error loading XML document")
- }
- };
- };
- var text_btn=_root.genre["cover_title"+i].text = subnodes[1].firstChild.toString();/*function for display movie name*/
- var image_path ="http://www.subtitlesgroup.com/movies_pictures/"+subnodes[21].firstChild.toString();
- var movieid = subnodes[0].firstChild.toString();
- var mcl:MovieClipLoader = new MovieClipLoader();
- mcl.addListener(mclis);
- mcl.loadClip(image_path, duplicate_movie);
- }
- } else {
- trace("Error loading otherXML");
- }
- };/*end other xml load function*/
Yo no tengo problemas para cubrir la carga y el título de la película, pero, no puedo contener el valor para ello, siempre bucle. y obtener el ID de última
¿Alguien ha tenido soluciones,
, será grande, y respetuoso,
gracias
p / si sé que mi esperanza graphixbox problemas me puede ayudar
- Anonymous
- Bot


- Registrado: 25 Feb 2008
- Mensajes: ?
- Loc: Ozzuland
- Status: Online
Diciembre 1st, 2008, 9:09 am
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 38 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
