Help needed with a flash script - Page Flip...

  • devs
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jan 20, 2004
  • Posts: 6
  • Status: Offline

Post November 3rd, 2005, 6:16 am

Hi guys looking for some help with a little flash that I promised a mate...

Basically he has a document that he wants me to convert to flash so users can turn the pages online.

I found a great fla script online but can't get my head round how to add additional pages to it?

If someone has a free min. could they please take a quick look and explain what I need to do?

You can get a copy of my fla file here: http://www.redcube.net/flip_master.fla

Many Thanks,

Devs

The fla contains the following instructions but I don't understand them ;(

"/*

PageFlip - Help ----------------------------------------------------------

frame1: Self loader
(never export items to the first frame, and copy one instance
to the layer exported/frame4 of every exported items)
//sorry for my bad english...
frame4: layer exported: here is all the exported items
frame5: here is the main code.
frame6: the main code is activated here.


- This code is opensource (don't buy it from anywhere)
- This script don't support dynamic content loading!!!
- If you have an animation on a page, it must be controlled by the _global.mcnt counter!
- Buttons, or events can be enabled/disabled by a simple script showed in templates!



adding pages: ------------------------------------------------------------

you have template pages in the library:
page_templateLEFT
page_templateRIGHT

If you want a new page, DUPLICATE on of the templates (depending on what side your page will be).
Edit the content of the layer "content".
Export your new page (Library/linkage), and don't forget to uncheck "Export in first frame",
then copy an instance to the exported items! (Main timeline/Layer: exported/ frame 4)
The last step, is to change the page data (layer actions/frame5/from line26):

add a new line:
addPage("yourPagesExportName"); or
addPage("yourPagesExportName",true); if you want to enable tearing of it!

Always insert pages in pair!!!



variables: ----------------------------------------------------------------

removedPages array hold page numbers of removed pages (teared off).
page hold the current left page's number.
at the beginning you can set page variable to the page you want to start the book with it.
canflip it's a variable. setting its value to false disables flipping



functions: ----------------------------------------------------------------

gotoPage( destinationPageNo, skip ); quick jump to the page number: destinationPageNo; values = 0-maxpages;
skip: boolean; if true, pages will be skipped to the destination!
autoflip(); start autoflip (direction is calculated from _xmouse)
removeML(); REMOVES THE MOUSE LISTENER!!!!
must called if you want to unload the pageflip, then load an other!



PageFlip v2.13 coded by Macc/iparigrafika
abel@iparigrafika.hu

*/"
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post November 3rd, 2005, 6:16 am

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post November 4th, 2005, 3:19 am

oh, the iparigrafika.hu
nice stuff there. I hated it in the beginning, when i was asked to modify it and add all kind of weird stuff, like dynamic pages and other stupidities.
Well, after a while i kind of learned all that it does, so you may wanna take a look here:
virtual magazin
So, basically, to add more pages to your magazine, look in the library, u-ll see there pages-> page1, page2, ....
Right click on page 1 and chose Duplicate, then rename it to pageX (where X is the last number of pages + 1) repeat the procedure till u get all the pages you want. Dont forget to export them for action script -> right click on the item in library (Ctrl + L open the library, if u dont have it already opened) -> select Linkage, and give it a name (same as movie clip name, meaning pageX). As i see, there are some changes in this version of flipping pages, so .... do as that guy said there. Uncheck the Export in first frame option then drag and drop the Movie clip u created onto a frame (probably there`s a layer called pages, see where it starts, and drag the page on that layer, at the first key frame)
Then modify added pages as you like, next look into the actionscript thingy. U`ll see there an array of pages. Add to the array some more items (depending on how many pages u added). Also there is a variable called "maxPage". Set it`s value to the number of pages u have. I dont remember exactly now how the array variable is called (anyway something that contains the word "page" in it) , but i`m sure u`ll find it there. I`ll be offline this weekend, but i can help you sunday evening if you dont get any results.
  • devs
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jan 20, 2004
  • Posts: 6
  • Status: Offline

Post November 7th, 2005, 1:06 pm

Hi there IceCold, many thanks for the reply mate and apologies for not getting back to you sooner. Yet I've been having very bad problem trying to figure out how to add additional pages to this thing ;(

I'm still trying to get my head round flash and haven't yet figured out action scripting..

I'm getting confused with the complexity of the file as it contains things such as transparent pages, pages that can be ripped off etc. I don't need anything like that just a simple page flip between 20 pages including front and back covers.

I'd be very grateful if you have a free minute to take a look at my file (linked in first post) and see if you could straighten things out a little. Failing that if you still have an earlier 'slim lined' version of the script on your system that you could mail me so I could try and figure things from there?

Many Thanks mate,

Devs ;)
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post November 9th, 2005, 3:26 am

i`ll take a look this evening at your file and see what i can do.
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”
  • devs
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jan 20, 2004
  • Posts: 6
  • Status: Offline

Post November 9th, 2005, 3:28 am

Top man many thanks for the help IceCold! ;)
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post November 10th, 2005, 1:18 am

send me a pm with your email so i can send you the FLA. It is just like i told you, duplicate page, rename it, link it, drag it to the exported pages frame, then add it in action script with addpage
However, i seen you added/changed the first 4 or 6 pages, but the rest of the pages have different height/width related to pw and ph variables... so you should consider modifying their width/height, or replacing the content with other stuff (you know, all pages should have same width/height, exactly as the pw and ph variables)
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”
  • devs
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jan 20, 2004
  • Posts: 6
  • Status: Offline

Post November 10th, 2005, 5:29 am

Great I've just sent over a pm to you mate...

Many Thx,

Devs ;)
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post November 11th, 2005, 1:36 am

page 6, the one wich is transparent, is not exported
Right click on page6 in the library, chose export for action script, uncheck Export in first frame, hit OK.
Then drag page6 in the layer: exports, on the key frame.
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”
  • willy6743
  • Born
  • Born
  • No Avatar
  • Joined: Dec 01, 2005
  • Posts: 1
  • Loc: San Jose
  • Status: Offline

Post December 1st, 2005, 7:34 pm

IceCold - great work on your flipbook. I noticed one thing in yours that I am planning on placing in the one that I am working on - a middle binder. I am somewhat new to this script (and Flash in general)...do you have any tips on how to achieve this effect? I also want to use dynamic content in the future (randomizing photos)...did you get the dynamic content to work for you?

Thanks!!
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post December 7th, 2005, 8:59 am

well .... it`s not really dynamic, i only separated the main swf from the swf with the pages ... but it doesnt worth the trouble. I did that cos i was asked to, but personally i wouldnt do that. Probably i`ll try to load the pages separately ... but they must be in a swf format and exported for actionscript, since the guys who did the engine (ikpari.hu) made it so that you must use the pages from the library ... no dynamic content allowed.
I tried to modify the script so that it will load jpg files for the pages, but i didnt got the expected result. I managed to load and display the pages, but the flip effect was totaly ruined.
About the middle binder .... just set the odd number pages at ._x = 10, and the even number pages at ._x = -10 (that from flash editor ... double click the page from the library, set the desired ._x position), then add your middle bar in the movieclip named pages.
Well, i worked quite a lot with that engine so i know most of it .... except the part which actually animates the flip :D ... though i have an idea about that too. I can show you some other things i made based on the flip page engine ... if you want, send me a pm.
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”
  • orlando
  • Born
  • Born
  • No Avatar
  • Joined: Mar 06, 2006
  • Posts: 4
  • Status: Offline

Post March 6th, 2006, 7:11 pm

Hi,

I was wondering if you ever did manage to put a middle binder, or to make the page flip sourcecode more dynamic. It baffles me that the creator of this fantastic effect did not leave in a way to make it so that we can dynamically load jpgs for the pages as they are added to the directory...

Orlando
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post March 7th, 2006, 1:13 am

yes, i added a middle binder.
but for the dynamic pages, the way it was designed, you cant do it with external jpgs. I seen other page flip which allows loading pages from jpg, but it was built different. They had the blank pages in which it was loaded the external image, showing a preloader while image was loading.
So, if you can implement the flipping algorithm from iparigrafika.hu (i remember they actually had a tutorial on how to make the page flip, using geometry), then you can build your own page flip with dynamic content.
  • orlando
  • Born
  • Born
  • No Avatar
  • Joined: Mar 06, 2006
  • Posts: 4
  • Status: Offline

Post March 7th, 2006, 8:50 pm

Can you post a link to the binder you built using this technique? I'd love to see what you came up with!
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post March 8th, 2006, 2:09 am

check upper ... the virtual magazin link
  • electro
  • Novice
  • Novice
  • No Avatar
  • Joined: Mar 07, 2006
  • Posts: 18
  • Status: Offline

Post March 8th, 2006, 4:40 am

The virtual magazine is really cool, is the page flipping effect which you have shown, is it Mask based?
Very intresting stuff!
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 8th, 2006, 4:40 am

Post Information

  • Total Posts in this topic: 67 posts
  • Users browsing this forum: No registered users and 39 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.