# Flash page transitions using variables

**URL:** <https://forum.kirupa.com/t/flash-page-transitions-using-variables/202292>\
**Category:** flash\
**Created:** [September 29, 2006, 11:31am UTC](https://forum.kirupa.com/t/flash-page-transitions-using-variables/202292 "2006-09-29T11:31:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![danknugs](https://avatars.discourse-cdn.com/v4/letter/d/8dc957/32.png) [@danknugs](https://forum.kirupa.com/u/danknugs)\
**Post date:** [September 29, 2006, 11:31am UTC](https://forum.kirupa.com/t/flash-page-transitions-using-variables/202292/1 "2006-09-29T11:31:05Z")

</div>

Hello, hope anyone can help me…I have a main movie clip with 4 movie clips inside it each on there own frame(the different pages). What i want to do is when someone goes from button 1 to say 3, i want page 1 to first play its outro animation before jumping to page three, and thus with all the other pages. I know how to do this with seperate swf’s but i cant seem to get it working with a single swf. I want it to be along the lines of this: [http://www.templatemonster.com/flash-templates/12231.html](http://www.templatemonster.com/flash-templates/12231.html)

Heres my action script in the first frame of the main timeline:

currentPage = 0;  
if (currentPage == 0) {  
} else if (currentPage == 1) {  
mc\_00.gotoAndPlay(“outro”);  
} else if (currentPage == 2) {  
mc\_00.gotoAndPlay(“outro”);  
} else if (currentPage == 3) {  
mc\_00.gotoAndPlay(“outro”);  
}  
if (currentPage == 1) {  
stop;  
} else if (currentPage == 0) {  
mc\_01.gotoAndPlay(“outro”);  
} else if (currentPage == 2) {  
mc\_01.gotoAndPlay(“outro”);  
} else if (currentPage == 3) {  
mc\_01.gotoAndPlay(“outro”);  
}  
if (currentPage == 2) {  
stop;  
} else if (currentPage == 1) {  
gotoAndPlay(“outro”);  
} else if (currentPage == 0) {  
gotoAndPlay(“outro”);  
} else if (currentPage == 3) {  
gotoAndPlay(“outro”);  
}  
if (currentPage == 3) {  
stop;  
} else if (currentPage == 1) {  
gotoAndPlay(“outro”);  
} else if (currentPage == 2) {  
gotoAndPlay(“outro”);  
} else if (currentPage == 0) {  
gotoAndPlay(“outro”);  
}  
btn\_01.onRollOut = function() {  
btn\_01.gotoAndPlay(“out”);  
};  
btn\_01.onRollOver = function() {  
btn\_01.gotoAndPlay(“over”);  
};  
btn\_01.onRelease = function() {  
currentPage = 1;  
content.gotoAndStop(2);  
};  
btn\_02.onRollOut = function() {  
btn\_02.gotoAndPlay(“out”);  
};  
btn\_02.onRollOver = function() {  
btn\_02.gotoAndPlay(“over”);  
};  
btn\_02.onRelease = function() {  
currentPage = 2;  
content.gotoAndStop(3);  
};  
btn\_03.onRollOut = function() {  
btn\_03.gotoAndPlay(“out”);  
};  
btn\_03.onRollOver = function() {  
btn\_03.gotoAndPlay(“over”);  
};  
btn\_03.onRelease = function() {  
currentPage = 3;  
content.gotoAndStop(4);  
};
