If currently not on this frame, play this exit

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

http://www.kirupa.com/developer/mx2004/transitions.htm

Good tutorial on exactly how to do it!

ooh… overlooked that, sorry, cos im using mx, nv bothered much bout mx2004
can that tut work for mx oso?

hi again, i have followed the tutorial but it doesn’t seem to work
i have attached the .fla, please rectify my error
thanx in advance

problem solved :slight_smile: hope this helps. i commented it all. should be working fine.

thanx, but it doesn’t really clarify completely my doubts.
i think most prob its the part where the button’s sript has to check if the “page” is in the mid frame, then play the exit animation, where i have problems…
the .fla u posted only showed how to load a movie, and check…
can u explain with regards to my doubt?

thanx

there is no such thing as midframe.
the equilvelant is:

this.midframe = this._totalframes/2;

hope this clarifies your query.