# If currently not on this frame, play this exit

**URL:** <https://forum.kirupa.com/t/if-currently-not-on-this-frame-play-this-exit/121164>\
**Category:** Uncategorized\
**Created:** [August 31, 2004, 1:00pm UTC](https://forum.kirupa.com/t/if-currently-not-on-this-frame-play-this-exit/121164 "2004-08-31T13:00:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mistdreamz](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@mistdreamz](https://forum.kirupa.com/u/mistdreamz)\
**Post date:** [August 31, 2004, 1:00pm UTC](https://forum.kirupa.com/t/if-currently-not-on-this-frame-play-this-exit/121164/1 "2004-08-31T13:00:37Z")

</div>

hi, i’ve got a problem with my actionscripting part  
i want to create an “exit” effect just like many sites i’ve seen  
it goes somewhat like this structure:  
page 1:  
intro animation  
main page  
exit animation

```
          page 2:
          intro animation
          main page
          exit animation
          
          page 3:
          intro animation
          main page
          exit animation

```

ok, now there will be 3 buttons, to bring u to the respective pages.  
the prob is, how do i run the exit animation for the page i’m currently in, when i click on another button that doesnt not link to my current page?  
like e.g  
i’m in page 1  
when i click on page 3’s button, it will play page 1’s exit animation  
then it will play page 3’s intro animation  
i’m thinking of a code like

if (\_root.currentFrame != 1) {  
playThatFrame’sExitAnimation  
}

this will be placed on the button itself… i cant attach a .fla file as i have no idea how to do it… thanx in advance
