# What am I doing wrong?

**URL:** <https://forum.kirupa.com/t/what-am-i-doing-wrong/197198>\
**Category:** Uncategorized\
**Created:** [August 14, 2006, 4:55pm UTC](https://forum.kirupa.com/t/what-am-i-doing-wrong/197198 "2006-08-14T16:55:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joifan2k](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@joifan2k](https://forum.kirupa.com/u/joifan2k)\
**Post date:** [August 14, 2006, 4:55pm UTC](https://forum.kirupa.com/t/what-am-i-doing-wrong/197198/1 "2006-08-14T16:55:45Z")

</div>

I’m doing a site with transitions (with pre-loaders.) I’ve gotten two to work the way I want them to. I just made a xml gallery, which for some reason won’t unload when I click on any of the menu buttons.

I’ve used exactly the same code as I did with the previous two:

first frame:

> midframe = 39;  
> bytes\_loaded = Math.round(this.getBytesLoaded());  
> bytes\_total = Math.round(this.getBytesTotal());  
> getPercent = bytes\_loaded/bytes\_total;  
> this.loadBar.\_width = getPercent_100;  
> this.loadText = Math.round(getPercent_100)+“%”;  
> if (bytes\_loaded == bytes\_total) {  
> this.gotoAndPlay(3);  
> }

the middle stop frame:

> stop();

last frame:

> \_root.container.loadMovie(\_root.currMovie+“.swf”);

what am I doing wrong? anything i should be thinking of…?
