shift+control

76design’s blog

Dynamic Page Flip v2

Posted by Steve Palmer on August 22nd, 2006

Based on the popularity of my original adaption of Macc’s page flipping engine, I’ve gone back and made several major improvements to the dynamic page flip files:

  • Huge performance enhancements - new “smart” loading means that performance won’t suffer when you add more pages
  • Ability to specify which pages must be preloaded before the book starts (others will preload in the background)
  • Ability to have audio on individual pages fade in when you turn to that page and fade out when you turn to another page
  • Ability to specify a function to run after a page is torn out
  • Ability to have a “spread” (i.e. a single page that spans two pages)
  • Ability to place a “page” that precedes the book (ideal for instructions, tips, or help)
  • Ability to have pages perform actions when they’re turned to
  • Smarter preloading - less likely to stall or hang
  • Addition of page navigation bar - flip to next, previous, or specific page

There’s a readme file included with the source files that explains in a bit more detail how these features are implemented.

Enjoy!

Download the source files:
Flash 8/MX2004 - with sample video FLA (5Mb)
Flash 8/MX2004 - without sample video FLA (1Mb)

293 Responses to “Dynamic Page Flip v2”

  1. AmO

    Thank you!

    Your adaptation is brilliant

  2. yasar

    hello,

    i have a problem and a question how its is possible to do this:
    we have to rework our catalogues to a dynamic online version.

    a company here in germany scan and imports them from our generated pdf files in to a flipping catalogue.

    is its possible to change your script in that way that its work similiar like this and with the possibility to create an index and fulltextsearch, so that the pages can be found and shown ??

    here an example link:
    http://giata-div.de/flash/?cid=3866&bgcolor=E0F3E3

    this has to be completet on left side with a catalogue index (as tree) and a fulltextsearch

    how you some ideas ??

    thx yasar

  3. venorutoncastle

    Hi.Thanks for great work first.But I have a question..I am trying to load a swf from xml ..everthing is ok till here.But when I try to go to next page after the loaded swf’s page it returns to frame 1.. (…loaded one… )Like it resets itself..Also when I return to this swf page again it plays from where it was left..
    I am trying to load a swf a scrollbar inside..Think to use this like a book..
    Can you help me if there is a solution for this..?
    Thanks.

  4. naz

    Hi thanks for the great product!

    I would like to know how I can add print and zoom function to this and what is the best way to change the size of the flip book?

    thanks

  5. F. Hoeks

    Is it possible to load an swf file as a page that contains a xspf mp3 player?

    The xspf works fine when I open it on it’s one.
    But when I add it as a page in the Dynamic Pageflip. The external mp3 files won’t play. And when I want to try to flip to another page, the flipping animation get stuck. The debugger of Flash 8 has the message: ‘donothing’

    Is there anything I can do to let the mp3 player work?

    Thanks in advance and keep up the great work. It is fantastic!

  6. WaveSurfer

    Hi Steve,
    First of all, thanks a lot for this new version of PageFlip; it sure helped me a lot! (I was in the midst of editting the original copy but got stucked at the runtime-loading-jpg problem).
    Anyway, may I ask, with reference to your edited version, what are the changes I need to do if I am using bigger size pages/jpgs? I have only changed the height and width of the XML file but the ‘gradient effect of a book’ does not seem to surface thereafter.
    Please kindly enlighten. Thanks! :)

  7. Petter Sundnes

    Hi Steve

    Really good work on making it dynamic! I am just wondering if there is a way of setting a different default resolution and thereby the aspect ratio of the content also?

  8. Steve

    Sorry for not catching up on comments sooner, but here goes:

    naz and WaveSurfer - the page size is set in the XML file. Look for the height and width attributes on the root node, adjusting these should increase the size of the shading clips accordingly.

    Petter - same thing, you can just adjust the width and height to get a different page size. I’m assuming that’s what you’re trying to do, but correct me if I’m misunderstanding.

  9. Per

    Hi and thanks for all your great work on this.
    I wonder if there is some way to get dynamic shadows for the pages so that they won’t look completely flat when spread. And also if there is some way to get the navigation bar to present links to all pages (1, 2, 3, 4..) (you could put the number of pages into the the xml-file manually i guess but still i haven’t managed it myself). Big thanks!

  10. han

    Hi

    Thanks for the brilliant code…
    Can you please tell me how I can auto play all the pages??
    They need flip over by themselves every 5 or 10 seconds…
    Your help will be greatly appreciated…

    Thanks
    Han
    South Africa

  11. Steve

    han - there is a built in function called gotoPage(n,skip) where “n” is the page you want to go to and “skip” is a boolean value that indicates whether it will flip directly to that page, or flip page by page.

    It would be pretty simple to set up a setInterval() that called gotoPage at a defined interval. The only problem is that people would be able to flip through the pages in between those intervals andthat would interfere with the auto playing. You could get around that by disabling the page flipping when you’re not auto flipping. There’s a variable called “canflip” that, when set to false, would prevent people from flipping the pages.

    If you read through the code on frame 9 of the actions layer you’ll see a more detailed breakdown of what customizable values and functions exist.

  12. britt

    Good Work! I was wondering if there is a way that I can make each page a link so when you click it a bigger version will come up so people can read the text.

  13. honda

    Thank you.
    This is wonderful.

    Is it difficult to adding a zoom function?

  14. Ludwig Zeller

    I am working on a terminal system and had to use 700 x 1000 as the resolution for one page. At sizes that big, the shading system done by marc doesn’t work properly. The shadows will be clipped.

    Search for the line
    pages.mask._xscale = 100;

    And increase the xscale to e.g. 200. You have to replace it in two branches of an if statement, which lie close together. There might be a cleaner solution, of course.

    Enjoy and thanks to everybody contributing to this.

  15. Ludwig Zeller

    As I just realised, the procedure described in my last post isn’t enough. To get rid of the other shadow problem you will encounter you can include

    pages.flip.fgrad._yscale = 160; (or take another value, as you see fit)

    in the two branches of the if-statement described above. Btw. it is situated on frame 9 in the v213_dynamic_smart.fla.

    @Wavesurfer: Does this solve your problem?

  16. petem

    Hi!
    I’m aware that this might be lame question but could someone please paste example of how the function gotoPage would work? E.g. how do I make it go straight to page 4 on fiie load. Thanks a plenty!!!

  17. Steve

    Hi Pete - in most cases, it’s easiest to just call _root.gotoPage(4). Check the actions on the page navigation buttons just under the flipbook for examples.

  18. Makak

    Hi!
    help to understand function zoom as on ipagez.com

  19. bastom

    Hi!

    First of, nice addon you did… I realy like how it works and loads dynamicaly.
    Just a couple of small questions i hope you can answer.

    I need a rotated version.. might sound weared, but just the intire thing to be horizontal instead of vertical… pageflip from bottom to top.. is this posible? And how can i do this?
    Als, with changing the page hight and width.. i did change it in the xml file, but then i cant flip..also it doesnt work right anymore when i shorten it…
    Could you give some explanation on what to do to a fairly n00b?

    Thnx in advance!

  20. David L.

    hi Steeve, wonderful job that I applied for a Belgian magazine that would like to sell itself online, but still hesitate between PDF and a hi-res version of your adaptation of Macc’s engine:
    http://www.imagine-magazine.com/preview/57/
    However:
    1/ same question as Honda and Britt: is it possible to zoom in to read the text (or click to open a bigger page that is readable)?
    2/ same as Per: is there a way to get dynamic shadows for the pages so that they won’t look completely flat when spread (and with a permanent vertical line in the middle of the magazine)?
    Thanks a lot!

  21. bastom

    Hi!

    Figured out how to scale the pages and add more pages!!
    Its just like people said before… very easy… change the xml file.. i think i just had a problem with cash, cause when i changed it yesterday nothing changed. Now it works!

    Still one issue tho… is it posible (i know i never saw it before) to flip from bottom to top instead of right to left (left/right).

    If you could tell me how to do this that would be awesome!!

    Thnx a lot!

    Tom Maene (darklings@stonerrock.net)

  22. Steve

    Hey Tom,

    If you want to rotate the entire book and flip from bottom to top it’s super easy. Just go to the “pages” layer and grab the one clip on the stage (called “pages”) and rotate it 90 degrees. Obviously you’ll have to rotate the imported pages as well (assuming you want to read them left to right)

  23. memo

    Hi Steve
    Very good job. I have tested with about 200 pages of 415*550 Pix. It takes too long to load about 2 minutes while it works directly from my PC, and when you flip through the pages it uses lots of memory that increases with each page flip. It increased the memory used on my PC while fliping and never realese memory used. I have tested the link http://www.imagine-magazine.com/preview/57/ and it does the same.
    Is there a way to enhance the memory usage with lots of pages loaded.
    Thanks again

  24. memo

    When i closed the tab with the url http://www.imagine-magazine.com/preview/57/ after flipping through all pages the memory usage dropped from 762 to 489 MB. Though the number of pages there is not big??
    For the processor it works so fine even when flipping but for memory there is some thing missing.
    Please point out how to overcome this problem.
    Thanks

  25. Joerg

    Very Great Work!

    How is it possible to make the pages “klickable”? I want to link on some Websites with the Flash. Can someone help me?

  26. bastom

    Thnx a lot Steve! It was indeed simple to rotate it all :)

    However, one other small question!
    I dont need the tear off future. So i left those lines out in my xml file.. but for some odd reason i’m always able to tear off my first page. Any idea why? (Isn’t that important, but if you could provide maybe an easy solution to get that future out of my movie, cause i realy dont need it).

    Oh, and another small question… how/where do you make a ‘explanation’ page. Like before the first page.

    Thnx alot

  27. memo

    Hi Joerg , you can make the page clickable as you like simply by making the page swf. You can load pages in jpeg or swf , so you can do what ever you want in that swf you can do what ever you want.
    bastom for the ‘explanation’ page. Like before the first page you mentioned , that could be done in the xml file , the 1st line
    the prepage is the page you need

  28. bastom

    Hi memo,

    thnx for the explanation. But somehow i am not able to open that pre-page.fla in my flash… also it does realy weared things..
    When i open the swf all i see is an arrow. When i checked in my main.fla i positioned it right.. but when i check the exported swf.. there apears a text on it too: something like: This Page Is Before The Rest…and the arrow, but totaly off screen… not centered at all..
    Anyway, i think i’ll experiment with this a little bit.

    Do you have any clue, why my first page has the option ‘tear off’? cause i got rid of them all in my XML file

    kind regards,
    tom

  29. gnouff

    Very good work !
    Congratulations
    Is it possible to use the
    gotoPage( destinationPageNo, skip ); function in a swf file
    Thanks

  30. seunghyun

    thank you for good works.

    how can i fix it to show one page flipping.

    like… only show them right page…

    i tried w/ IsSpread… but my page is not exacly divided from center.

    Can I put 800×600 swf file in right page & show right side only?

  31. Steve

    gnouff - yes it is possible, but you need to make sure your parent/child references are in check. In most cases, you can just call _root.gotoPage(n) from your page SWF file.

    seunghyun - you mean you want to just show the right side of the book? That would make it a bit difficult to use, but theoretically you could do it just by placing a mask over the “pages” movieclip that blocked out the left side.

  32. bastom

    Pls answer, where does the text:

    This Page is before the Rest

    (alteast thats what i think it spells)
    Where do i change it or where do i get rid of it.. by turnin everything up side down and moving stuff its way out of where it should be!

    Thnx in advance

  33. Steve

    bastom - that is in the prepage.swf file in the /pages folder. You can either get rid of that file or remove the reference to it in the XML (it’s on the root node).

  34. seunghyun

    sorry, steve.

    I dont really get what you are saying.

    U mean… just change the x & y of mask from libraries???

  35. Steve

    No - create a new mask layer and apply it to the level called “pages”. Place a mask there that covers only the right side of the book. If you’re not familiar with masking, read the Flash help.

  36. seunghyun

    Is it possible to put right page from (0,0).

    then, Left side will be (-800,0).

    Trying to chagne pages and x,y from scripts.

    Not working well yet.

  37. seunghyun

    I just modified my page little bit and am using isSpread now.

    working very fine… Thanks, Steve ;)

  38. Troy Wilson

    Steve,

    Wonderful job you’ve done with the pageflip code. I’m kind of torn between the original code and yours because you seem to have eliminated the “sticky” page that has caused me so much grief, but I would also like to have the “Hard” cover look. Any chance your coming out with a mod that implements that feature? One other thing, using your code, how would you dynamically load text into the pages. Currently I am just putting static text in the fla and passing a few dynamic bits via query string, but if you have a more effective way I would really appreciate any help you could provide. Thank you!

  39. beck

    Hi. Your work on this thing is really neat. I’m trying to make the pages get shadows (from the middle of book) so that they doesn’t look all flat when you’ve droped the page. Is there any way for me to do this - cause it seams a little tricky. Please help.

  40. NR

    YOU F#$(#* ROCK! Thank you so much, saved me so much time!

  41. Steve

    beck - I know what you mean about it looking flat without the shadows. That’s just something I add to the individual pages in Photoshop or Flash.

  42. Steve

    Troy - the dynamic pageflip source I’ve provided does allow for hard covers. Just set the attribute hcover=”true” on the root node in the XML. By default it’s set to false.

    I haven’t done much in the way of passing in dynamic text, but in other projects we generally use AMFPHP, an open-source Flash remoting gateway. If you’re using PHP already, it’s great.

  43. troy wilson

    Thanks again for your help, it’s always nice when you can accomplish somewhat difficult tasks without breaking the bank!

  44. Mark Ross

    Kudos, Steve… You’ve helped create a real asset — thanks!

    I’m being fairly lazy today so please allow me two (hopefully) easily solvable questions:

    1) How to easily implement a page-turn sound? I know it’s in Macc’s original source, but I already said I’m lazy. :)

    2) How to make the cover (front and back) slightly larger so that the flipping pages seem to turn and be “inside” the covers… Macc’s V2 Pageflip featured this as I recall.

    Again, many thanks!

  45. Renato

    Hi
    I would like to know how I can add print and zoom function to this flip book ? I want to make flash book with dynamic content (add/remove/edit pages).

  46. Blake

    Steve,

    I am really really rusty with flash… and I have never tackled anything like this before. I have some time on my hands right now and I would like to build a virtual portfolio to show around… is there any easy tutorial on how to use this code you have created… perhaps a “quick start” guide or something along those lines?

    Thanks!

  47. Ibinhoooo

    Terrific Work Steve!

    I was wondering how could i build a book 800×600… cause i think the shadows are a little bit buggy when we try to put bigger pages on it :)

  48. Jona

    Awesome script. Thanks a lot!.
    I have a question/problem:
    I have a XML file with n SWF and each one of tihs file contains buttons and animations, my problem is that when a turned a page, i can click the buttoms of the previous page (i.e. I looking the page nº8 and i can click the page nº6’s buttons). The function onInvisible() doesn’t work on the swf

    Sorry for my english grammar :P

  49. Andy

    Steve, like “BLAKE” above [previous question], I too am rusty in flash and want to know if there is a tutorial available on implementing flip book in flash and creating a portfollio/magazine using this great engine? i have my files ready in pdf format…now i just need to know how to get it to go!

    S Anderson
    Sr. Art Director
    Playboy

  50. Steve

    Blake and Andy,

    It really doesn’t matter if you’re rusty at Flash - theoretically you shouldn’t even have to open the FLA. Everything can be done via the XML file (and the readme file explains how everything works there). If you’ve got PDFs, just save them out as JPGs in Acrobat, note the size of the pages (width and height) and then just add them one by one into the XML (you can add paramters in the XML to specify whether the page should be preloaded or not, whether it’s “tearable”, whether it’s a spread etc. ). That’s all you’ll need to do to get the book set up! I feel like an infomercial talking like this…
    But if you do want to get “under the hood” and make improvements to the behaviour or the look of the navigation, you will have to open up the FLA to do that. Unfortunately there’s no way around that and no guide or tips I can really offer to help you out. It really depends on what customizations you’d be making. Feel free to shoot over any other questions you have.
    Cheers, Steve

  51. Sébastien FICHOT

    Hello Steve,

    I think than i’ve found exactly what i was looking for, but two questions appears :
    - Is possible to send a page which contain a text HTML and the image background or the color associated ?
    - Is possible to attach a css to a text using a parameter ?

    If not, I will developp it and would greatly appreciate your help.

    Thank you

    Sébastien - FRANCE

  52. John

    Thanks for pushing the envelope on dynamic loading. Any chance for Mark’s request above:
    2) How to make the cover (front and back) slightly larger so that the flipping pages seem to turn and be “inside” the covers… Macc’s V2 Pageflip featured this as I recall.
    Thanks

  53. A fan, learning ActionScript and ooking for a nice Dynamic Page Flip

    Hello, Steeve,

    I was looking for a nice Page Flip and arrived on the parigrafika.hu website, I’ve downloaded the fla, and began to study it. I was interrogated about the type of pages.p0, p1, p2, p3, p4 and p5, and i’m actually not sure to understand what they refer.
    Correct me if i’m wrong :
    pages.p0 : The page called by the firstchild XML attribute ‘prepage’, and displayed as the ‘instructions’.
    pages.p1 : A left page.
    pages.p2 : The page before a left page for transparency and preload.
    pages.p3 : The page after a right page for transparency and preload.
    pages.p4 : A right page.
    pages.p5 : the latest page, not end of the book, but similar to ‘prepage’ at the end.

    Is it true ?

    That’s the how i’ve found your blog.

    You says than your code is based on the 1.13 release, and the release 2.0 of the parigrafika.hu Page Flip is out, and include some interesting functionnality :
    - the ability to see the internal cover visiting the pages.
    - a better shading effect when sliding a page.

    Your changes to the code is really interesting, particulary the ability to load dynamic swf or jpg file through XML parameters, but this functionnality isn’t completed : some people (including me) would like to be able to send HTML TEXT.
    As i’m learning ActionScript, i’ve learn than the TextArea is the way, and as anything codeBehind we can dynamically create a TextArea control in a page which is used as template. In this order of ideas, if i send this HTML content throught the XML file :
    Look at this !
    we could create a TextArea control, then a Image control, and another TextArea control.

    I think than it’s the way to make the “Dynamic Page Flip v3″.
    If you won’t devellop this, could you just indicate the place where the type of control created is declared ? (I come from J#, C# and VB.net, and don’t understand ActionScript as well (IntelliSense ?))

    For more, i’ve added some modifications to the code in order to make some change easier at the book conception stage :
    —————————————-
    // specify content source
    if(_level0.xmlFile==undefined) {
    if (_root.param_ExternalXMLFile !== undefined) {
    _level0.xmlFile = _root.param_ExternalXMLFile; // Will listen for a FlashVar param_ExternalXMLFile containing the relative path from the swf to the xml file.
    }
    else
    {
    _level0.xmlFile = “xml/Defaultpages.xml”;
    }
    }
    —————————————-
    if (_root.param_FlipSpeed !== undefined) {
    var es = _root.param_FlipSpeed ; // Will listen for a FlashVar param_FlipSpeed containing the number of frames used in the Flip action.
    }
    else
    {
    var es = 10; //flip speed after mouse btn release
    }
    —————————————-

    It could be great to use a FlashVar to specify if the Naviguation Bar is displayed or not. I’ve tried but don’t obtained the expected result…

    I have some other ideas, but will wait for your answer before.
    You can contact me at : sebastien {dot} fichot {@} aricie {dot} fr

  54. beck

    Hey, is there anyone who knows a good way to give the spreads dynamic shadows? It would be a whole lot easier than adding them to every single page. And I bet it look better too. So, does anyone have any ideas? I am just not getting how to do it. I’d really appreciate any thoughts on it. Thanks a lot for your time

  55. maurizio

    I’m working with your wonderful Dynamic PageFlip for a client of mine : I’ve added a table of content with thumbnails (and I’m going to make it dynamic), I’ve added an Instruction page, a PDF version link etc etc and I’m going to add a zoom function. But I’ve run into a memory leak problem. The catalogue is huge (200 pages more o less) and at every page turn Firefox memory increases a lot (it’s the same with IE).
    Now I’m reading your actionscript code just to have an idea if there is any way to solve the problem. During my reading I’ve encountered two function calls in your code, onVisible() and onInvisible() but I can’t find their definition anywhere…
    Am I missing something?
    Any idea about the memory leak problem? I’ve found that the same thing happens with a dynamic version by Macc (a demo version he sent me following my request by e-mail, it’s a commercial version), but I’ve also found another commercial page-flipping solution with Flash at http://www.livepaper.dk/ and in this case Firefox memory increases but not so much so I think there should be a way to solve the problem or a way to keep it down anyway.
    Suggestions are welcome :-)

  56. ben

    Hi Steve,

    As everybody else has said… Thanks for a great bit of work!

    Trying to work out the position of the top left corner of the left page & the top right corner of the left page.

    it’s still eluding me; any hints?

    Thanks in advance….

  57. Steve

    beck - it’d be a bit tricky to add dynamic shadows. I don’t have the FLA in front of me, but you’d need to add them to the clips p1, p2, p3 and p4. If you drill down into the movieclip on the ‘pages’ level you’ll find them. The tricky part is that the shadows would have to flip from the left to right depending on which way you were turning the page. (i.e. the “p2″ clip could be on the left or right side of the book, depending which way you were turning the page)

    maurizio - memory leaks are not really something I understand very well. I mean, I understand what they are, but not being a programmer I’m not really sure where they come from or how they can be fixed. Perhaps a programmer out there can find something that I’m missing? Regarding onVisible() and onInvisible(), those are functions that would be placed in the individual pages so they’re not defined in the page flip FLA. (i.e. you might put an onVisible() function in page3.swf that tells that page to play a video or something)

    ben - you should just be able to get the position of the “pages” movieclip, that’ll give you the centre of the book. From that you can use the page width and height to determine the location of the 4 corners of the book.

    sebastien - I’m not quite sure where to start, but what you’re describing wouldn’t be too tough to build. Theoretically all the pages could use a single .swf file that had a large text field on it. Then you could use CSS to style any HTML you placed in that text field. Seems pretty straightforward, but not having done it I can’t say for sure.

  58. A fan, learning ActionScript and ooking for a nice Dynamic Page Flip

    I won’t use an external swf file loaded as a movies, i want to add a control type property. The value is given throught a xml property associated with each page, and the selector is located at the control instanciate stage in the Actionscript.

    If you have an idea / tips for making this easier, please say me, but i will surely obtain what i’m looking for basing on your control and i will send you the fla.

    Sebastien - FRANCE

  59. ben

    Thanks for the tips Steve,
    I’ve now managed to get some dynamic text & images being loaded; loading a blank swf as say page 1 and then this swf loads text/images through its own action script & xml.

    Only problem is the text doesn’t ‘flip’; disappears when the page is turned, and is only viewable when the page turn has been completed. Somehow need to turn the ‘dynamic’ text field in the loaded swf into ’static’ once the text has been loaded.

    When Images are dynamically loaded there’s a problem with the levels as this image will permanently show on top of all the other pages, any idea what levels these should be loaded into?

    Basically once the loaded swf has loaded it’s own image and text somehow need to ‘flatten’ everything…..

    Thanks in advance…
    Ben

  60. erwin

    steve, thanks for your great source :D
    but, how could i get to another page by the external swf which i loaded by pages.xml ?

    example i put button to go to spesific page in external.swf

  61. Steve

    erwin,
    This can be done by calling the gotoPage(n) function… where n is the number of the page you want to go to.

    In most cases, when you call it from your page SWF you’ll do it like this:

    _root.gotoPage(4);

  62. Steve

    ben,

    That issue with the text appearing/disappearing might be related to the Flash 6 player. Try publishing as Flash 8.

  63. erwin

    Thanks Steve

  64. maurizio

    thanks steve for the reply about onVisible() on Invible(), I was in a hurry, now I see that what you’ve written in your reply is already there in your readme files… Sorry for having bored you with a stupid question :-)
    About memory leaks I’ve just had some other tests and the reason why the commercial LivePaper (http://www.livepaper.dk/) seems not to suffer from them is that it doesn’t load all pages once and for all, but it loads some pages during preload, then it loads only pages you want to read (and perhaps the two before and after). Every time. You can see it the very first time you load a book made with LivePages, there is a preload bar. When you have your pages in cache, no more preloading bars. Well, this is what I’ve deduced with some tests, perhaps it’s wrong or not, I can’t know it for sure… LivePages is very quick in loading activities so I don’t know if this is the right way they’ve used for their product. If so, the reason of memory leaks could be that all pages are in memory, inside an array, so it could be difficult for Flash to manage them all.

  65. Sandra

    Hi, Steve!
    Im from Salta, Argentina. We are making a newspaper with dynamic pageflip and would like to know if there is a way to have load on demand pages. Any help would be grateful. Thank you anyway.
    The site we are developing is: http://www.diariodigitalglobal.com.ar . You have to click on “Lectura de titulos” button.
    Sandra

  66. Sébastien

    Maurizio, can you send me your work on the zoom function ?
    Maybe we can discuss by mail ? Please contact me : sebastien {dot} fichot {@} aricie {dot} fr

    Sébastien

  67. Jacqueline

    Hey Steve, great work!

    i was wondering why mine would not load the last page and i tested it from flash..if it loads..the whole page would have some problems.what problem might i be having?

  68. naz

    Hey all

    I was just wondering if anyone had worked out the zoom and print function yet! and would like to share!

    naz

  69. jr

    Hi Steve,

    Thanks for such a great script. Is it possible to make this into a “component”??

    The problem I’m having is if I want to change the “stage size” then everything gets messed up in terms of where the various parts should now be placed. If it were a component it could just be dragged and dropped.

    Thanks very much.

    James

  70. Steve

    jr - perhaps it could be made into a component one day. My experience with components is limited, but I don’t think it would be too difficult with something like this…. famous last words.

    In the meantime, you shouldn’t have to change the stage size if you want to make the movie larger or smaller (dimension-wise). It’s set to not scale, so you could drop it into your HTML as a SWF object 300 pixels wide or 3000 pixels wide and book would just sit in the middle of the movie, at the dimensions specified in the XML file. Unless I’m missing something about what it is you’re trying to do?

  71. maurizio

    Hi Sébastien,

    sorry for delay but I’ve been very busy during these days and also next week will be very hard… I will send you an email as soon as I can, however zoom function I’m working on is essentially based on a button placed on the page I want to zoom. Using this button you load a bigger version of that page (well, in fact two pages, the left one and the right one) in an empty movie (unvisible till that time) placed upon the book. Then you can move these bigger pages (they don’t show entirely in the zoom movie) using a drag function.
    Doing so you have to use swf files for external pages and not Jpg files, because the zoom button is inside the file you dinamically load in the book. Well, this is the way I’ve chosen because it’s very easy, I think there should be more professional solutions (perhaps a zoom button made and attached by code) but I’m quite in a hurry for this project so…

  72. Colin

    This is a really stupid question and will show my lack of programming knowledge, but how do I get the book to display on my website once I’ve got the .as and XML file tweaked to my liking? Do I somehow attach it to an HTML file? Link it as is?

    Thanks!

    -Colin

  73. heiko

    Great work steve!

    my question is if its possible to add tabs which u can see the whole time and flip aswell. u get the idea?

    like if u got a real book and take a post-it.

    thx in advance, am really freakin out on trying to get it work…

  74. Tomas

    I’m having a problem with images not showing up on the server.

    Everthing works fine on my local machine but when I upload it to my ISP server the images don’t show.

    The swf will go through the pre-load stage and the nav buttons will appear, but no images show up where the book should be. All you see is a narrow gray band.

    Does anyone know why this might be happening? Do I need to configure the server somehow for XML?

    Even when I upload the exact files downloaded from “Dynamic Page Flip v2″, it still doesn’t work.

    Thanks for any help on this.

  75. Panos G

    is there any way to disable the preloader function ? for some reason , the sample fla file it won’t play normal. For example it trying to load the picture and the CPU IS GOING ON 100% , i have try it both firefox and ie , and also on different machine , also i have try to replace the preLoading=”true” with false , and it stucks on page 0 of 1 :((((((( why is so heavy ? when it preloading images? ohh , how can i disable the preloading of Preimage?

    Very good job of script , but i think the preloading function is miscomplete , is there any way so i can disable it ?

    you can see an example of my flash at this site http://www.metaxota-soufliou.gr/history.php

    Please feel free to tell me why the script is going so heavy ???
    Thank yo

  76. Jp ™

    Same problem as Panos G here.
    I have more than 50 pages to load, and the preload =”true” does not works correctly : even with one page with preload, it load all the page wich cause huge lag of the CPU and inaceptable 4 browsing waiting time.

    Is someone have the solution about this please ?

    Regards,

    Jp

  77. Steve

    Jp and Pagos G - yeah, you guys are certainly right about the preloading issues. Basically, the way it’s set up now setting a page to preload=true is telling the page flip “do not start displaying the book until this page is loaded”. Other pages with preload=false are set to load in the background. My next improvement will be to develop a more intelligent loading engine that basically queues up the pages and handles them one by one (or at least a few at a time so it doesn’t choke the end user’s machine). But I haven’t found the time to do that yet, so I’m afraid that’s a limitation of the current version. If somebody has an urgent that requires this feature they can contact me offline (steve at 76design dot com) and we can discuss.

  78. Panos G

    Thank you Steve .

    For the time , i will work with V1 pageflip of your .
    I don’t know if there are any solution for this? insted to rewrite your script for preloading function. is there any other solution? for example to disable something ? or make a smaller jpg files?
    if not , then i have to use your old code , which it load a lot faster.

    Anyway , thank you for your answer, i would like to knew that becouse i was searching all the internet ;)
    I will wait your next version, until then…happy coding

  79. Gene

    Has anybody made a zoom function for this?

  80. CHOChammie

    how do we add flip sound into the pages?

  81. Tizz

    Cheers Steve

    this is a wicked extension to the pageflip.

    However i have one problem - i am loading multiple versions into a container movieclip to be publised as part of a projector file and put on a cd but when i load the second pageflip movie in the page flip stop working. has anyone got any ideas i was wondering if i could just update the xml or if it’s best load a different movie

    Hope someone can help

    Cheer

  82. Gautham

    Hi Steve
    My prob is again Zoom.I saw a lot of questions on Zoom but none answered.I saw this also
    Makak says

    Hi!
    help to understand function zoom as on ipagez.com

    Iam also interested in knowing how ipagez zoom works.I did mange zoom using different images.Please advice

  83. zoe

    hi everybody,
    Steeve doesn’t reply regarding ZOOM and SOUND. Anybody could help?
    Thanx a lot
    xxx

  84. Steve

    Hey everybody - it’s about time I caught up on the comments:

    Zoom - this was never something that I had thought was that interesting or important to incorporate into the page flip, but given the number of people that have asked for it, it will probably be something I add next time I update it. In the meantime, if you want to build in some zoom functionality you’ll have to do open up the FLA and get your hands dirty… so to speak.

    Sound - if you’re referring to a sound that plays when pages are flipped, that’s really not too difficult to add. I don’t have the source files in front of me, but I will post a note on where that should be inserted into the actionscript.

    Tizz - again, I don’t have the file handy right now but if you drop me a note to steve at 76design dot com I should be able to help you out with that. It has something to do with a function that must be called when you reinitialize an existing page flip or add a new one. If memory serves me right, I believe it’s on the last frame of the actionscript layer. There’s a comment in the code that describes what it does.

  85. Stéphane

    Hi Steve,

    Thanks a lot for your great work!
    My question is : Buttons on swf pages, are still active when I turn pages, so I can clic on them through other pages… I tried to disabled those buttons with the visible/invisible function, but without success… with Iparigrafika’s version, i was using the following code : — btn1.enabled=(_root.getPN(19) == _root.page); — but in your version of the pageflip it doesn’t work… can your help please? Thanks a lot!

  86. Stéphane

    Hi,
    I would like to know how to solve the following problem.
    When a page is a swf with buttons, the buttons remain active even if the page is not visible. So if I have buttons on page 12, i can click on those buttons on page 14… and if i have buttons on page 13, i can click on those buttons on page 11.
    Thanks.

  87. Steve

    Hi Stéphane - the visible/onvisible functions are designed for just that, as you mentioned.

    There might be an error in your actionscript that is causing the buttons to still be enabled. If you check my source (with the video) I think the video FLA has an example of using the visible/invisible stuff.

    Let me know if you’re still having troubles.

  88. Stéphane

    Hi Steve,

    I just tried a simple test with your source files, by adding (in transparent page1) a button named “btn1″ with a dynamic text field named “monTexte”, with the following code in frame 1. Unfortunately, it is still not working… I can click the button from the previous page. Can you figure out what would be the problem?

    function onVisible() {
    btn1.enabled = true;
    }
    function onInvisible() {
    btn1.enabled = false;
    }
    btn1.onPress = function() {
    monTexte.text = “bonjour”;
    };

  89. Stéphane

    Hi Steve,

    I just notice something… the function work the first time you open the book. But as soon as you click the button once, it become clickable from the previous page… the function doesn’t work anymore. Strange…

  90. André Hedetoft

    Hello Steve!
    First of all I just want to thank you for one hell out of implementing xml to pageflip job!

    Beautiful!

    I have a little problem with the spread pages though.
    If I just run an static swf file with a simple animation on a spread everything works great.
    BUT
    I have an interactive swf file that spreads over two pages.
    My problem is that the interactivity only works on one page at the time.
    Not both like it’s supposed to in a spread.

    Does your version support interactive swf on spreads?
    Do you know what I have done wrong?

    Greatful for you help!

    Best regards

    André Hedetoft
    Geek Movie Director
    Join my Fan Club so that I get to make my next movie over at http://www.andrehedetoft.com

  91. Steve

    Hello André,
    It’s not something you’re doing wrong, it’s a limitation of the spread feature. Because you can move (flip) either side of the spread independently of the other, there has to be two instances of the spread on the stage - one for the left and one for the right. For this simple reason, the left and right sides cannot interact with eachother. Make sense?

  92. Stéphane

    Hi Steve,

    I feel embarrassed to write you again about my problem, but honestly, i didn’t find a solution. My project is almost finished, and i can not put any buttons in my pages… (most of it for tooltips). Did you already made a version with buttons in the pages? If yes, could you send me a copy of it, in order for me to figure out where is the problem? I would greatly appreciate.

    Thanks a lot for your help.

  93. André Hedetoft

    Hello Steve!

    Thanks for the fast reply!
    I suspected that it was something like that.
    Either that or that one side that override the other.

    I guess that there is no way to script a solution to this problem because of how the pageflip works?

    Right now I solved it by loading that swf over it and then unload it again but that is kind of an duct tape solution ;)

    Either way, thank you for your great job (and thank you to macc) and for the fast reply!

    Keep on rocking!

    André Hedetoft
    Geek Movie Director
    Join my Fan Club so that I get to make my next movie over at http://www.andrehedetoft.com

  94. DaGuti

    De puta madre!!!!!!

  95. Micky

    Love the script, im new to flash but have modded it slightly to allow for zooming and printing of pdf files individually.

    i have one question which is troubling me, i cant find the variable name which will give me the value for the current page. is this in a function already or do i need to write some actionscript to determine the left page and right page number?

    im hoping this is already done, as im really bluffing my way through this..

    thanks steve!

  96. Piedro Mazolo

    Hi, and thanks for a great implementation! I just bought a simillar website template for $55

    http://www.template-support.net/tma/tma_moments/

    (havent received it yet, is this a fraud company??), but yours is better since its dynamic! I will try to modify it, changing the buttons and adding some more like go directly to various sections etc. Perhaps also clickable table of content in the book. And incorporating it into a html page that checks for flash installed etc (suggestions on that?).

    However, there is one thing I miss and can figure out how to do: A bit more “portfolio look”, by adding a slightly larger hardcover and som “depth/pages”. See the example above.

    Anny suggestions of where/how to do this?

    Rgds
    /PM

  97. Piedro Mazolo

    Noticed that this is already there in maccs v2 version…
    But then again i get no xml.
    And the link to his source is not working…
    /PM

  98. Piedro Mazolo

    One more thing… would it be super hard to make the whole thing re-scale to the window?

    /PM

  99. Steve

    Micky - it’s kind of weird, but that’s never really come up before. There’s no simple way to get the current page number, but what you can do is check the value of a variable called “p3″. However, without getting into the nitty gritty of it you can’t use it’s value as-is. For instance, if you have the book open so that page 14 is on the left and page 15 on the right, “p3″ could be either 14 or 15 (depending on how the user got there and a couple of other variables) but if you look at the value and say “if it’s odd, it’s the page on the right and if it’s even it’s the page on the left”. Hope that helps.

  100. Lasse

    Hi, great stuff.
    I have a question though. Is there a way to include the preloader script in to the preloader I have now. ’cause when I use it inside a project of mine (which is also a flash file), it’s really buggy until the pages have finished preloading. So if I could get the preloader to start loading together with the preloader that loads my flash file (which is the file where the page flip book is placed inside), then it would be great? Any suggestions?

  101. Micky

    Hi Steve,

    I think p3 is also equal to _root.page which i’ve been using, but my problem is that it wont refresh upon each page flip. So if i start the book at Page 4, then it returns 4, but stays on that value.

    Im sure the answer lies in using code inside the onEnterFrame function.

    Will have a play around and let people know if i find out a way.

  102. Micky

    Got it. Create an input text field and name it CurrentPageNum (or whatever you want to call it) and place it on the stage - i put mine in the pageNav movie. Then add the following action script depending on which side of the page you want to find the value of.

    onEnterFrame = function() { //left side
    currentPageNum.text = _root.page;
    }

    // or

    onEnterFrame = function() { // right side
    CurrentPageNum.text = _root.page+1;
    }

  103. J

    Hi Steve,
    Just wondering when you might think you’ll have a chance to update/fix the problem with the “preloading” — as described in some of the posts above?

    Thanks again for a great file.
    J

  104. Steve

    J - honestly, it’s not likely that I’ll be making that fix in the near future. I tend to work on the page flip when I have free time or when somebody pays me a little money to make a custom improvement. The blog has been great because I’ve gotten lots of useful feedback from people like you on where the page flip falls short. I’ll probably compile a list of the few most popular requests and incorporate them into a version 3, but I can’t provide any timeline for that. Following with the tradition I’ve created so far, I expect it would be in the spring or summer.

  105. Andreas Ahmann

    Hi Steve,

    great job, thank you very much - this really saves me quite sleepless nights :-)

    I have a comment on the posting from Ludwig Zeller dating Sep 10 2006: I can’t find the stuff from your second post, but already the first post gets me 70% of where I need to be! Thank you so much!

    Steve, please remeber that post and if you have a chance, incorporate it in the next version. It might also be a good idea to scale all loaded jpegs automatically to the page size in the xml. Especially if you work with pages of 1000×800 or so, one needs to alter the code to make it work.
    Anyways, thanks a lot!

    Greetz from Germany

    Andreas

  106. Andreas Ahmann

    Oops - I have an addition to my last post: Of course I can’t find it since I need to put it in… I was stupid, sorry. Right after typing my last post, I found it, put it in and now I am a happy camper! Thanks guys!

    Andreas

  107. Piedro Mazolo

    I am trying to incorporate “LargeCover” from the original pageflip 2.2. In that code a layer is added to “pages” with a page pLL and PLR, and this code is added to setpages:

    if(lcover) {
    var lpl = transparency? p1-4: p1-2;
    var lpr = transparency? p4+4: p4+2;
    var limit = transparency? 0: -2;
    if(lpl>limit) {
    pages.pLL.page.pf.ph.attachMovie(pageOrder[2],”pic”,0);
    pages.pLL.page.pf.ph._y = -ph/2;
    pages.pLL._visible = true;
    } else pages.pLL._visible = false;
    if(lpr

  108. Piedro Mazolo

    if(lpr

  109. Piedro Mazolo

    I am trying to incorporate “LargeCover” from the original pageflip 2.2. In that code a layer is added to “pages” with a page pLL and PLR, and this code is added to setpages:

    if(lcover) {
    var lpl = transparency? p1-4: p1-2;
    var lpr = transparency? p4+4: p4+2;
    var limit = transparency? 0: -2;
    if(lpl>limit) {
    pages.pLL.page.pf.ph.attachMovie(pageOrder[2],”pic”,0);
    pages.pLL.page.pf.ph._y = -ph/2;
    pages.pLL._visible = true;
    } else pages.pLL._visible = false;
    if(lpr “less than” (maxpage-limit)) {
    pages.pLR.page.pf.ph.attachMovie(pageOrder[maxpage-1],”pic”,0);
    pages.pLR.page.pf.ph._y = -ph/2;
    pages.pLR._visible = true;
    } else pages.pLR._visible = false;
    }

    And for testing this I also removed all autoclipping done in frame 10.

    However, I dont seem to be able to get anything to show up on pLL or PLR. Could you suggest how to show part of the larger page 2 as above. How to load that p2 movie onto pLL so I can show it behind sticking out beneath the other pages.

    Any help is welcome!

    /PM

  110. Piedro Mazolo

    Sorry for that multiple posting. It seems “less than” sign is not accepted…

    Anyway, my main concern now is this line:

    pages.pLL.page.pf.ph.attachMovie(pageOrder[2],”pic”,0);

    to try to convert it to your dynamic version.

    Rgds
    /PM

  111. Stéphane

    Hi Steve,

    I was wondering if you could post the code that would allow us to add a flipping page sound when we turn pages?

    Thanks a lot for your help.

  112. alvin yeung

    steve! you pimped up/out Ip’s pageflip. nice job!

    i got a million and one problems as usual,
    but specifically with this piece code…

    has anyone else run into problems loading multiple spreads?
    i checked the bandwidth profiler when you simulate the download in flash,

    it preloads the spreads multiplied by 4…so lets say i have a 98kb spread…it’s actually mulitplied by 4 so it takes 4 times as long for something to normally load…

    the preload problem has been mentioned a few times previously…

    just wondering if anyone has found a workaround for this?

    also;

    has anyone else tried to load this portfolio/pageflipper into another movie acting as an external swf?

    thanks!
    nice job steve

  113. Mandy

    Hi Steve,

    ++ Thank’s for the very nice script ++

    Would it be possible that the edge on the right side flips (just a little bit) when you enter the site, so that visitors know, that they could be flipped?

    Thank’s for your support.

  114. Mandy

    And would it be possible to load pdf-files instead of jpg’s?

    Regards

  115. Mandy

    Sorry, Steve for my double posting.

    I know, that you can save pdf’s to jpg’s but if you could upload pdf files, links could be shown, etc.

    I also know, that this is possible via swf - but it would be much easier to handle this by pdf.

  116. Steve

    Mandy - regarding your question about showing people that the book is flippable, one technique I’ve used that I’ve found to be pretty good is to have the book flip from the last page to the first page really quickly when the book loads. This can be done by adding this to the last frame on the actions layer: gotoPage(pageOrder.length,true);

    Then remove the stop(); command and place it a few frames later, along with gotoPage(1);

    Regarding PDFs: they can’t be loaded dynamically. Flash is only able to dynamically load SWF, JPG, PNG, GIF and MP3 files I believe.

  117. alvin yeung

    hey steve. did you get a chance to take a look at my post?
    sorry i’m just curious about the issue.

  118. n8

    yo steve i want to thank you gor opening this source up to us!.
    you’ve helped me out a lot. i can’t wait to get into the dynamic video, it’s going to be fun!

    for now i’m just trying to use your engine for an online comicbook. i seen this engine or something like it on other comic related sites. i’m trying to get the pages to go as big as they can.

    the pages need to be 524 x 800 so people can read the text.

    i seem to have broken the mask as you can see at http://www.urbanrevolution.us/comics/ … i’ve trid everything i can think of to fix this and i’m at a loss….

    if you have the time i would love some input on how to resolve this masking mouse over effect.. i’m no guru but i’m trying to learn…

    again thanks for supporting the community..

    cheers
    -n8
    http://www.urbanrevolution.us

  119. Steve

    Hey n8 - I’m having a bit of hard time troubleshooting the problem you’re describing. I don’t see any pages, just an empty book. Is that just me?

  120. Steve

    Hi,

    Can anyone point me where to change, so that I can add more pages? which frame and line to go, to activate more pages in this movie? i was able to add pages in the xml file, but it doesn’t show in the movie. The movie still shows 13 pages loaded.

    Please email me directly at
    steve@k9designco.com

    Appreciate any help thanks!

    btw, Thanks Steve for this code, using the xml is easier to update the pages. I just need few more changes. =)

  121. Co

    Hey Steve, I truly appreciate the code and your contribution to the public. I’ve had your code for a few months now and have been implementing it to my site. It has been fun. But I too am anticipating the work around for the amount of cpu usage of all the pages loading.

    I’ve been playing around with the code a little bit but is it possible to have more than one xml file? Maybe the xml loads 12 page increments and unloads the previous xml+pages? So theoretically it would be like sectioning off the xml files by 12 pages.

    Not sure if this is possble with your code.

  122. Co

    Has anyone figured out how to place shadows behind the pages once they are spread. The “spine” shadow is possible to do when book is closed or open. But getting shadows behind the edge of the pages once spread seems tricky.

    Any help would be welcomed. Thanks.

  123. Steve

    Thanks Steve for the tips. Though I need one again.

    I created some button link in my movie and works perfect. But the problem is the top page is affected by the next page with a button link. Example is the cover, when you point your mouse to the blue circle, that part gets an active link, where the active link should only be on the page behind it. I tried playing around with the transparency, but doesn’t help. it makes the other pages disappear. You can check the current test at http://www.k9designco.com/sample/flipbook.html

    Thanks in advance.

    Steve,

  124. alvin yeung

    steve! you pimped up/out Ip’s pageflip. nice job!

    i got a million and one problems as usual,
    but specifically with this piece code…

    has anyone else run into problems loading multiple spreads?
    i checked the bandwidth profiler when you simulate the download in flash,

    it preloads the spreads multiplied by 4…so lets say i have a 98kb spread…it’s actually mulitplied by 4 so it takes 4 times as long for something to normally load…

    the preload problem has been mentioned a few times previously…

    just wondering if anyone has found a workaround for this?

    also;

    has anyone else tried to load this portfolio/pageflipper into another movie acting as an external swf?

    thanks!
    nice job steve

  125. Erwin

    hi Steve, Thanks again for the great source.

    But Ihave a problem, i put another file with xml which called by pages.xml, and i use command iSpread -> true. this file is foto gallery which using xml to call jpg picture. as a single file everything working perfect, but when i put this file on flipping page it is not working perfectly. i can’t called the big Image when i click the thumbnail image. Do u have any idea to solve my problem ? :)

    u can see the sample site in this link -> http://www.geocities.com/planeterwin

    the source for the foto gallery is -> http://www.geocities.com/planeterwin/source/gallery.zip

    Thanks

  126. erwin

    ic…. because the left flip page can not communicate with the right flip page :)

  127. Steve

    This site has different preloader. It doesn’t load the whole magazine. It loads each page when you flip it.
    http://www.skipressworld.com/us/en/onlinemagazine/0607/0607_US1/0607_us1.html

    Anyone can help me try figuring out how to do this in Steve’s script? Preload each page rather than loading all the page at once. I think that script is practical for 100 pages.

    email me please at steve@k9designco.com. Thanks in advance.

  128. Sasha

    Hello Steve. I saw that a few months ago you said you would post the code for adding the flipping sound for when the pages would turn. On Oct. 27, you said “Sound - if you’re referring to a sound that plays when pages are flipped, that’s really not too difficult to add. I don’t have the source files in front of me, but I will post a note on where that should be inserted into the actionscript.” I have looked through the posts and don’t see the code. If I missed it, I apologize.

  129. FredrikAT

    Hi,

    Can anyone help me with a zoom function? I was thinking about adding a large image (width of page multiplied with 2) in the xml or something. I want to display this on top of the pages with scroller. Something like http://www.eyemag.se

    Can anyone help me? Someone have a solution already?

    Email me please at ftakle [[ at ]] gopublish.com

  130. FredrikAT

    The e-mail above is not correct, sorry.
    This one is: ftakle [[ at ]] go-publish.com

  131. Steve

    Sasha - sorry, I totally forgot to dig up that info. Here it is now - if you’d like to insert a sound when a page is flipping, you would add it here:

    - On frame 9 of the “actions” layer, find the function for “mousecontroll.onMouseDown”
    - At the very end of the function (line 138 for me) there’s a line commented out to adjust the movie’s quality. Add the command to attach the sound right under that line.

  132. Don

    Hi,
    Has anybody figured out the CPU load problem?
    I’ve just closed the page down after 6 minutes of processor at 100%. This is not an acceptable delay for any use of the app.

    you can email me at don -at— techno —dot co –dot za

    Thanks

    Don

  133. Eric

    Hello

    Mike, could you explain where to put this code exactly ?
    gotoPage(pageOrder.length,true);
    where to put
    gotoPage(1,false); and stop(); in order top have a book which turn the pages from the end at the loads.

    Please please pleeeeaaaaaase

    Eric

  134. urash

    Hi.
    I have an question. If I want to integrate another flash into this project it gives me an weird error when I try to import flash.geom.Point Class (syntax error it says but if I try it in a new project it works). Also if I place a loader component into the stage it won’t load anything. Could anyone help me out?

  135. Sasha

    Thanks for the tip on how to add sound.

  136. Rodrigo

    Hi there Steve, really a great job with the code… My doubt it´s about the loading scheme… On Internet Explorer take to long to finish and start the animation. It get stucked at the last page and take a long, very long time to start… I was wondering do something like this:
    http://www.skipressworld.com/us/en/onlinemagazine/0607/0607_US1/0607_us1.html
    I hould like to put a loading just like that….
    But I’m a litle stuck… I have tried to put an preloading on each swf that’s called from xml and didn’t work… How can I do this?
    Thank you in advance!
    Best regards,
    Rodrigo

  137. Po

    Hi Steve,

    I have a bit of a problem - the script works fine for me, the only thing is, that I would like the pages to load in pairs (not all at once in the background) - like when you flip to pages 3+4, the next 2 pages are loaded.
    I’ve tried to change the script, but I just can’t get the whole thing to work - frankly, I don’t completely understand that script.

    Is there any way to do this? Could you please help me with this?

    Thanks,

    Po

  138. melancomique

    Hello,

    Congratulations for your product. I would like to know if it’s possible to to change the size of the flip book ?. In the exemple, each pages make 300×400. Which elements in the “fla” must be change to make a book in 500×600 for each pages ?.
    Thanks for your attention.
    Sorry for my english

    Melancomique

  139. Micky

    Hi Steve,

    Im loading swf instead of jpg, so that i can put my own zoom functions inside each page, which works great.

    However, when I load a spread and want to zoom the spread, it only loads the zoom mc into the left page. is there a way you know of to extend the width of the movie clip which holds the image for spreads only?

  140. Micky

    Follow-up to that earlier post..

    Steve, i’ve done it! Woohoo!!

    Check it out: http://kinkdesign.com.au/clients/eye/

    Still tinkering with a few things and adding more pages etc.

    The only thing that I would like now, is to have the preloader work for swf spreads…………….

  141. Steve

    Urash - Since I didn’t write the bulk of the code myself, I can’t really help you out finding the part of code that’s causing those classes to fail. I know that I ran into a couple of problems using AS2 classes with Macc’s code.

    Po - that’s something that a lot of people have been asking for in one way or another. Basically have the book just load a few pages ahead at all times. It’s actually a pretty tricky feature to add when you have to account for people using the gotoPage() function to quickly flip from one of a book to another. I’m still thinking of the best way to implement that.

    Melancomique - you can set the page width and height in the XML file. That was the whole idea of building it this way - so people wouldn’t have to muck around in an unfamiliar FLA. See the readme file.

  142. Co

    Hey Steve, I have a question regarding the actual code in the xml file. I believe it allows us to change a page from being “pre-loaded”.

    Am I right to think that this should keep the pages from loading until flipped to?

    I have been trying both options but do not see much a difference in the pages loading any differently. Not sure if I am editing it properly.

    Please help.

  143. Co

    - Rodrigo -

    My guess would be is that on that site, each page is an .swf and once that page is opened it “loads” a movie onto stage but does not “unload” it when flipping a new page. I have had no luck in figuring out if the XML code settings for preloading actually work or how it needs to be stated in the file.

    I wish it would or could work in that manner of each swf loading movies onto stages. As I have no real use for a “gotoPage” menu.

  144. Co

    Okay, I too am noticing the same problems with the Flip Page not loading/stalling on IE. Any Ideas?

  145. Jot

    I wondered if the image quality would be better with bitmap.draw(mc) .. with the smoothing tag on.. i tried to implement it ..but it doesent seem to work.

  146. Steve

    Co - as I’ve mentioned before (you’re forgiven for not sifting through every single comment above) the preloading feature in the XML is pretty unsophisticated. Basically, setting something to preload=true means that the book won’t start until that page is loaded. Any page that’s not set to preload=true will load at its own pace (and yes, they’re all loaded in one big chunk at the beginning).

    I know it’s not the best system, but it met the requirements for the project I used this for. I definitely plan to improve how pages are loaded/unloaded in the future. For now I’m afraid it’s a limitation.

    Jot - that’s a good point. I should check that out… the jagged bitmaps of rotating pages has always annoyed me.

  147. Co

    Thanks Steve, sorry if I may have seemed ambiguous towards any previous post. I thought I had read each one. I may have overlooked some or even the actual subjects. Either way, thanks again and can’t wait until a future release!

  148. Thrane

    Hi Steve
    Greate work with the page flip. I have a question though…like everyone else. I want to be able to send text to a page from outside flash using flash.external.ExternalInterface. I can send text from flash into my application, but i cant seem to send it the other way. It is only a problem when i use your page flip…the .swf works fine alone aka. it can recive data from the application. I hope you can help me slove this problem.

  149. Thrane

    update: if i turn page, and turn back again the text i send is displayed shortly, and then disapears…how to i make it stay there, and how do i get it to show the text when it recives it? I hope you can help me out :-)

  150. Steve

    Thrane - I can’t really comment on your specific problem since it would depend on how you set things up, but you should keep in mind that whatever method you’re using to import data into the SWF it will have to work if multiple instances of the same SWF are loaded by a parent movie clip. Basically, the technique I’m using to allow dynamic content to appear in the pages without any flickering/hiccups as pages are loaded and unloaded is by having 4 (or 6 if you’re using page transparency) instances of each page loaded in at runtime. Instances are then hidden and displayed as required so that flipping is seamless. From your description, it sounds like one of the instances is loading in the content but the rest are not. If you’d like to test it out, create a test FLA with a few empty movie clips in it. Then load your SWF into each empty movie clip so that you have a few instances of it on the stage. If the content shows up in each instance then it should work in the page flip.

  151. Steve

    Co - no worries. I know there’s a lot of comments here and I really don’t expect everybody to read every single one before asking a question… but that would be nice ;)

  152. Gnjörken

    Is it possible to add tabs on the side of some sites? the tabs must must flip with the site.

  153. Thrane

    Thx Steve ill try that. The way i have solved it now is to save my data into an xml file, and then load this file into the SWF, it seems to work ok, it does however sometimes tair the page…the text is visible on the other page if you flip the page really slow. Ill try your approach and see if that works better for me.
    BTW this is by far the best page flip, avalible on the net…Great work.

  154. Raffal

    So, i have one BIG problem with oryginal Macc’s and your both scripts. When i prepare SWF with flippage and i use Loader to attac to my main SWF it doesn’t work :(. don’t flip page i thing its mayby with object _root.pages location when i use Loader.

  155. alvin yeung

    hey steve,

    i double posted near nov 19th because i wasn’t getting a response.
    do you mind taking look at my questions?
    i’m just curious how to go about those spread problems and preload issues…
    i know they’ve been mentioned above before…
    but i haven’t found a starting place to work a workaround.

  156. Neil

    Hi Steve,

    Great job! I have looked through the history but haven’t found any mention of this. I was wondering if there is an easy way to display a ‘loading’ message or movieclip on the actual pages that haven’t completed loading yet? I am using preloading for the first few pages of the album but if the user turns the pages too quickly then some pages will be blank because they haven’t loaded yet.
    Many thanks,

    Neil

  157. Micky

    anyone worked out how to preload multiple swf spreads???

  158. Steve

    Hey Neil - that’s something you have to add to each individual page SWF. If you need help creating a preloader, there’s tonnes of tutorials online. Grant Skinner has a good one: http://www.gskinner.com/blog/archives/000104.html

  159. Tawnos

    Does any one have a tutorial or some help on how to add a zoom feature to this?

  160. Jani

    Greetings all.
    Steve, this is a great adaptation and improvement. I have playyed around with it at found it very useful. But (inevitably) I have a question.
    I am using swf files as pages because I am resizing jpegs (using mx.loader component) in order to use flash player built-in zoom for readibily). Here I come across a problem.
    When I run the your page flip file , the swfs are transparent. I noticed that happens when I use the loader component. If I put the jpeg in on the stage when everything is ok.
    So: is there anything I can change in the code to make pages visible OR is there another way to resize external jpegs without the loade component.

    Thanx

  161. Jani

    HI again.
    Just to follow up. I kinda managed to solve this transparency issue. Up tillnow all the pages have been in the “pages” subfolder. Now I put the jpeg files in the same folder with the main swf (the viewer) where as I left the invididual swfs (separate pages) in the “pages”subfolder (as it is stated in the xml file). The strange thing here is that the content.path in each page swf states/demands that the jpeg is in the same folder as the swf is.
    Any ideas???

    Well, this doesnt really help me very much, since I would like to have pages separated from the main viewer.

    This is how i load jpeg in the loader component on the stage

    page.contentPath = “page1.jpg”;
    //Scaling Features
    page.scaleContent = true;

  162. Mark Ross

    Hi Steve:

    Thanks again for the awesome code… I have a newbie question. I’ve loaded SWF’s as pages and then I use buttons on the pages to load another SWF that “floats” on top of the page on another level — kinda like a Post-It note. How can I disable the page/corner interaction and flipping mechanism going on underneath while I have this new, floating object open? Thanks!

  163. Mark Ross

    OK, after delving into things a bit, perhaps a better question might be, “How can I pause/stop the mouse listener temporarily while I have a floating layer appear above a pge?”

  164. Francesco

    Hi Steve,thank you for the script,you are a genious!

    I’ve got some troubles with images @ 760*500, I can’t see the corners to flip pages and I don’t know why. I changed the xml as you explained but it doesn’t work properly, thank you in advance!

  165. Jerry

    @Micky

    I love the additions you made on http://kinkdesign.com.au/clients/eye/. Do you mind sharing how you have done it?

  166. Ryan

    I have a problem or two.
    I’ve got the pages loading dynamically via XML, then I have a zoom function in place. My two problems: I need to load a high resolution version of the page into an invisible mc, turn it visible, and scrollable…but I haven’t quite figured this out.
    I have created a tween scale for the page to zoom in, but it doesn’t work:

    var twXscale:Tween = new Tween(pages, “_xscale”, mx.transitions.easing.Regular.easeOut, pages._xscale, goXscale, 1, true);

    that works in another flash file without the page-flip script in it, but not in this file…also I add:
    import mx.transitions.Tween;
    import mx.transitions.easing.*;

    and when I test, it gets me an error:
    **Error** Scene=Scene 1, layer=zoombutton, frame=8:Line 25: Syntax error.
    import mx.transitions.Tween;

    **Error** Scene=Scene 1, layer=zoombutton, frame=8:Line 26: Syntax error.
    import mx.transitions.easing.*;

    I can put the import mx.transitions.Tween anywhere in any actionscript layer or script and it still gives me the error.

    Any ideas?

  167. Ryan

    Another note, import mx.transitions.Tween WORKS fine in the Macc/iparigrafika version (not dynamic). So I think there is something interfering with the tween in the dynamic version.

  168. meur

    steve,

    I’ve tried to reed most of the topics but I can’t find the solution to my problem. When you load the pageflip into another swf and it is loaded again it doesn’t work anymore.
    When you simply export it in flash and pres ctrl-enter again it does the same thing. The pages don’t flip anymore.
    Any id why?

  169. myy

    Hi !

    thank you so much for this wonderful script.i’m currently a college student who needs this to do my final year project. However,being a flash beginner,i’m having some problems working around it.

    1) How do you do a permanent background with only the pages flipping ? (notebook cover bg with white pages flipping.)

    2) How do you add multiple video clips inside and have it zoom out and play at click instead of auto-play ?

    3) How do you put in a blog-quiz like function within the page,be it html or flash ? (ie bullet choices answers etc.)

    Hope you’ll be able to help me with the source references,or anyone good at flash !! Thank you so much !

    myydesign@gmail.com

  170. Moises

    take a look at this, http://www.rootmagazine.org

    i want to insert a video and use controls like stop or play for it, in root magazine the videos in a page appear stopped, and when you click in play video it starts, but icant do that, i hope you could do it!!!!

  171. Jules

    Hey Steve,

    Just a follow up to Meurs comment above…..

    I’m a newbie to flash too…. excuses excuses I know, but this is driving my nut.

    I am trying to load pageflip into a swf using MovieClipLoader into another MC instance in my main movie, & it works a treat the first time round, but if I unload it, then re-load it again, it flipping stops! Ha. Everytime you go to flip a page, subsequently, it falters & wont work.

    Is this to do with the mouseListener? or am I just being thick?

    How do I go about rectifying it? Feel free to patronise away…. if have no clue….

    You’re help would be great…. as is your page flipping movie! :o)

  172. Francesco

    hi steve,I have a problem…for example, when I’m to the page 3(where there is an swf) and I turn back to page 2 the swf is reloaded for a while;in other words, I see the first frame of my swf when I turn back to page 2 (or I step forward to page 3)

  173. Ilya

    Hello, Steve! Thanks for your work.
    One Q: How i can use multiply flip books in one Scene? Is this possible?

  174. Steve Palmer

    Ilya - that gets a little tricky since they’d both be using the same mouse listener to fire the page turning events. I haven’t done this myself, but I would suspect that you’d have to create a 2nd listener for the other flip book so that they could exist independently. It’s probably not as simple as that… but I think that’s a start.

  175. Steve Palmer

    Apologies for falling behind a bit, but to the few people who have asked about why the page flip breaks when you import it into another SWF, I haven’t had any problems doing that myself in the past. Here’s how I’ve done it before:

    pageflip = createEmptyMovieClip("pageflip",1);
    pageflip.loadMovie("pageflip_v213_dynamic_smart.swf");

    I suspect that the problem might be happening when people try to import it from another folder location. Remember - the location of the XML file, the pages themselves and the page flip SWF file all have to be taken into consideration. The location of the XML file is passed in via the HTML as a variable called “xmlFile”. You must keep in mind that the location of the XML file and the pages is always relative to the location of the HTML file that is embedding the SWF, not the SWF itself. I hope that helps everybody.

  176. Denis