Page 1

Power Up My Site Page Peel Premium Component Documentation This guide provides usage and installation instructions for the Flash 8/MX Page Peel Premium Component from

Thank you for your purchase of Page Peel Premium Flash MX/8 Component! We hope that you find it useful in developing your Flash apps. This guide will walk you through installing and using the component. We have kept this documentation ‘short and sweet’, and included samples that we hope will help you get off the ground. If you read the documentation, view the samples, and still have trouble using the component, please let us know by writing

INSTALLATING THE MXP COMPONENT The easiest way to install this component is to download the latest version of the Macromedia Extension Manager from Once the Extension Manager is downloaded and installed, you can double-click on the .MXP file included in the installation package in order to install it, after which you will need to re-start Flash, and then you will see the component in your “Standard Components” folder in your Components Window (Ctrl-F7).

USAGE INSTRUCTIONS This component has been designed with ease of use in mind. This was the primary goal in creating the component. You can very easily set up the component and have it running by copying a few lines of code into your Flash document. Samples are included in the package for your reference. All Methods and Properties Defined (usage & applications explained beneath) .xmlFile .init()

The path & filename to the XML configuration file you are using Initializes the component. Required for use. We kept this separate in order that the component not be initialized before you’re ready for it. .nextPage() If another page is available, this advances the book (or your animation) to the next page .prevPage() Go back to the previous page .gotoPage(x,skip) To travel to a page by flipping each page in between, you can use a syntax like: gotoPage(5). However, if you want to skip directly to the page, without flipping the pages in between, you can set skip to true like this: gotoPage(5,true);This can be set to the onrelease of a movie clip or any other event that occurs within your animation. .pages You can utilize the pages method if you need to know when your book has been fully initialized. An example is below, in the “Tips and Tricks” section:


Your primary configuration information comes from your XML file. The format follows (reference sample files for examples): <content width=”300” height=”400” transparency=”true”> <page src=”page1.swf” /> <page src=”page2.swf” /> </content> That’s it! You simply tell the XML file what size your pages are, whether they involve transparency (you may save a bit of processing power if you are not using transparency and set this to false), and then proceed with your list of pages. Setting up your Flash Document: There are a couple of things to consider when setting up your Flash document. First, you need to give the component 1 frame before you call its init() function. This will ensure that the component can instantiate itself well before being given instructions. Second, you need to give the component 14 frames before you begin interacting with it. This will ensure that the component has completely loaded and is ready for interaction. You will see examples of this in the FLA samples. Alternatively, you can also use the “pages” method below instead of waiting 14 frames.

TIPS & TRICKS Transparency If you are going to be using transparent pages, you will need to make sure that the transparency is set to “true” in your XML file. Also, you will need to create the identical transparency on the back of the page in order for it to look correct. In other words, if I have a transparent star on one side of the page, I will need the identical star (reversed if it is not symmetrical) on the back-side of the same page in order for it to look correct.

The “Pages” Method Sometimes you may want to show things beneath the book or label that you’re creating, but you don’t want those things to appear until after the book has been initialized and made visible. To accommodate this, we’ve come up with what we call the “pages” method. It’s a very simple way of determining exactly when the component has been initiated and is visible on the screen. Enter the following code on at least the third frame of your FLA file (assuming you have given your Page Peel Component an instance of “PagePeel”):


this.onEnterFrame = function(){ if (PagePeel.pages._visible){ // code to show your movie clip // once we get to this point where pages._visible is true, the component is initialized delete(this.onEnterFrame); } }



test of the application