# Question about image gallery

**URL:** <https://forum.kirupa.com/t/question-about-image-gallery/294240>\
**Category:** flash\
**Created:** [August 11, 2009, 11:07am UTC](https://forum.kirupa.com/t/question-about-image-gallery/294240 "2009-08-11T11:07:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![solomondg1](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@solomondg1](https://forum.kirupa.com/u/solomondg1)\
**Post date:** [August 11, 2009, 11:07am UTC](https://forum.kirupa.com/t/question-about-image-gallery/294240/1 "2009-08-11T11:07:41Z")

</div>

I used the image gallery code from this tutorial: [http://www.kirupa.com/developer/mx2004/xml\_flash\_photogallery.htm](http://www.kirupa.com/developer/mx2004/xml_flash_photogallery.htm)  
Everything works great, I heavily modified the code and even added the ability to load/play flv files and have multiple galleries. What I would like to know is the purpose of the line:  
[COLOR=#006610]if[/COLOR] [COLOR=#0000ff]([/COLOR][COLOR=#0000d0]loaded[/COLOR] [COLOR=#0000ff]==[/COLOR] [COLOR=#000050]filesize[/COLOR][COLOR=#0000ff]) [/COLOR][COLOR=black]in:[/COLOR]

[COLOR=#006610]function[/COLOR] [COLOR=#000050]nextImage[/COLOR]COLOR=#0000ff[/COLOR]  
[COLOR=#0000ff]{[/COLOR]  
[COLOR=#006610]if[/COLOR] COLOR=#0000ff[/COLOR]  
[COLOR=#0000ff]{[/COLOR]  
[COLOR=#000050]p[/COLOR][COLOR=#0000ff]++[/COLOR];  
[COLOR=#006610]if[/COLOR] [COLOR=#0000ff]([/COLOR][COLOR=#0000d0]loaded[/COLOR] [COLOR=#0000ff]==[/COLOR] [COLOR=#000050]filesize[/COLOR][COLOR=#0000ff])[/COLOR]  
[COLOR=#0000ff]{[/COLOR]  
[COLOR=#000050]picture[/COLOR].[COLOR=#0000d0]\_alpha[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#991010]0[/COLOR]; [COLOR=#000050]picture[/COLOR].[COLOR=#0000d0]loadMovie[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#000050]image[/COLOR][COLOR=#0000ff][[/COLOR][COLOR=#000050]p[/COLOR][COLOR=#0000ff]][/COLOR], [COLOR=#991010]1[/COLOR][COLOR=#0000ff])[/COLOR];  
[COLOR=#000050]desc\_txt[/COLOR].[COLOR=#0000d0]text[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#000050]description[/COLOR][COLOR=#0000ff][[/COLOR][COLOR=#000050]p[/COLOR][COLOR=#0000ff]][/COLOR]; [COLOR=#000050]picture\_num[/COLOR]COLOR=#0000ff[/COLOR];  
[COLOR=#0000ff]}[/COLOR]  
[COLOR=#0000ff]}[/COLOR]  
[COLOR=#0000ff]}[/COLOR]  
It looks like it checks if the previouse image has been fully loaded before it goes to the next one. That would make sense except that I can click next before the image fully loads. And even if this function was to work the way I imagine it does, what is the point of making the user wait while an image is loaded if they want to move on to the next one?
