{"id":294,"date":"2008-06-16T14:02:12","date_gmt":"2008-06-16T19:02:12","guid":{"rendered":"http:\/\/www.pixelwit.com\/blog\/?p=294"},"modified":"2011-06-11T10:59:21","modified_gmt":"2011-06-11T15:59:21","slug":"multiple-pageflip-books","status":"publish","type":"page","link":"https:\/\/www.pixelwit.com\/blog\/page-flip\/multiple-pageflip-books\/","title":{"rendered":"Multiple PageFlip Books in a File"},"content":{"rendered":"<p>Since a few people have asked me to help them add multiple PageFlip effects to a single Flash file I thought I&#8217;d write this tutorial just for them.<\/p>\n<p>As usual, I recommend downloading the latest version of the <a title=\"PixelWit's Free Flash Page Flipper\" href=\"https:\/\/www.pixelwit.com\/blog\/wp-content\/uploads\/2007\/09\/pageflip_notypos.zip\">Free Flash PageFlip File<\/a> to be sure we&#8217;re on the same <em>page<\/em> (so to speak).<!--more--><\/p>\n<p>There are three essential steps to setting everything up for multiple PageFlips.  Our first step will be to replace the literal string reference to &#8220;print&#8221; with a variable named &#8220;printID&#8221;.  The second step will show you how to specify different Linkage Identifiers for the content of each PageFlip.  The third and last step explains how to add new content to the Library so it can be accessed with the new Linkage Identifier.<\/p>\n<p><strong>Replace &#8220;print&#8221; with a variable:<\/strong><\/p>\n<ol>\n<li>Click on frame #11 of the &#8220;Pages&#8221; layer.<\/li>\n<li>Double-click the highlighted movieclip in the center of the stage to begin editing the Prints clip.<\/li>\n<li>Click on frame #1 of the Actions layer in the Pages movieclip.<\/li>\n<li>Open the Actions panel if it&#8217;s not already visible (Menu\u00bbWindow\u00bbActions).<\/li>\n<li>Click the magnifying glass icon in the top left corner of the Actions panel to access the &#8220;Find and Replace&#8221; feature.<\/li>\n<li>Type &#8220;print&#8221; (with quotes) in the Find field, type &#8220;printID&#8221; (without quotes) in the Replace field and make sure the &#8220;Match case&#8221; option is checked.  Your Find and Replace window should look something like this:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-295\" title=\"Proper Find and Replace Settings\" src=\"https:\/\/www.pixelwit.com\/blog\/wp-content\/uploads\/2008\/06\/replace-print-id.png\" alt=\"\" width=\"411\" height=\"153\" srcset=\"https:\/\/www.pixelwit.com\/blog\/wp-content\/uploads\/2008\/06\/replace-print-id.png 411w, https:\/\/www.pixelwit.com\/blog\/wp-content\/uploads\/2008\/06\/replace-print-id-300x111.png 300w\" sizes=\"auto, (max-width: 411px) 100vw, 411px\" \/><\/li>\n<li>Replace all 4 occurrences of (&#8220;print&#8221;) with (printID) and then close the Find &amp; Replace window.<\/li>\n<\/ol>\n<p>Once you&#8217;ve finished editing the Pages movieclip you need to return to the Main timeline (&#8220;Scene 1&#8221; or &#8220;_root&#8221;) by double-clicking a blank area on the stage or by clicking the &#8220;Scene 1&#8221; button in the Timeline panel.  Once you&#8217;re back to editing the main timeline you&#8217;re ready to take the second step.<\/p>\n<p><strong>Specify different Linkage Identifiers for each PageFlip:<\/strong><\/p>\n<ol>\n<li>Make sure the Actions panel is visible (Menu\u00bbWindow\u00bbActions).<\/li>\n<li>Click on frame #5 of the Pages layer in the Timeline panel.<\/li>\n<li>Left-click the highlighted Pages movieclip on the stage.<\/li>\n<li>The Actions panel now shows any code that is placed directly on the Pages movieclip but since there are no actions on the Pages clip the Actions panel should be blank.<\/li>\n<li>With the Pages clip still selected, paste the following block of code into the Actions panel:\n<div class=\"codecolorer-container actionscript default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><div class=\"actionscript codecolorer\"><span class=\"kw3\">onClipEvent<\/span> <span class=\"br0\">&#40;<\/span><span class=\"kw3\">load<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw3\">this<\/span>.<span class=\"me1\">printID<\/span> = <span class=\"st0\">&quot;print&quot;<\/span>;<br \/>\n<span class=\"br0\">&#125;<\/span><\/div><\/div>\n<\/li>\n<li>Now is a good time to test your movie and make sure everything still works.  If you get any errors something is amiss and you need to read the tutorial again being sure to follow ALL of the directions.  \ud83d\ude09<\/li>\n<li>Now duplicate the Pages clip by click-drag-releasing it while the Control (Command) key is pressed; or you can use (Menu\u00bbEdit\u00bbDuplicate).<\/li>\n<li>Select the newly duplicated &#8220;Pages&#8221; clip and rename it something like &#8220;Pages2&#8221;.<\/li>\n<li>Edit the actions for the new Pages2 clip by selecting it and viewing the Actions panel (Menu\u00bbWindow\u00bbActions).<\/li>\n<li>Change this line of code:\n<div class=\"codecolorer-container actionscript default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><div class=\"actionscript codecolorer\">&nbsp; &nbsp; <span class=\"kw3\">this<\/span>.<span class=\"me1\">printID<\/span> = <span class=\"st0\">&quot;print&quot;<\/span>;<\/div><\/div>\n<p>To this:<\/p>\n<div class=\"codecolorer-container actionscript default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><div class=\"actionscript codecolorer\">&nbsp; &nbsp; <span class=\"kw3\">this<\/span>.<span class=\"me1\">printID<\/span> = <span class=\"st0\">&quot;bookB&quot;<\/span>;<\/div><\/div>\n<\/li>\n<li>You are done editing all ActionScript code.<\/li>\n<\/ol>\n<p><strong>Add new content to the library:<\/strong><br \/>\nIt&#8217;s time for the third step where you make new pages for the second book.  You&#8217;ll basically need to follow the <a title=\"How to Add More Pages to PageFlip\" href=\"https:\/\/www.pixelwit.com\/blog\/page-flip\/add-pages-to-pageflip\/\">Adding Pages<\/a> tutorial until you get to the 2nd step of the &#8220;Creating a Page&#8221; section.  At that point you need to name the new symbol &#8220;<strong>bookB<\/strong>&#8221; followed by a page number. For example page #9 would be named &#8220;bookB9&#8221;.<\/p>\n<p>Once you have all of your new pages in the Library with proper linkage identifiers you can test your movie and enjoy the fruits of your labor.<\/p>\n<p>This technique can be used to set other variables which might differ between each book such as page size or page quantity.  Simply delete the variable in question from the actions on frame #1 of the Pages clip and then redefine that property for each Pages clip using &#8220;onClipEvent&#8221;.<\/p>\n<p>Hope it helps.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since a few people have asked me to help them add multiple PageFlip effects to a single Flash file I thought I&#8217;d write this tutorial just for them. As usual, I recommend downloading the latest version of the Free Flash PageFlip File to be sure we&#8217;re on the same page (so to speak).<\/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-294","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/pages\/294","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=294"}],"version-history":[{"count":0,"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/pages\/294\/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=294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}