In parsing the Igor Costa (http://www.igorcosta.org/) SourceProgram(Look at my http://www.cnblogs.com/wuhenke/archive/2009/11/12/1601535.html) on the basis of, solved the Left page control, movieclip last two frames can not switch between the problem. Here is my feedback:
"Hi Igor,
Thank you for your great work of solve loading the PDF's SWF file. after learning and running your programn, I find a small bug exists in face control. the bug is that you can't switch the last two frames from each other correctly. the currentframe property of movieclip can't equal with this movieclip. totalframes forever. of course maybe it's flash bug. I spent much time in removing this bug. Last I used a skill avoiding the bug.
What you need do is add "application. application. libmc. gotoandstop (E. currenttarget. pageNumber-2);" into the first line of function dispatchpage of pages. mxml. such:
Private function dispatchpage (E: mouseevent): void {
// Tips are used here to solve the problem that the last two pages cannot be switched.
Application. application. libmc. gotoandstop (E. currenttarget. pageNumber-2 );
Application. application. libmc. gotoandstop (E. currenttarget. pagenumber );
}
Maybe you can make your work more perfect! Thank you for you prework!
"
The cause is as follows:
The maximum value of the currentframe attribute of movieclip can only be the last frame of the totalFrames-1, not totalframes. However, you can use gotoandstop to switch from the last frame to the last frame, but the switch will become invalid. I checked a lot of information and did not have a solution to the related problems. I think it's movieclip's own bug.
Solution:
you only need to modify pages. add application. application. libmc. gotoandstop (E. currenttarget. pageNumber-2); here is a small trick, is to solve the last two frames cannot switch the problem. The tip is: first switch to the next two frames of the target frame, and then jump to the target frame.