{"id":114,"date":"2007-07-25T04:01:23","date_gmt":"2007-07-25T09:01:23","guid":{"rendered":"http:\/\/www.pixelwit.com\/blog\/page-flip\/add-pages-to-pageflip\/"},"modified":"2011-06-10T23:52:39","modified_gmt":"2011-06-11T04:52:39","slug":"add-pages-to-pageflip","status":"publish","type":"page","link":"https:\/\/www.pixelwit.com\/blog\/page-flip\/add-pages-to-pageflip\/","title":{"rendered":"Add Pages to Flash Page Flip (PageFlip)"},"content":{"rendered":"<p>&#8220;How to add more pages&#8221; is the most common topic found at the <a title=\"Page Flip Effect Tech Questions\" href=\"https:\/\/www.pixelwit.com\/blog\/page-flip\/page-flip-help\/\">PageFlip Help<\/a> page.  If you&#8217;d like to know how to add a page or why you keep getting an error saying, &#8220;<em>A &#8216;with&#8217; action failed because the specified object did not exist<\/em>&#8221; then this Tutorial is what you&#8217;re looking for.<\/p>\n<p><a href=\"https:\/\/www.pixelwit.com\/blog\/page-flip\/add-pages-to-pageflip\/adding-pages-walkthrough\/\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.pixelwit.com\/blog\/wp-content\/uploads\/2011\/06\/walkthrough.png\" alt=\"\" title=\"Click to Watch a Video Walkthrough of this PageFlip Tutorial\" width=\"196\" height=\"52\" class=\"alignleft size-full wp-image-1255\" style=\"border:0; padding:0; margin:6px 10px 0 0\" \/><\/a> You can watch a <a title=\"Detailed Step by Step PageFlip Instructions\" href=\"https:\/\/www.pixelwit.com\/blog\/page-flip\/add-pages-to-pageflip\/adding-pages-walkthrough\/\">video walk-through<\/a> illustrating every detail of this &#8220;Adding Pages&#8221; tutorial.<\/p>\n<p>To be sure we&#8217;re working with the same file and code, download the <a title=\"Flash PageFlip Source Code\" href=\"https:\/\/www.pixelwit.com\/blog\/wp-content\/uploads\/2007\/09\/pageflip_notypos.zip\">Page Flip Source File<\/a>.  Open it up and check it out.  This one FLA file is designed to be a self-contained page flip solution.  It contains a <!--more-->SWF Player version checker, a preloader, each page of the book and the code to make it all go.<\/p>\n<p><strong>Change &#8220;maxPages&#8221; variable:<\/strong> The first step in adding pages is to locate the main code block and change the &#8220;maxPages&#8221; variable.<\/p>\n<ol>\n<li>Open the PageFlip file.<\/li>\n<li>Click on frame #11 of the Pages layer.<\/li>\n<li>The small cross highlighted in the center of the stage is an instance of the &#8220;Bound Pages&#8221; movieclip named &#8220;Pages&#8221;.  Double-click it to begin editing it.<\/li>\n<li>Once you are editing the Bound Pages clip, select the first frame of the Actions layer.<\/li>\n<li>Open the Actions Panel (Menu\u00bbWindow\u00bbActions).<\/li>\n<li>Go to line #29 in the Actions panel to locate the &#8220;maxPages&#8221; variable.<\/li>\n<li>Change the &#8220;maxPages&#8221; 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.<\/li>\n<\/ol>\n<p>As far as modifying code goes, that&#8217;s all you needed to do, now it&#8217;s a matter of creating your new pages and adding them to the FLA file.<\/p>\n<p><strong>Creating a page:<\/strong> You need to make sure you create a Print movieclip for every page in your book, even the blank ones.<\/p>\n<ol>\n<li>Open the &#8220;Create New Symbol&#8221; window. (Menu\u00bbInsert\u00bbNewSymbol).<\/li>\n<li>Name the new symbol &#8220;print&#8221; (all lower case) followed by a page number.  For example page #9 would be named &#8220;print9&#8221;.<\/li>\n<li>Make sure the symbol&#8217;s &#8220;Type&#8221; is set to &#8220;MovieClip&#8221;.<\/li>\n<li>Check the &#8220;Export for ActionScript&#8221; box.<\/li>\n<li>Make sure the Identifier is &#8220;print&#8221; followed by the proper page number (should be automatic).<\/li>\n<li>Un-check the &#8220;Export in first frame&#8221; box.<\/li>\n<li>Click &#8220;OK&#8221; to close the &#8220;Create New Symbol&#8221; window and begin editing the new movieclip.<\/li>\n<li>Drag an instance of the &#8220;Page Guide Outline&#8221; graphic from the Library onto the Stage of your new Print clip.<\/li>\n<li>Center the Page Guide Outline in the exact middle of the stage.<\/li>\n<li>Add your page content to the movieclip while keeping everything within the Page Guide Outline<\/li>\n<\/ol>\n<p><strong>Adding a page:<\/strong><\/p>\n<ol>\n<li>Go to the root\/main timeline.<\/li>\n<li>Create a new blank keyframe at the end of the &#8220;Prints&#8221; layer.  (Right-click the keyframe in the timeline and choose &#8220;insert blank keyframe&#8221;.)<\/li>\n<li>Select the new keyframe.<\/li>\n<li>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.<\/li>\n<li>Repeat steps 2, 3 and 4 for each new page.  You must have a &#8220;Print&#8221; movieclip for every page in your book.<\/li>\n<\/ol>\n<p><strong>Adjusting the file to accommodate the new pages:<\/strong><br \/>\nThe basic goal is to extend the length of all layers with content by adding one more frame to them.<\/p>\n<ol>\n<li>Drag the last keyframe of the Actions layer to the right, one frame beyond the last keyframe in the Prints layer.<\/li>\n<li>Insert a new frame in the &#8220;Pages&#8221; layer under the last frame in the Actions layer.  (Right-click the keyframe in the timeline and choose &#8220;insert frame&#8221;.)<\/li>\n<li>Insert a new frame in the &#8220;Background&#8221; layer under the last frame in the Actions layer.<\/li>\n<li>Insert a new frame in the &#8220;Load Status&#8221; layer <strong>one frame before<\/strong> the last frame in the Actions layer.<\/li>\n<li>Repeat for any other layers containing graphic content.<\/li>\n<li>Test the movie.<\/li>\n<\/ol>\n<p>If you will be loading the entire &#8220;PageFlip.swf&#8221; file with an external preloader you can skip step #6 in the &#8220;Creating a page&#8221; section which will ensure the Print clip is exported in the first frame of your SWF file. You can also skip the &#8220;Adding a page&#8221; and &#8220;Adjusting the file&#8221; sections completely.<\/p>\n<p>Leave a comment if you have any questions.<\/p>\n<p><img decoding=\"async\" style=\"border: 0pt none ; margin: 0pt 0pt -2pt -5pt; padding: 0pt;\" src=\"https:\/\/www.pixelwit.com\/blog\/wp-content\/uploads\/2008\/03\/newstar_01.png\" alt=\"NEW! Star\" \/><strong>Improved PageFlip Now Available<\/strong>: Improved PageFlip implements the <a title=\"PixelWit's Improved PageFlip\" href=\"https:\/\/www.pixelwit.com\/blog\/page-flip\/improved-pageflip\/\">most commonly requested features<\/a>.<\/p>\n<p><script type=\"text\/javascript\"><!--\ngoogle_ad_client = \"pub-6849630434690366\";\ngoogle_ad_width = 468;\ngoogle_ad_height = 60;\ngoogle_ad_format = \"468x60_as\";\ngoogle_ad_type = \"text\";\n\/\/2007-07-30: DirectInline\ngoogle_ad_channel = \"6157459090\";\ngoogle_color_border = \"FFFFFF\";\ngoogle_color_bg = \"FFFFFF\";\ngoogle_color_link = \"4A4E15\";\ngoogle_color_text = \"6A6F2C\";\ngoogle_color_url = \"9CA163\";\n\/\/--><\/script><br \/>\n<script src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\" type=\"text\/javascript\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;How to add more pages&#8221; is the most common topic found at the PageFlip Help page. If you&#8217;d like to know how to add a page or why you keep getting an error saying, &#8220;A &#8216;with&#8217; action failed because the specified object did not exist&#8221; then this Tutorial is what you&#8217;re looking for. You can [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":26,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"ngg_post_thumbnail":0,"footnotes":""},"class_list":["post-114","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/pages\/114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/comments?post=114"}],"version-history":[{"count":0,"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/pages\/114\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/pages\/26"}],"wp:attachment":[{"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/media?parent=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}