Hi, please I ´ve this code in my photo gallery and I ´d like adding dynamic text with "name " of photography -> typ.text
AS:
_global.playvalid = false;
datax = new XML();
XML.prototype.ignoreWhite = true;
datax.onLoad = loadXML;
datax.load(_global.load_xml);
function loadXML(loaded) {
if (loaded) {
prime = new XML();
prime = this.firstChild;
totald = prime.childNodes.length;
_global.count = totald;
if (_global.count<15) {
_root.mov.down_b.enabled = false;
_root.mov.down_b._alpha = 30;
_root.mov.up_b.enabled = false;
_root.mov.up_b._alpha = 30;
}
d_title = [];
d_thumb = [];
d_img = [];
s = 1;
j = 1;
for (i=0; i<totald; i++) {
d_title* = prime.childNodes*.attributes.title;
d_thumb* = prime.childNodes*.attributes.thumb;
d_img* = prime.childNodes*.attributes.img;
ukaz = d_title*;
elem = _root.mov.thumbs.carry.loader.attachMovie(“t_el”, “t_el”+i, i);
elem.img_store = d_img*;
elem._width = 50;
elem._height = 50;
elem._x = jelem._width1.155;
elem._y = selem._height1.144;
_global.eh = elem._height;
j++;
if (elem._x>3elem._width) {
s++;
j = 1;
}
thumblink = d_thumb;
elem.thumbload.loadMovie(thumblink);
_global.scr = -(_root.mov.thumbs.carry._height-8*elem._height);
elem.onRollOver = function() {
this._alpha = 27;
};
elem.onDragOver = function() {
this._alpha = 27;
};
elem.onRollOut = function() {
this._alpha = 100;
};
elem.onDragOut = function() {
this._alpha = 100;
};
elem.onRelease = function() {
_root.mov.previewload._alpha = 0;
_root.mov.previewload.loadPic(this.img_store);
};
}
_root.mov.previewload.loadPic(_root.mov.thumbs.carry.loader.t_el0.img_store);
_root.typ.text = ukaz;
}
}
My XML:
<?xml version=“1.0” encoding=“utf-8” standalone="yes?>
<data>
<pic title=“001” thumb=“thumbs/title1/th1.jpg” img=“pix/title1/img1.jpg”></pic>
<pic title=“001” thumb=“thumbs/title1/th2.jpg” img=“pix/title1/img2.jpg”></pic>
<pic title=“001” thumb=“thumbs/title1/th3.jpg” img=“pix/title1/img3.jpg”></pic>
</data>
Have any idea?
Thanks