advertisement

Article:
  The Page Turn Effect in Flash MX
Subject:   buttons
Date:   2004-12-22 07:12:59
From:   Sham_B
Response to: buttons

I should perhaps also add that if you look at the final pageturn effect (hack25_pageTurn.fla), you will notice that if you let go of the mouse during the page turn, the page will automatically complete the turn itself.


Thus, another starting point for an automatic page turn function would be to look at how this 'letting go of the page makes the page complete the animation automatically' feature works.


Big hint - look at function pageRelease, because its closely related to a 100% automatic page turn.


If you want to automatically open a page you need to look at what this line does...


turnInterval = setInterval(openPage, 10);


...and if you want to automatically close a page, you need to look at what this line does...


turnInterval = setInterval(closePage, 10);


NB - It also uses a setInterval event handler rather than an onEnterFrame, which is perhaps more efficient (it gives smoother animation without the need to up the frame rate).


S