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. 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? Please let me know asap.
    Thanks

  2. Ben says:

    I’m getting errors when I try to add a button that sends you to another swf after the last page flip. The button is on the background and I have no clue why it won’t work. If anyone knows how to do this it would be greatly appreciated.

  3. Ty Taylor says:

    Dude…

    you’re a Rockastar! Sick script! works like a charm!

  4. GREAT!!! THNX for everything!!! i had no problems with the tutorials and thank you for the code

  5. Thomas says:

    Will the file be able to publish without modification? I can’t seem to get it to work either way.

  6. suresh says:

    Hello,
    Can some let me know how can I reduce the page numbers from this book? I need only 2 pages in the book… I have tried with changing the “maxPages” variable….but I could not get the expected results…
    You help would be appriciated

  7. Ico says:

    I just have one more “issue” to sort out. I would like to export this as a movie. The idea is to use the Pageflip as a animated presentation where you don’t need to flick the pages with the mouse, it goes automatically like a movie and then I might continue the presentation with others little animations.
    Is it possible? I’m trying to export as quicktime but it won’t let me do it.
    Is it possible in the new version?

  8. Firstly, a big thank you for this file – it’s awesome!
    I have followed it all to the letter, but I must have done something wrong 🙁

    I added extra pages up to 10 and it all worked ok, then after I added the rest and test the movie, after about 10 seconds the book disappears out of the SWF test window.

    Also, for some reason, even though I have been really careful about the sizing of the files and images and bounding boxes, my book is being stretched too wide and is up and over to the left

    Any ideas you can offer would be so very welcome

    Jacquie x

  9. connie says:

    I noticed that the pages are smaller than the movie. I would like to make a page flip that is 1224 x 792 from a printed catalog that is 8.5″ x 11″. Is it necessary to have additional space around the pages and if so how much?

  10. Brandon says:

    Awesome software. I tried all of your solutions to solving the ‘with’ action problem and none of them worked. Finally I went back to the first page instance (the only one i had used from the original downloaded file) and noticed it had an INSTANCE NAME of “page 1”. Maybe you should put that in your explanation of solving the problem. Turns out it still didn’t solve my problem anyway 🙁

  11. Antonio Braga says:

    Thanks for you great work

    How i put a button in “page1” to link “page8”?
    Can you help-me? if it possible send me a email

    Thank you

  12. Ico says:

    I’ve just followed all the steps and this error continue:
    “Error: A ‘with’ action failed because the specified object did not exist.”
    I’ve also checked and duple checked the settings a couple of times. Do you know what else could be wrong?
    BTW, I’m using the CS4 version.
    Thank you!

    • Pixelwit says:

      Hello Ico,

      Here are the most common reasons for the “with action” error:

      1. Misnamed print clip. (Creating a Page: #2 & #5)
      2. Print clip not exported. (Creating a Page: #4)
      3. Print clip not added to main timeline. (Adding a Page: whole section)
      4. Actions frame not properly relocated. (Adjusting the File: #1)

      Triple-check those and see if your luck improves. 😉

      The “with action” error means that the book is looking for “print9” but it can’t be found either because the clip wasn’t exported (reasons 1-3) or because it hasn’t been loaded (reason 4).

      • Ico says:

        Thank you very much! It worked!! 🙂

        I just have one more “issue” to sort out. I would like to export this as a movie. The idea is to use the Pageflip as a animated presentation where you don’t need to flick the pages with the mouse, it goes automatically like a movie and then I might continue the presentation with others little animations.
        Is it possible? I’m trying to export as quicktime but it won’t let me do it.

        Thanks again for your attention. You have developed a nice piece of software and most importantly you have shared with us. You are definitely helping a lot of people like me!

        Regards

  13. Melvyn says:

    How to make pages interactive to each other

    Dear fellows,

    I need help, which maybe you guys can share to me with this? Could somebody tell me how to, let’s say when I click on an item or a picture in an flash flip page (i.e. on page 2) and then it turn up to other page (which i.e. page 5) cause all about that item is in page 5. Could you tell me, how could I make that work.

    Before and after I thank you,

    God bless

  14. […] third step where you make new pages for the second book. You’ll basically need to follow the Adding Pages tutorial until you get to the 2nd step of the “Creating a Page” section. At that point […]

  15. Roel Moser says:

    When i try to add a 10th page, and test it, i get the following error:

    Error: A ‘with’ action failed because the specified object did not exist.

    the print is called print10. Thats ok right?

    • Tom says:

      I had the same problem and I figured out I was naming the 9th page movie clip “print9” rather than “Print9” (capitalized P)

      Thanks Pixelwit, this is great and your tutorials are detailed and well explained, love it!

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