# onExitFrame method exist or similar?

**URL:** <https://forum.kirupa.com/t/onexitframe-method-exist-or-similar/295723>\
**Category:** flash\
**Created:** [September 3, 2009, 2:13pm UTC](https://forum.kirupa.com/t/onexitframe-method-exist-or-similar/295723 "2009-09-03T14:13:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lleemon](https://avatars.discourse-cdn.com/v4/letter/l/d6d6ee/32.png) [@lleemon](https://forum.kirupa.com/u/lleemon)\
**Post date:** [September 3, 2009, 2:13pm UTC](https://forum.kirupa.com/t/onexitframe-method-exist-or-similar/295723/1 "2009-09-03T14:13:29Z")

</div>

In the article kirupa wrote called, “Photo Gallery Using XML and Flash” [link](http://www.kirupa.com/developer/mx2004/xml_flash_photogallery2.htm) he had the following function:

```auto

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

```

Is there a similar method that we can reverse transition so the image fades away as the new image fades in and not see the preloader?
