# Loading JPGs via xml + text

**URL:** https://forum.kirupa.com/t/loading-jpgs-via-xml-text/208592
**Category:** Uncategorized
**Created:** [November 30, 2006, 8:54am UTC](https://forum.kirupa.com/t/loading-jpgs-via-xml-text/208592 "2006-11-30T08:54:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![enigma76](https://avatars.discourse-cdn.com/v4/letter/e/df788c/32.png) [@enigma76](https://forum.kirupa.com/u/enigma76)
#### Post date: [November 30, 2006, 8:54am UTC](https://forum.kirupa.com/t/loading-jpgs-via-xml-text/208592/1 "2006-11-30T08:54:21Z")

</div>

Hi everybody  
I have a protfolio where photos are loading through an xml code and i am using this code  
Now i would like to add the title to each foto and i wonder if it is possible with this type of code or should i rewrite it intp arrays  
TNx in advance

imgbtn1.onRollOver = function() {  
infoField.\_visible = true;  
startLoading(“f001.jpg”);  
};  
imgbtn2.onRollOver = function() {  
infoField.\_visible = true;  
startLoading(“f002.jpg”);  
};  
imgbtn3.onRollOver = function() {  
infoField.\_visible = true;  
startLoading(“f003.jpg”);  
};  
imgbtn4.onRollOver = function() {  
infoField.\_visible = true;  
startLoading(“f004.jpg”);  
};  
imgbtn5.onRollOver = function() {  
infoField.\_visible = true;  
startLoading(“f005.jpg”);  
};  
function startLoading(whichImage) {  
loadMovie(whichImage, “imageLoader”);  
\_root.onEnterFrame = function() {  
infoLoaded = imageLoader.getBytesLoaded();  
infoTotal = imageLoader.getBytesTotal();  
percentage = Math.floor(infoLoaded/infoTotal\*100);  
infoField.text = percentage+"%";  
if (percentage\>=100) {  
imageLoader.\_x = (Stage.width-imageLoader.\_width)\*0.5;  
}  
delete this.onEnterFrame;  
infoField.\_visible = false;  
};  
}
