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.
- Open the PageFlip file.
- Click on frame #11 of the Pages layer.
- 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.
- Once you are editing the Bound Pages clip, select the first frame of the Actions layer.
- Open the Actions Panel (Menu»Window»Actions).
- Go to line #29 in the Actions panel to locate the “maxPages” variable.
- 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.
- Open the “Create New Symbol” window. (Menu»Insert»NewSymbol).
- Name the new symbol “print” (all lower case) followed by a page number. For example page #9 would be named “print9”.
- Make sure the symbol’s “Type” is set to “MovieClip”.
- Check the “Export for ActionScript” box.
- Make sure the Identifier is “print” followed by the proper page number (should be automatic).
- Un-check the “Export in first frame” box.
- Click “OK” to close the “Create New Symbol” window and begin editing the new movieclip.
- Drag an instance of the “Page Guide Outline” graphic from the Library onto the Stage of your new Print clip.
- Center the Page Guide Outline in the exact middle of the stage.
- Add your page content to the movieclip while keeping everything within the Page Guide Outline
Adding a page:
- Go to the root/main timeline.
- Create a new blank keyframe at the end of the “Prints” layer. (Right-click the keyframe in the timeline and choose “insert blank keyframe”.)
- Select the new keyframe.
- 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.
- 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.
- Drag the last keyframe of the Actions layer to the right, one frame beyond the last keyframe in the Prints layer.
- 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”.)
- Insert a new frame in the “Background” layer under the last frame in the Actions layer.
- Insert a new frame in the “Load Status” layer one frame before the last frame in the Actions layer.
- Repeat for any other layers containing graphic content.
- 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.
Improved PageFlip Now Available: Improved PageFlip implements the most commonly requested features.
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
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.
Dude…
you’re a Rockastar! Sick script! works like a charm!
GREAT!!! THNX for everything!!! i had no problems with the tutorials and thank you for the code
Will the file be able to publish without modification? I can’t seem to get it to work either way.
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
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?
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
Hi Jacquie, with your book disappearing, it sounds like you may have missed something in the “Adjusting the File” section in the above tutorial. Here’s a link explaining how to reposition the book and resize the stage.
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?
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 🙁
Hi Brandon, What version of the file are you using, where did you get it? As far as I know, the file linked to at the top of this tutorial does not have any “Page #” names. Try working with that file and see if you have better luck.
Have you read this comment providing solutions to most “with” action problems?
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
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!
Hello Ico,
Here are the most common reasons for the “with action” error:
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).
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
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
[…] 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 […]
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?
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!