Add Pages to Flash Page Flip (PageFlip)

“How to add more pages” is the most common topic found at the PageFlip Help page. If you’d like to know how to add a page or why you keep getting an error saying, “A ‘with’ action failed because the specified object did not exist” then this Tutorial is what you’re looking for.

You can watch a video walk-through illustrating every detail of this “Adding Pages” tutorial.

To be sure we’re working with the same file and code, download the Page Flip Source File. Open it up and check it out. This one FLA file is designed to be a self-contained page flip solution. It contains a SWF Player version checker, a preloader, each page of the book and the code to make it all go.

Change “maxPages” variable: The first step in adding pages is to locate the main code block and change the “maxPages” variable.

  1. Open the PageFlip file.
  2. Click on frame #11 of the Pages layer.
  3. The small cross highlighted in the center of the stage is an instance of the “Bound Pages” movieclip named “Pages”. Double-click it to begin editing it.
  4. Once you are editing the Bound Pages clip, select the first frame of the Actions layer.
  5. Open the Actions Panel (Menu»Window»Actions).
  6. Go to line #29 in the Actions panel to locate the “maxPages” variable.
  7. Change the “maxPages” variable to the number of pages you want your book to have. Be sure to use an even number or else very bad things will happen.

As far as modifying code goes, that’s all you needed to do, now it’s a matter of creating your new pages and adding them to the FLA file.

Creating a page: You need to make sure you create a Print movieclip for every page in your book, even the blank ones.

  1. Open the “Create New Symbol” window. (Menu»Insert»NewSymbol).
  2. Name the new symbol “print” (all lower case) followed by a page number. For example page #9 would be named “print9”.
  3. Make sure the symbol’s “Type” is set to “MovieClip”.
  4. Check the “Export for ActionScript” box.
  5. Make sure the Identifier is “print” followed by the proper page number (should be automatic).
  6. Un-check the “Export in first frame” box.
  7. Click “OK” to close the “Create New Symbol” window and begin editing the new movieclip.
  8. Drag an instance of the “Page Guide Outline” graphic from the Library onto the Stage of your new Print clip.
  9. Center the Page Guide Outline in the exact middle of the stage.
  10. Add your page content to the movieclip while keeping everything within the Page Guide Outline

Adding a page:

  1. Go to the root/main timeline.
  2. Create a new blank keyframe at the end of the “Prints” layer. (Right-click the keyframe in the timeline and choose “insert blank keyframe”.)
  3. Select the new keyframe.
  4. Drag the new page movieclip (e.g. Print9 etc.) from the Library onto the stage. Make sure the movieclip lands in the last keyframe of the Prints layer that you created 2 steps ago.
  5. Repeat steps 2, 3 and 4 for each new page. You must have a “Print” movieclip for every page in your book.

Adjusting the file to accommodate the new pages:
The basic goal is to extend the length of all layers with content by adding one more frame to them.

  1. Drag the last keyframe of the Actions layer to the right, one frame beyond the last keyframe in the Prints layer.
  2. Insert a new frame in the “Pages” layer under the last frame in the Actions layer. (Right-click the keyframe in the timeline and choose “insert frame”.)
  3. Insert a new frame in the “Background” layer under the last frame in the Actions layer.
  4. Insert a new frame in the “Load Status” layer one frame before the last frame in the Actions layer.
  5. Repeat for any other layers containing graphic content.
  6. Test the movie.

If you will be loading the entire “PageFlip.swf” file with an external preloader you can skip step #6 in the “Creating a page” section which will ensure the Print clip is exported in the first frame of your SWF file. You can also skip the “Adding a page” and “Adjusting the file” sections completely.

Leave a comment if you have any questions.

NEW! StarImproved PageFlip Now Available: Improved PageFlip implements the most commonly requested features.


159 Responses to “Add Pages to Flash Page Flip (PageFlip)”

  1. diwaker says:

    thanks sir,
    for this useful tutorial i am searching this from almost 3 month.

    thanks
    again

  2. Ds says:

    Thanks for the nicely explained on the tutorial…I get stuck in the first place but finally manage to solve the issue because i realized that i missed some steps given in the tutorial..my bad, of coz… 😀 keep up the good works…

    Thanks and regards,
    Ds

  3. JOSE ANTONIO ZODDA says:

    i found the place to change max page to “2” but dosen´t work… please help!!!!

  4. Sinduja says:

    Hi,

    Thank You so much for this. Your tutorials are detailed as well. I’ve tried everything, adding pages, resizing pages etc. And it all works perfectly.

    Thanks so much again,
    Regards,

    Sinduja

  5. MChamb4150 says:

    Hi – I am following the directions on the Add Pages to Flash Page Flip and I get to #8 under creating a page and can’t figure out what a page guide outline graphic is from the library. I am using flash CS. Thanks for your assistance.

    • Pixelwit says:

      The “Page Guide Outline” is a graphic symbol which can be found in the Library. To open the Library panel go to the Menu and choose Window and then choose Library. Once the Library Panel is open, open the “Book” and “Printed Pages” folders. Then you can drag the “Page Guide Outline” icon out of the Library and onto the stage.

  6. Rick says:

    Hello – I am using pageflip v2. In my book I created a button to link to a movieclip in a new layer in the main timeline. The button links to my movie…but I cannot return to pageflip without starting at the begining of my book. How can I link my button to open a page in pageflip v2

    I appreciate your help
    Rick

  7. Jess says:

    Hi PixelWit,

    I know this is a free thing so I am sorry to have to burden you with a problem, but I’m getting the “A ‘with’ action failed because the specified object did not exist” error even when I test the “PageFlip_NoTypos” file before I’ve made any edits to it.

    Could you shed any light on this? Many thanks.

  8. vincent says:

    when i add page then to export to swf the output will comeout error:”Error: A ‘with’ action failed because the specified object did not exist.”?

    • vincent says:

      hi,sorry ineed to correct myrequest when i add page then to export to swf, flip untill the page i add the output will comeout error:”Error: A ‘with’ action failed because the specified object did not exist.”what is the matter?

  9. Dominic says:

    To anyone capable of helping,

    I ran into a problem the other day when I realised that I forgot to add a page in the middle of the book, I tried selecting all the keyframes after where the missing page should go and then adding the missing page.. I preview and it shows as normal. Is there a simpler way of fixing this without having to recreate every single page after the missed out page again?

    thanks.

  10. Carl says:

    Hi. I purchased the improved page flip last year and have enjoyed using it so much. I would now like to try to add video content. Is this possible? Could I pay for this extra feature?
    Thanks, Carl, Liverpool,UK.

  11. Mr clever cloggs says:

    haha well firstly ur a noob at flash but the simple thing is ur codeing. have u imported all actionscripts in ur neccessary frames. check again it should be frames 1 and 12 or 11 right click the a on the timeline and scroll dwn to actions it should be there. check again n again i believe in you.

  12. Francois Baret says:

    Hello!
    I like your code.
    I use it to publish a book on line, but I have few problems. I succeed to increse the size of the pages as well as their number, but suddenly around 18 pages when I try to add 2 more the last pages become all RED, even some of the previous ones which were fine before.
    Do you know what’s going wrong? I am applying strictly the same procedure to add pages, it works fine to a point and then it goes crazy!
    Thanks for your help.
    Regards!

  13. Wichard1432 says:

    oh i figured out the solution. Its the buttons. It located in the library. Guys, Don’t forget to add the “Buttons” folder to your libraby if you want to paste it all to the New Document. It is very important. Thanks!

  14. Wichard1432 says:

    Dear pixelwit,

    When I opened the “pageflip_notyp” file, I copy and paste all the original frames and paste it in my new document. I checked the Identifier and the Linkage from the Symbol Properties, also the name of the page like for ex. Print1. And I also checked all the Export to Actionscript under the symbol properties. Still there’s an error appearances in the screen. Suddenly, why I test the moviem A ‘with’ action failed just showed up again. I can’t turn the page. Did I miss something? I’m using adobe flash cs3 to cs4. Please let me know asap.
    Thanks

Leave a Reply

PixelWit.com's Comment Guidelines


Warning: Undefined variable $user_ID in /home2/pixelwit/public_html/blog/wp-content/themes/fvariant2/comments.php on line 57

You must be logged in to post a comment.

© Sean O'Shell 2007-2024