# Repurposing Photo Gallery code for page transistions?

**URL:** <https://forum.kirupa.com/t/repurposing-photo-gallery-code-for-page-transistions/276677>\
**Category:** flash\
**Created:** [December 2, 2008, 4:14pm UTC](https://forum.kirupa.com/t/repurposing-photo-gallery-code-for-page-transistions/276677 "2008-12-02T16:14:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![realdoyle](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@realdoyle](https://forum.kirupa.com/u/realdoyle)\
**Post date:** [December 2, 2008, 4:14pm UTC](https://forum.kirupa.com/t/repurposing-photo-gallery-code-for-page-transistions/276677/1 "2008-12-02T16:14:37Z")

</div>

Hi,  
I am using Flash MX and was wondering if anyone knew how I could use portions of the code from the Kirupa Photo Gallery tutorial ([http://www.kirupa.com/developer/mx/photogallery.htm](http://www.kirupa.com/developer/mx/photogallery.htm)) for page transistions?

The specific script that I was looking at from the photo gallery tutorial is this:

MovieClip.prototype.fadeOut = function() {  
if (this.photo.\_alpha\>this.fadeSpeed) {  
this.photo.\_alpha -= this.fadeSpeed;  
} else {  
this.loadPhoto();  
}  
};

I am designing a website that has 7 pages of content each designed on 7 seperate individual frames and the the static background/navigation is layered at the bottom (7 frames long). Any ideas how to implement this code to make transitions between those frames/pages? I would need the movie clip to transition to black when the navigation button is released and then gotoandPlay the next designated frame (which could have a manual movie clip animation fade in). The tricky part for me is the fade out and then navigating to the right page.  
Thanks for your help.
