# Xml image gallery question

**URL:** <https://forum.kirupa.com/t/xml-image-gallery-question/65711>\
**Category:** Uncategorized\
**Created:** [September 28, 2004, 11:43pm UTC](https://forum.kirupa.com/t/xml-image-gallery-question/65711 "2004-09-28T23:43:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![robvr6](https://avatars.discourse-cdn.com/v4/letter/r/fbc32d/32.png) [@robvr6](https://forum.kirupa.com/u/robvr6)\
**Post date:** [September 28, 2004, 11:43pm UTC](https://forum.kirupa.com/t/xml-image-gallery-question/65711/1 "2004-09-28T23:43:58Z")

</div>

Hi all this is my first post and I hope im in the right place.  
Just a quick question - how hard would it be to add a text box with the percentage loaded to the gallery to go with the status bar. Excellent tutorial by the way my gallery is starting to work like a drem

Thanks in advance

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 29, 2004, 9:19am UTC](https://forum.kirupa.com/t/xml-image-gallery-question/65711/2 "2004-09-29T09:19:47Z")

</div>

it should be very easy, at least if im thinkign of the same thing u r  
add a dynamic text box called loadedTxt  
this.onEnterFrame = function() { filesize = picture.getBytesTotal(); loaded = picture.getBytesLoaded(); percentage = loaded/filesizepreloader.\_visible = true; if (loaded != filesize) { preloader.preload\_bar.\_xscale = 100\*precentage; loadedTxt.text = percentage + “%”} else { preloader.\_visible = false; if (picture.\_alpha\<100) { picture.\_alpha += 10; } } };that should work

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 29, 2004, 3:39pm UTC](https://forum.kirupa.com/t/xml-image-gallery-question/65711/3 "2004-09-29T15:39:08Z")

</div>

Is there something that I need to change on this to get my own to work. I have added a dynamic text box and altered the code and I keep getting actionscript errors saying

[color=blue] **Error** Scene=Scene 1, layer=action, frame=1:Line 41: Left side of assignment operator must be variable or property.  
percentage = loaded/filesizepreloader.\_visible = true;[/color]  
[color=blue]Total ActionScript Errors: 1 Reported Errors: 1[/color]

any ideas what I’m doing wrong.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 30, 2004, 11:00am UTC](https://forum.kirupa.com/t/xml-image-gallery-question/65711/4 "2004-09-30T11:00:25Z")

</div>

oops sorry my bad, 1 i stuffed up the syntax and 2 i forgot to wrap code around it, sorry. ok i am pretty sure that this will work, once again, sorry for the confusion

```auto
 
this.onEnterFrame = function() { 
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
percentage = loaded/filesize;
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*percentage;
loadedTxt.text = percentage + "%"
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10; 
} 
} 
};

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 30, 2004, 2:33pm UTC](https://forum.kirupa.com/t/xml-image-gallery-question/65711/5 "2004-09-30T14:33:38Z")

</div>

Thats Brilliant!. Thanks a lot. Just one more thing How hard would it be to use individual buttons to load each image for example after viewing image one could you then have a button to load say image 6 or image 12 etc.

You know if you had a line of small buttons under the gallery.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 1, 2004, 2:14am UTC](https://forum.kirupa.com/t/xml-image-gallery-question/65711/6 "2004-10-01T02:14:00Z")

</div>

sorry, i’m not to good at XML/Flash integration (or even XML) so i can’t help u here, good luck
