February 01, 2004
Page Flip: The Final Word

Okay - don't look any further. Here is the last page turn engine that you will ever need: it's scripted, it's perfectly smooth, I did not find any bugs and it has one feature that none of the currently known engines has: you can drag on all four corners of the book.

This masterpiece has been created by Macc from Ipari Grafika, Hungary. And yes - you can download the fla source here.

Posted at February 01, 2004 11:38 AM | Further reading
Comments

that is a very nice piece of flash!

Posted by: Keith Peters on February 1, 2004 12:19 PM

yessss.... really perfect work!
respect goes out to Macc!

Posted by: Erik Lembke on February 1, 2004 03:39 PM

Very nice, thanks for sharing!

Posted by: darron on February 1, 2004 04:01 PM

Very very nice! I wasn't expecting that much.

Posted by: Burak KALAYCI on February 1, 2004 04:08 PM

Remarkable. Very well done.

Thanks for the link Mario.

Posted by: Oscar Trelles on February 1, 2004 04:59 PM

neat!

Posted by: aSH on February 1, 2004 05:57 PM

Perfect !

Posted by: Xav on February 1, 2004 07:38 PM

oh yeah - that's some sweet flash stuff there!
Now if I could just figure it all out....

Posted by: ByteDreams on February 1, 2004 10:17 PM

The only "bug" that I saw during my time playing with this, was one that, if you try to turn the next page before the last page has "dropped", then it causes the "dropped" page to jump back.

Still, thats some pretty amazing stuff.

Posted by: Chris Owens on February 3, 2004 02:45 AM

Hi! thx for your compliments, and Mario for posting it... Chris: it would be good, to flip another page, while the first one isn't finished...

Posted by: Macc on February 3, 2004 03:22 PM

great work! Thanks.

Posted by: AlexU on February 3, 2004 06:33 PM

This is really amazing, amazing work.

Now, if I were some sort of a good ActionScripter, I'd sing and dance all day.
But being a graphic designer, I was not able to adjust this to my needs/wishes without screwing it up.

All I need to now... how do I add more pages??? I tried adjusting the code, with very limited success.

Anybody who has a hint for me? Pretty please? Thanks :)

Posted by: Squiddo on February 3, 2004 08:18 PM

I can't see it. I have 7,0,14,0 installed. Also, their homepage comes up but I don't see anything in the large right 2/3 area of the page. Bottom is fine, sidenav with floating descriptions (nice) is fine.

hmm

Posted by: matte on February 3, 2004 09:47 PM

never mind. Upgraded to 7,0,19,0. demo works now but their website still doesn't. [shrug]

Posted by: matte on February 3, 2004 10:04 PM

Truly spectacular use of Flash. Thank you for sharing this. Your generosity is much appreciated even if I haven't the feintist idea of how you did this. :)

Posted by: TheDon on February 4, 2004 05:50 AM

Shall we now expect a torrent of page turners? ;)

Brilliant code, though as interfaces go I think turning a page is best left to books.

Posted by: ptrdo on February 4, 2004 07:48 AM

Hi

Very nice here is something we did about 6 months ago.

http://www.schwingportal.com/digimagazine/digimagazine.html

comletely xml driven digital brochure something with onmouseover info, chapters, back and forward paging etc.

Armand

Posted by: Armand on February 5, 2004 08:58 AM

Squiddo: incrasing no of pages is simple: frame3/ maxpage=[number of pages]. and you must make every pages and export it by the same way as the existing pages. The page after the last visible page must be blank.

Thx again for all!

Posted by: Macc on February 5, 2004 08:23 PM

Hi!

Me again... Some people asked me about tearing off pages from the "book"... So i started to made it... and the basic of the effect is now done. But the harder part remains... mainwhile here is a little demo: http://www.iparigrafika.hu/pageflip2.html
I post the source once i finished...

Posted by: Macc on February 5, 2004 09:09 PM

Awsome! Very impressive! Congratulations and thank you so much for sharing :)

Posted by: Eduardo Márquez on February 7, 2004 12:11 AM

Macc, this is really great work. What adjustments would I have to make to include larger pages?

example:

frame3 / actions
pw=400;
ph=547;

do I change the 0,0 registration point for each page? (I offset y:-100.0 for each page to make up for the displacement, but there are problems with shadows when I turn pages from the lower corner)

Posted by: derek on February 7, 2004 01:15 AM

http://www.nokiko.com/flashbook/bookxml.html

ok we have a new sample: each chapter in the book is a separate swf file, each of the chapters is defined in xml. this also loads the chapter menu. you have 2 options, one is to go to the next chater and one is to autopage to the next chapter.

all the effect is done in the main swf, this one loads the chapter swfs and applies the pagelipping effect to each frame.

Armand and Guilermeo

Posted by: armand on February 10, 2004 12:23 AM

Macc: Thanks for your help, forgot to come back sooner.
Anyway, I still can't figure it out, sorry. :(

How do I add more pages? I put them (named "page10", "page11"...) atop the ones that lie on frame 2 / layer "pages" and change the script in frame 3 accordingly.

What I end up with is the final pages repeating...

What am I missing? Do I have to them somewhere else? Thanks for your kind help... and apologies to power-scripters in here that I'm annoying with my stupid questions :)

Posted by: Squiddo on February 10, 2004 04:38 AM

Regarding adding pages...

1) Create your additional page MovieClips and number then accordingly i.e. page10, page11. Then select the properties of these MovieClips and make sure "Export for ActionScript" is selected and that the identifier is also entered (the same name as the MovieClip page.

2) Then select Frame 2 on the main timeline and you will see all the pages for your "book" sitting there. Drag and place your additional pages here.

3) Change the MaxPages variable on Frame 3 to the new number of pages (plus one). Note that you can use clear (alpha 0%) MovieClip pages for the additional page so that the user will not see it.

This should help...

Posted by: Ozzy on February 11, 2004 01:32 AM

I found a bug...

The first page disappears when you first click the mouse over the page to drag. After that it's ok.

Any ideas on a fix?

Posted by: Ozzy on February 11, 2004 03:29 AM

This is great. but I wondering how to change the page size if I have bigger images?

Posted by: Coolio on February 11, 2004 04:09 PM

yes.. a brief explenation on how to change the page format would be very nice.
Great work, Macc!

Posted by: c0rgan on February 11, 2004 05:44 PM

ABOUT RESIZING PAGES...

As you probably know, if you change the page dimensions (especially the height) the flip motion does not work properly.

What I do is keep the size the same (adjusting the width is OK to a degree) and then import that movie into another movie's movieclip and increase that size. That's the only work around I've come up with.

Also about the first click error, an easy fix would be to add an additional variable in the "MouseDown" function to ignore the first mouse click like so:

mousecontroll.onMouseDown = function() {

clickCount++;

if(clickCount > 1) {

if(flipOff) {

(*Code*)

}


}

}

I hope this helps.

Posted by: Ozzy on February 11, 2004 08:11 PM

Ozzy,

quote: make sure "Export for ActionScript" is selected and that the identifier is also entered (the same name as the MovieClip page.

Thanks so much. This is what I did not realize. The rest was peace of cake.

Thank you!

Posted by: Squiddo on February 11, 2004 10:57 PM

Is there away to get this page flip to work with onPress or onRelease instead of having to drag pages?

Posted by: Kevin on February 12, 2004 01:47 AM

Also see my 'research' on other implemtations at:

http://www.actionscript.nl

Either choose ">" or pageTurners from the menu.

peter

Posted by: Peerless on February 12, 2004 09:07 AM

Wow! this could even turn the pages at the 4 corners! But is it possible to add animation inside the various pages?

shuling

Posted by: shuling on February 12, 2004 11:48 AM

hi marc, realy great work!
i have also the problem when i change the page dimensions.
for example: pw=466 and ph=700. what i have to do???
and how i can make an autoflip?
thx

Posted by: JN HLLBRG on February 12, 2004 04:07 PM

Just wanted to post my new site using this code.

Allow me introduce myself: http://www.ozzybenn.com

Many thanks to Macc for the code - yes I did give you a credit - now that's teamwork.

Also thanks Mario for posting this code and maintaining this great site, Coma2 rocks!

*wink*

Posted by: Ozzy on February 12, 2004 08:41 PM

coma2 rocks? Sure they do, but since October last year they rock without me *wink* - http://www.quasimondo.com/archives/000327.php

Posted by: Mario Klingemann on February 12, 2004 08:49 PM

*embarrased*

Opps! All hail Codeazur!

You rock no matter what crew your with.

*double wink*

Posted by: Ozzy on February 12, 2004 09:01 PM

Hi! Thx for all of you!
Ozzy: thx for the credit! Nice work your site!

About difficulties during size changes, here is some hint to do:

In the original one, you have a book with 8 pages:
first page is 1 (always at the right side (odd number))
last page is 8 (always must be at the left side (even number))

page0 is the page before the first page: must be a blank background
colored or empty movieClip
page9 (in the original case) is the page after the last page!!! and
works like page0!

if you incrase the number of pages to 18:
page9 must be renamed page19 (maxPages+1) and don't forget it's export
name also must change to page19!

all pages you inserted must named starting by "page", and followed by
the page number (9,10,11,12,13,14,15,16,17,18)...
and also must be exported with the same name!

One more thing:
Because this fla has a self loader routine, don't export item in the
first frame!!! don't check this option when exporting!
but place an instance of newly created pages on frame 2, where the other
are placed!!!

About bad masks when page size is set to higher than the original:
I entered bigger page sizes on my original source, and the only one small bug was detected:
the tourning page's mask was not enough high.
this is a very simple thing to change it:

at _root/pages/mask/ you find a graphic element, that is 500x900 px-> change it to 500x1200 (or higher if it's not enough)
and at _root/pages/pgrad/ you find also an other graphic element: its height is 900px too. change it to the same value (1200)
and at _root/pages/flip/p3shadow/ do the same thing here again.
and at _root/pages/flip/flipgrad/ do the same thing here again.

this is because i used the largest page size that this code can support. if you change these attributes, the larges page size will be incrased!

good luck. next versions coming soon:)
(next version's code will be optimized and more flexible)

Posted by: Macc on February 13, 2004 12:58 AM

hi marc - again really great work!
a have another problem when i try to integrate a button on a page. it doesn't work. for example:
on(release){
getURL("http://www.google.de");
}

and an autoflip would be nice...

Posted by: JN HLLBRG on February 13, 2004 08:52 AM

autoflip, hard cover, quickjump btn on a page, possibility of tearing off pages, flipping corner on mousover... these functions are done, and will be soon public.
i don't know why your button do not want to work, for me it worked fine... (i have tryed already dynamic texts, working buttons, animated movies on pages etc...) try to insert a btn to any page (the exported one) and associate with it you short script...
Ahh... i have an idea: it's because the mouse clicks are captured for the whole page:

do desable this, try changeing the code to:
line 104: if(x0) {
line 110: if(x>(pw-64) && page<maxpage) {
where you can set the value (64) of the distance from page edges...

Posted by: Macc on February 13, 2004 11:27 AM

but now the backflip isn't possible...

Posted by: JN HLLBRG on February 13, 2004 12:42 PM

ohh... the code at the line 104 was cropped... i don't now why... wait...

(page>0 && x<-(pw-64))

Posted by: Macc on February 13, 2004 01:39 PM

it works -thx a lot
if you have a new version with autoflip or ather things please tell me (jan.hellberg@gmx.de).

Posted by: JN HLLBRG on February 13, 2004 01:54 PM

it would be the only one you would ever need, except that it needs a couple of nifty things...

easily addable pages

nicer loading (for lots of pages and big pictures)

a zoom lens

as it is it rocks tho. but i wouldn't be saying it's the final word...

Posted by: Tracy on February 15, 2004 11:20 PM

I just would like to say that this is one of the most brilliant things I've ever seen done in Flash. Props to you for doing such a wonderful job.

Posted by: FubarShibby on February 17, 2004 09:11 PM

Is there a way to automatically flip that pages say wiht a button click instead of having to drag the pages....I thought this would be an easy modification of the code but I cant seem to figger it out. Any help???

Posted by: keith on February 17, 2004 11:46 PM

Is there any way to have the pages load images or .swf externally? Like have the images loadMovie("image.jpg");

I have tried this and every time click on the page the page flickers. Every page does this. Is there any way to stop the page from flickering? thanks so much

Posted by: Tedd Crozier on February 18, 2004 10:16 PM

hi macc!

very nice script!

when do you think is the new version online(hardcover etc.)? and will it be also open source? ;-)

thanks a lot,
lisa

Posted by: Lisa on February 19, 2004 11:17 AM

How can I make each page 'stack'?

At the minute the pages disappear behined eachother

You drag a page out then another and when you drag the next one the firt one disappears behind it. I am creating a book whick has tabs sicking out the top, sides and bottom so I want all the pages to remain on the screen at once.

Posted by: steve on February 20, 2004 10:51 AM

nice work btw!!

Posted by: steve on February 20, 2004 10:53 AM

Jaw Droppingly good!

Amazing what Flash is actually capable of with someone good at the wheel.

- Ash

Posted by: Ashley on February 22, 2004 09:25 AM

This is fantastic, but could someone help me out with a development question???? Is there a function to call (from a button) which will turn the page over sequentially without dragging. Ie from a thumbnail button?????

Posted by: paul on February 23, 2004 12:49 PM

This is just fantastic, just what i was looking for .... can i ask for a bit of help though...
How can i make the images on each page be picked up externally???

Any ideas?

Once again .... great work

Lawro

Posted by: Lawrence on February 24, 2004 05:19 AM

In order to have the pages filp automatically you would have to exchange the target coordinates for the corners that currently come from the mouse with some pre-defined or scripted target coordinates.

This could for example be done with a keyframed path animation, but of course it would be more organic if you write a script that moves a target from one corner to the opposite corner in a random fashion. Somewhere in the pageturn script is a routine that checks the _xmouse/_ymouse coordinates- exchange this by the coordinates of your moving object and there you go.

Posted by: Mario Klingemann on February 24, 2004 01:34 PM

Great, Ill give it a go! Thanks a lot!

Posted by: paul on February 24, 2004 02:08 PM

I embeded the pages using loadmovie just create a movie clip inside the pages as a container and load the external in onEnterFrame, this works for embeded video also

Posted by: paul on February 24, 2004 02:14 PM

OH! But you have to be carefull with loading video as the video will reload after the mouse is released. I have tried to avoid this but Im not clever enough! I just added 15 frames of a still to delay the video playing but Im sure the more talented guys here have a way of only loding the vid when the pages have been set and the drag has finished

Posted by: paul on February 24, 2004 02:17 PM

http://www.systemminds.com/fxindex/brochure.html

this is beautiful

Posted by: simon on February 24, 2004 02:29 PM

This is just great!!! The link above. I would love to take a peak at the source?

Posted by: agro on February 24, 2004 09:54 PM

It has been said by everybody, but again: Great work Macc, and thanks for sharing!!!! You have my credits for this one... I really thinks it is cool to see people helping each other out this way, even putting up complete source codes

And just like everybody I'm looking for MORE of this!!!! hehe :) looking forward to even better pageturning (stacks, hardcover, multiple pageturning etc.)

BUT!!! don't let me be too gready and just start with a simple (?) question about the only bug people could find: The 'first click/first page flicker' buggie thingie... Ozzy suggested to 'disable the first click'. Although it is a good idea, you actually are now created a 'first click' bug... Wich i think is not a good idea for people who are new to your site and perhaps don't understand this way of navigating by means of a book with pages. (the slowminded ones will try to click the first page maybe one time, and could think "oh, this isn't it")

Isn't there another way to 'really' fix the bug? Or suggestions a better work-around?

Posted by: The Nono on February 25, 2004 03:43 PM

Thanks Paul ... the Brocure is excellent also and I too would love a peak at the source as i am trying to create button navigation also.

Lawro

Posted by: Lawro on February 25, 2004 05:56 PM

hi all,

a stupid question:

what is the full path from the root to for example page30 in the pageturning swf???

Because I created a movieclip called 'mail' in MC "page 30" and inside is a mailsender wich sends user comments to a php script. In return the php script sends back a conformation to the swf to let people know if their messase was sent... Normally I would put the 'mail' MC-instance in the root, but now i've put it in 'page30' movieclip, i'm not sure how to change the path used in this line in the php script...

Print "_root.Mail.EmailStatus=Complete - Your mail has been sent";

anyone? thanks

Posted by: the nono on February 25, 2004 06:38 PM

Hi !
Very nice source indeed and thanks to Macc for sharing it !
Here's my littlke question (I'm a neebie and beginner) :
- I tried to insert an interactive movie (like a draggable object) inside a page.
- when I try use this animation, the mouse click only triggers the turn page routine.
- what I would need is a way to make the turn page routine triggerable only within ten pixels in the border of the page, so that the mouse click would call only actions inserted in the pages.

Help would be great

Kind regards
L

Posted by: Laurent on February 25, 2004 06:52 PM

I dont have the source code for the systemminds thing - I found it when looking for inspiration for a page turn - The buttons to flip to different pages is something I really want to do. Have used the set pages function to go direct to a page, but when you click to turn manually it reverts to the page it was previously on??

Posted by: simon on February 26, 2004 09:17 AM

If you get any code for the manual page turn, i would appreciate a look Paul/Simon.

Thanks
Lawro

Posted by: Lawro on February 26, 2004 01:43 PM

Hullo all,

First off, the code is awesome. Super inspiring. Thanks for all who posted it.

I've been doodling with this for awhile...what I really want to do is have some kind of ripped page effect, where if you're on page 1 maybe a corner or a part of the middle is ripped out and you can see a part of page 2.

The problem is that I can't seem to get the page behind the current one to load until the mouse is pressed.

Basically I want the next page to load with the current page.

Does anyone have any suggestions as to how this can be accomplished?

Thanks a ton. :D

Posted by: Jamie on March 4, 2004 03:41 AM

Laurent:
about catching click on the page:
Posted by: Macc on February 13, 2004 11:27 AM

The first click thing is a little bit strange... it's not always present. But in the next version this bug will be corrected.

The small 300line of codes reaches today the 1200 lines... i will optimize the code, and write some hint about handling it...

Go to view my site, in the first page you will see if any updates are available...

http://www.iparigrafika.hu

Posted by: Macc on March 4, 2004 11:21 AM

Thanks Macc ... unfortunately my Hungarian is a little rusty and i can't quite figure out where i should go for updates.
If you could direct me to somewhere i could find an example of a source file with pageflips by button on(press) i would be eternally gratefull ... in fact if anybody could help me I would be eternally gratefull :)

Many Thanks All

Lawro

Posted by: Lawro on March 5, 2004 12:26 AM

Lawro,

click on the flag icon on the bottom of the interface (left most icon of a 3 icon group next to the version information) and the titles etc change from hungarian to english... as with all macc does very elegant in deed.

Macc cheers for the code - will find out from your site where to send the beer and thankyou chocolate!!

Posted by: Joe on March 6, 2004 05:21 PM

Hi! All. The new version is not yet uploaded, because i have to made the design and the interface. Once it has been downloadable, i will inform you all in this topic, and on my site too. The english interface of my site is under developement, and when it will be done, all text will be in english.

Posted by: Macc on March 9, 2004 04:28 PM

Definately the best page flipper I've seen, grreat work!

One thing... can I put buttons on the pages that will work consistently? Maybe something that deactivates the page turning on rollOver....

Posted by: Cory on March 9, 2004 08:01 PM

awsome code... but I am not as savvy modifying it as the rest of youz guyz! I have images that are 480wide by 747high. I have been mucking around for 2 days and what I get is far from pretty.

any help?!?

Posted by: shua on March 9, 2004 11:55 PM

Thank you for the update Macc, I think everyone here is looking forward to seeing how you have coded the new modifications and would like to thank you for sharing it

Paul

Posted by: paul on March 10, 2004 09:29 AM

Brilliant work - and many thanks for sharing!! I look forward to seeing the next version...

Posted by: Michael Daul on March 10, 2004 02:37 PM

Can someone help me whit
turning pages whit buttons so that the pages is fliping automatic and where most i place the action
under the button or in the 3 frame i have tryed a lot of thing but nothing worked ik hope someone can help me

Posted by: wessel on March 10, 2004 06:58 PM

Can someone help me out???
Is it possible to let the pages flip automaticly.
Or does anyone know where i can get an auto flip-over.

tnx anyway.

Posted by: Luuk on March 15, 2004 02:20 PM

Anyone know what I is wrong here? I tried changing the page size, but then when I flip a corner, the corner opposite to that comes in as well (?).

Here's a sample flash with the error.
http://members.shaw.ca/pazu/error.swf

Posted by: Joe on March 16, 2004 10:31 AM

Hello Joe,
You must resize every page included the white/transparent ones and make sure they all match from both sides

Posted by: Laurent on March 16, 2004 12:27 PM

Yes an astounding piece of code! Wicked...had a good look round and this IS the most reliable and best page turn, if not the easiest to pick up, code wise...that maths, ouch....still don't totally understand it :-(

To the people having probs - if you resize the pages on the 2nd frame (not the 'pages' mc on the 3rd page, leave that alone) and change the pw & ph in the code it does work fine (for me it does anyway)

I have 2 queries though:

1. If you use bigger pages than 250x350 you sometimes get a cutoff from the mask at the bottom or top at some angles- altering the mask in 'pages' mc. seem to change the click-drag functionality for the worse...which mask or code do I need to alter to stop this?

2. A bug, but probably more with Flash - if you drag out of the movie it kind of 'sticks' and doesn't release the page until you click back at the edge of the target page, kind of fiddly...

Any way of making the page automatically 'release' (mousedown) if you mouse out of the movie?

Tried to amend the code but it doesn't work for me :-(

Posted by: tim on March 16, 2004 04:56 PM

I did spot this problem too. But it only occurs on PC. It works fine on Mac

Posted by: Laurent on March 16, 2004 05:32 PM

DOH!

Must have missed macc's query answering my first query...

note to self, must read more carefully! ::-)

2nd query still stands...not a major thing, just I've got the code sorted for detecting whether someone has moved the mouse off the flash movie, just can't work out how you force a 'mousedown'

Oh to those who needed an autoflip - not sure this is possible as it's all dynamic...I animated it manually using the grads etc, looks OK just fiddly...

Posted by: tim on March 16, 2004 06:06 PM

Autoflip ? Nice.
Do you think you can post the .fla ?

Posted by: laurent on March 17, 2004 12:31 AM

Hmmm, I made the pages the same size, and increased the mask sizes, but I am still getting this error. :(

http://members.shaw.ca/pazu/error2.swf

Also, is it possible to have a movie clip play only after you have flipped the page (specifically after it settles)?

Posted by: Joe on March 17, 2004 07:38 AM

Hey Tim,

U think u can post or mail me that autoflip.fla :)
So i can see how U did it.
Cause I'm still trying :S

Posted by: Luuk on March 17, 2004 12:33 PM

Joe - hmm not sure - maybe as you're pages are wider than macc's you need to widen the masks too? also I made sure that they were still registered at the same centre point (dunno if this matters, but I changed the mask heights then moved the mask so the white circle matched the others)

As regards making the movie clip play only when the page is settled this is easy:

1. Add "_root.stopped = false" to macc's script on frame 3, inside the mousecontroll.onMouseDown function

2. Make a movieclip with a stop action in the first frame, then what you want to animate on frame 2>.

3. Add this new mc to your pageX mc and call the instance 'stopanim'

3. Inside the pageX MC add this code:

if (_root.stopped==true) {
stopanim.gotoAndPlay("go");
}

hope this helps.

Posted by: tim on March 17, 2004 03:48 PM

oops forgot to add:

4. Add "_root.stopped = true" to the mousecontroll.onMouseUp function

Posted by: tim on March 17, 2004 04:12 PM

This Page flip (turn) is exactly what I've been looking for, for years!!!! I'm currently a Spanish teachers who loves to integrate technology with the students in the classroom. Every year we go through the monumental task of publishing hardbound books created by the students in Spanish and English. I would like to do the book electronically instead of doing it hardbound. For years I've been looking and searching for a way to create a digital book with the same effect as the page turn effect used here. I've used Power Point Presentations with simple effects for transitions from one page to the next, the same with the Front Page, the transitions used there are quite primitive. Even java script page flips are primitive compared to your effect. I would like the students to show this effect with the pages of the children's books they write and illustrate. If you can help us at all whatsoever we would Love your help in creating the students' children's books digitally with this page flip effect. I would also like to add sound to each page as it is being turned with the voice of the students recorded, this way they can be the writers, illustrators and narrators of their own books. Please help, I know it can be done, we just need someone to help us with the process needed to create this special effect with the pages of the books.

PLEASE HELP US!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Thanks,
Carlos R. Montes
Orefield Middle School
montesc@parklandsd.org
Ext. 61121

Posted by: Carlos Montes on March 17, 2004 05:52 PM

Thanks Tim, but I still can't get the movie code to play after I flip the page with that code.

Can you give me an example of it in a .fla file?
Maybe there is something I'm not doing right. :(

Posted by: Joe on March 17, 2004 09:33 PM

hello,

i must say that so far you have all been very helpful to me in regards to making this work without much knowlege of acton script. i am still troubled by a few bugs.

1.i have not yet been able to figure out how to flip pages with buttons.

2. the mouse sticks on a PC as mentioned above. is there a way to fix this?

3. and macc, is there a version of the code with comments in english, since that is the main way i familiarize myself with action script.

thank you all and especially macc for his generosity.

Posted by: snejina on March 17, 2004 09:50 PM

Nevermind, got it to work. :)

Thanks.

Posted by: Joe on March 17, 2004 11:09 PM

Is there a way to have it show up with the book cover page right away rather than the blank white page?

Thanks!

Posted by: Shaun on March 18, 2004 01:07 AM

Hi Shaun,
This worked for me. In the third actions frame of your scene have your pages start at 0 rather than -2 (line 12 in the code "page=0"). than have your page0 be blank and place your cover in page1. i lied to the code so it works in that i told it that i have two less pages than i actually have. so if you have 14 pages/movieclips write maxpage=12 in line 14. hope this works for you. it worked for me.

Posted by: snejina on March 18, 2004 03:14 AM

I am having trouble adding additional pages to this.
I have done everything (I think) that Ozzy said previously,


"1) Create your additional page MovieClips and number then accordingly i.e. page10, page11. Then select the properties of these MovieClips and make sure "Export for ActionScript" is selected and that the identifier is also entered (the same name as the MovieClip page.

2) Then select Frame 2 on the main timeline and you will see all the pages for your "book" sitting there. Drag and place your additional pages here.

3) Change the MaxPages variable on Frame 3 to the new number of pages (plus one). Note that you can use clear (alpha 0%) MovieClip pages for the additional page so that the user will not see it."

but it still does not work. :(
Any ideas on what I have done wrong?

Posted by: Joe on March 18, 2004 09:03 AM

To All trying to get a different size--- If you copy every thing into it's own movie clip, then put it in one frame on the stage with a stop.... you can resize the clip and the resolution of images on the pages will still be able to reach whatever they are imported at.(also good to know if you embed as a sizable swf)

Posted by: Cory on March 18, 2004 10:57 AM

Hello, I'm a student from Belgium and I'm studying multimedia Design. I'm doing a trainee ship and I've to make a flip page with 12 pages but it has to start automatically. Can someone help me with this. Tips are welcome on the following e-mail address:melissa.van.dessel@pandora.be Thank you for your help
Missy

Posted by: Missy on March 18, 2004 11:17 AM

can some one plz say the effects thats used on the images in the pageflip.fla and whats the name of the font where is't writing 'drag the page' and the fla is really a perfection but i am waiting for the new version...

thnx

Posted by: esogut on March 18, 2004 02:22 PM

Sorry if this has been asked already. Went through the list of comments and didn't see an answer for this one. On a PC the page is sticking if you drag it off the flash movie. When you mouse back over the flash movie and click it doesn't allow the page to turn but falls back into it's original position. Anyone? Anyone? Bueller?

Posted by: Derik on March 18, 2004 09:29 PM

Hi, I'm having the same problem as Tedd posted regarding importing external JPGs for pages. Anyone know of a solution. All I can figure out is that they get loaded multiple times and that causes them to blink/flash... Anybody got a solution?

Posted by: Greg on March 19, 2004 03:31 AM

Okay, I have figured most of the things out. :)

I am currently working on a school final project and have decided to use this code (credit will be given to Macc of course).
I just need a bit of help in doing some triggers since I am not experienced in coding for flash and my project is due very soon.

How can I make a movie play on the right-page only after a movie clip on the left has finished?
Also, for tim's play movie on flip code, how can I make it so that only the left-side's movie plays and how do I make it so that the movie(s) will not play again once they are complete (stay still on the last frame)?

Posted by: Joe on March 21, 2004 09:31 AM

Joe, wanna share your source (fla) so we can see?

Posted by: Greg on March 21, 2004 10:03 PM

Hi everybody,

I would like to thank Macc for this great code!!!

But i also have a prob when resizing the pages:( (230x565 px)

When i hold a page corner, the top of the page get lose when i drag my mouse upwards. How do i resolve this?

Please can anyone help me?

Thanx a bunch

Posted by: Marshall on March 22, 2004 03:12 PM

Hi everyone,

Great to see people finally sharing some great code for the benefit of us all. In response to an earlier message I am posting up a page-flip wav file I created at http://www.gabriella.tv/pageflip2.wav for those that might find it useful.

If those that have made improvements could post their new and improved fla's that would be much appreciated to the rest of us. Thanks and Enjoy.

Posted by: Fabien on March 22, 2004 03:50 PM

Anyone? Anyone know the answer to the PC bug of the page not turning if dragged past the edge of the book? I'm desperate here. As cool as this flash piece is, it can't be used if I can't get the PC to display it properly. PPPLEEEEAASSEE.

Posted by: Derik Lolli on March 22, 2004 05:51 PM

Derik - the problem is that flash doesn't receive any mouse events if the mouse is outside the flash area. The only way around this, is to make the flash file fill the whole browser area, by making it 100% and setting Stage.scale="noScale"

Posted by: Mario Klingemann on March 22, 2004 05:56 PM

Anybody wanna share the code on how to load in external jpgs (so they don't blink). I tried loading them in the individual page movies, but they obviously reload every time they get clicked and it causes them to flash on screen. Help?

Posted by: Greg on March 22, 2004 08:04 PM

Hi,

Nice code. And thank you for sharing it. You explained earlier how to add more pages. But I want to remove some pages so the last page would be 4. I got it almost by just removing the jpg's and their movieclips from page 5 up to 8. I don't delete the page9 and movieclip9 but rename it to 5, so I thought the 5th page would be a blank. But now the 5th page is the same as the 3th page? Could you help me on this one? Thanks.

Posted by: shodan on March 24, 2004 12:34 AM

Hi!

esogut: the font is DIN MITTELSCHRIFT
the effect used on jpgs is a simple ADD NOISE filter in Photoshop.

i'am at finishing of the version2. Now, if you want, send me any suggestion about new features you would like to see in the next PF!

Courrently finished features:
- Hardcover (can be turned off)
- autoflip
- gotoPageX (multiple autoflip)
- page trancparency

changes in the code:
- english comment
- easy page adding, resizing
- first click error fix
- Sticky mouse fix

Posted by: Macc on March 24, 2004 04:47 PM

Mario,
Thanks! I set the flash file to 100% in the html and the used the noscale code and it worked to perfection. You da man!!!!

Posted by: Derik Lolli on March 24, 2004 10:15 PM

Nice to hear from you, Macc. :)

Around when will this new version be out?
My project is due in 2 weeks or so, but I want to integrate the new version if time allows.

Greg: I wouldn't mind sharing the .fla, but it is currently quite large (can't host with my limited webspace) and filled with things that are not essential to the page flip, etc, since I am working on a school project, so I'm not sure.
However, basically I just did what tim and ozzy posted previously (adding those codes and resizing the height/width of the masks, etc). ;)


I still can't figure out how to make a movie clip on the right page play only after another movie clip on the left has finished. Any body got any suggestions?
Also, how do I make the movie clip stop and stay on the last frame even after I flip the page (with tim's "play only after the page has settled" code)?

Posted by: Joe on March 24, 2004 10:18 PM

is it possible to remove the first page??? just the first white page... :s thx...

Posted by: robke on March 25, 2004 04:10 PM

Ok, I've downloaded this file and have it taking in all of the book variables(page size, max pages, etc) and external swf or jpg pages dynamically from an xml file. Everything works fine as far as the xml importation goes, but I found a problem in the downloaded fla.

Whenever you increase the size of the pages from the original 250 * 350 using your variables, there is a masking and rotation problem with the bigger pages when flipping with the corners of the page. The top or bottom of the pages seem to get cut off until you let go of the mouse.

I'll check it out and see if I can't fix it, but I thought I'd give you a heads up if you knew what might be wrong right away. As a test you can put in a width of 500 and a length of 700.

If I keep the original size of the pages, everything works fine, but I don't want to be restricted to the current 250 * 350 dimensions. ;) I'll keep you updated as to whether I fix the sizing issue on the flip

Great piece of work BTW ;)

Craig (willdriven)

P.S. I'm also commenting your code in english, for those who might only be able to speak or read english ;) Once I'm done with a completed fla (comments and no page turning bug), I'll post it. Any word on when the new functions will be available so that I could get those in the commented fla?

Posted by: Craig Newkirk on March 25, 2004 05:39 PM

thanks for all the information you have all given freely here, it has really helped.
I've been working on a different script http://www.actionscript.org/showMovie.php?id=459
the scripter has made very useful comments and it helped me loads!!

My current problem is referencing. I would like to index my pages with the same animation as http://www.systemminds.com/fxindex/brochure.htmcan anyone help?

Posted by: clarice on March 26, 2004 01:00 AM

Had reports of a versions of IE Windows where it doesn't work at all (ie no click and drag)...anybody had this problem?

Tim

Posted by: tim on March 26, 2004 06:29 PM

Good news about version 2 - love to see that version - when is PF? IS that the Flash conf in SanFran?...

Anyway count me in for beta testing ;-)

Posted by: Tim on March 26, 2004 06:30 PM

I, my name is Benoit Grenier and I'm student in multimedia.


I have a little bug with the paper flip of your script. I put the .swf in a HTML 4.0 page and when I drag the page and the mouse go out of the frame, the page follow the mouse all the time. I need to click another time to drop it.

Please, can you help me to find a solution. I try a function "OnReleaseOutside" and doesn't work.

What type of function can I use to resolve my problem.

Posted by: Benoit on March 26, 2004 08:22 PM

"I still can't figure out how to make a movie clip on the right page play only after another movie clip on the left has finished. Any body got any suggestions?
Also, how do I make the movie clip stop and stay on the last frame even after I flip the page (with tim's "play only after the page has settled" code)?"

Anyone got any suggestions?
I am desperately seeking help (found out the project is due on Tuesday...). Thanks.

Posted by: Joe on March 29, 2004 01:25 AM

It's me again ... desperately trying to find the answer to flipping the pages with a button, any ideas when version 2 will be out?
If anyone knows how to it i would be very gratefull , i am doing a website as a favour for a designer friend and wanted to be able to flip his portfolio page by page with buttons, he's just starting out and needs a jump start with a great site.

Thanks all

lawro

Posted by: lawro on March 29, 2004 03:16 AM

Okay, I finally figured out how to solve my first query thanks to someone from a forum (Thanks).

Any suggestion on the second part?

"Also, how do I make the movie clip stop and stay on the last frame even after I flip the page (with tim's "play only after the page has settled" code)?"

(if not, then that's okay, since I don't think it's too important)

Posted by: Joe on March 29, 2004 01:38 PM

Great source.Thanks Quasimodo!

Posted by: iouki on March 29, 2004 04:03 PM

*cough* it's Quasimondo with an 'n'...

Quasimodo is the Hunchback from Notre Dame which I am not. At least my girlfriend's name is Alexandra and not Esmeralda.

And you've got to thank Macc, as in this case I was only the inspirator and the messenger.

Posted by: Mario Klingemann on March 29, 2004 04:30 PM

Joe - try using globals (_global.stopped = true etc.) rather than _root - otherwise I can't really tell from here what the problem is.

One thing - anyone had issues with older computers ie CPU speed/slowness/jerkiness during turning? The Pentium 4 3Ghz here is fine - my old AMD 1.3 Athlon struggles tho (it is crippled machine tho so might be the machine...) - especially on larger pages sizes (I'm not using full page JPGs either so I'm not sure what's causing it)

Any ideas? What's the test-bed / baseline spec for Multimedia PCs nowadays - Pentium 3 or 4?

Posted by: tim on March 30, 2004 04:22 PM

Would anyone be interested in having a project dedicated to page flipping posted on sourceforge/freshmeat so we could all contribute to the development of the fla via CVS?

Posted by: Wes on March 30, 2004 04:41 PM

Can anyone give me a hand with is referencing. I would like to index my pages with the same animation as http://www.systemminds.com/fxindex/brochure.html
please can anyone help?

Posted by: clarice on March 31, 2004 11:39 AM

Clarice - I believe this functionality is available in version two from Macc

Paul

Posted by: paul on March 31, 2004 12:37 PM

Hi All,

Macc...amazing work...much gratitude for the excellent script. Do you have an estimate as to when version 2 will be ready?

cheers

Posted by: Nader on March 31, 2004 11:30 PM

Thanks time, yeah, I figured it out now. :)

My project is done already, but I got one more question. :)

What can I do to make the page flip easier? What I mean is the user only has to flip it around 50-60% for it to go to another page instead of having to do it the whole way (some of my friends were complaining about it being hard to flip :/).

Posted by: Joe on April 1, 2004 09:33 AM

Thanks Paul.
I won't ask when version 2 will be released as Nader has already done so... but I hope its sooooonnnn :)

Posted by: clarice on April 1, 2004 10:31 AM

I want so badly to use this with images 350 X 350 pixels. But I am limited when it comes to understanding the script in Flash MX. Can you make a template that I can just paste my images into? Or what specifically do I change in the original page flip? The instructions you posted had the following text...

"at _root/pages/mask/ you find a graphic element, that is 500x900 px-> change it to 500x1200 (or higher if it's not enough)"

I see no 500x900 anywhere in the action script? Where exactly are those values?

Thanks for your help! You deserve incredible praise for this work!

Tom

Posted by: Tom Garber on April 1, 2004 11:35 PM

Hi!

V2 is not ready yet... sorry, but i'am switching these days to Mac... :)))

well. the code is finished, but i must make some page, with demo effects, animations... and ofcourse i try to make a cool design for it.

coming soon...

Posted by: Macc on April 2, 2004 02:44 PM

Hi guys,

I made a auto-flip myself (pretty good, still some bugs) for a school project.

PLZ ONLY WATCH IT AND DONT COPY IT, ITS COPYRIGHTED!!!

check: http://home.aim.hsbrabant.nl/s135561/files/flip_beta.swf

Posted by: SuperDeLux on April 6, 2004 11:32 AM

In referance to the posting by SuperDeLux (after viewing his example) I'd like to see a method to zoom in on elements of the page, in a comic book fashion, like the dotcomics that marvel do, but keeping a unique pageturn,

I love Mario's and Macc's sytle of page turn for its fluidity, but dislike the systemminds style of turn, as its very rigid.

I'd like to see links to external jpg's for easier updating of web enabled page turns, but really can't care less about an autoflip, since it nagates the need for the page turn dynamic, could please someone explain the preocupation with an autoflip? I think an in-page zoom is a much more usefull fuction.

Anyway keep up the good work!

-Kal

Posted by: Kal El of Krypton on April 6, 2004 03:54 PM

Fantastic! The most impressive Flash thing I've seen in a long time. Aside from the suggestions listed already, my question is "can this the pages be dynamic?"

Posted by: Joel on April 7, 2004 12:37 AM

Kal El of Krypton, would u be able to make urs open source or would u be able to gimme a heads up on how to make that page flip???

e-mail me if u like: digital_pimp128@hotmail.com

thanks!!!

Posted by: tyrell2nexus on April 7, 2004 06:47 AM

THIS POST IS FOR MACC.
MACC, can I have your email address? I guess you have created a masterpiece. I am newbie and I need your help in some flash work. I will be grateful to you. Please help.

Bis

Posted by: PriBi on April 7, 2004 08:18 AM

Hello,

I am desperately looking for a flash movie with the page turn effect, but I want it to be so that only the corners of the RIGHT page are dragable, not the entire page, while the left page is entirely dragable like it already is. Yes I know, strange, but I'm a graphic designer, I'm allowed. Hope anyone can help me out with this one. It would be highly appreciated.

Martijn

Posted by: Martijn on April 10, 2004 07:45 PM

Hi

I uploaded a pre-release version of PFv2:
http://www.iparigrafika.hu/pageflipv2.html

Posted by: Macc on April 12, 2004 06:37 PM

Nice v2 demo Macc!

Will we be able to load external jpgs in this version, too? Is it even possible?

Greg

Posted by: Greg on April 12, 2004 07:11 PM

V2 looks like everything we've been hoping for.
I especially like the transparancy effect with the underlying page, very nice.
Can't wait for the final .fla to be posted. Thanks for throwing us a bone Macc!

Posted by: Wes on April 12, 2004 08:20 PM

To address Martijn post:

Scroll up the blog and find the post that tells you how to set the clickable area of the pages. You should be able to adjust this to fit your needs.

Posted by: Nader on April 12, 2004 08:43 PM

Macc version 2 looks great. Nice added features. The only one that is not there would be the load external .jpg? Have you had any luck with this?

Posted by: agro on April 12, 2004 11:53 PM

I have had the same problem as greg with loading external jpg's ... they reload on click and the images flicker ... i have tried getting the onEnterFrame to work but without success. Can anyone help me to get this working????

Thanks in Advance

Posted by: lawro on April 13, 2004 04:01 AM

Hi all, I am trying to animate PDF pages turning on a magazine but am not getting anywhere. Does anybody know of any tutorials out there that would tell me how to make a model of a PDF magazine and turn the pages.

Posted by: humbert on April 13, 2004 06:09 PM

Hi!

I have made a dynamic page loader. It can loads external .swf, and (or) .jpg too... But it loads all content at the start!

Posted by: Macc on April 13, 2004 06:51 PM

Macc,

Great! That pretty much answers all of my questions. Can't wait to see it. Thanks.

Greg

Posted by: Greg on April 13, 2004 07:18 PM

All the content at the start is just fine! Macc you rock. My hat off to ya.

Posted by: agro on April 13, 2004 10:43 PM

Fantastic macc ... we're all gonna owe you one.

Posted by: lawro on April 13, 2004 11:21 PM

First of all, really nice done Macc, the best i´ve ever seen in flash. When will the v2 version be out in fla?

I really need this one, would it be possible for you to send the v2 fla to me? ;)

The project i´m into now have a deadline in two weeks.

/ Johan

Posted by: Johan on April 14, 2004 01:48 PM

Hello Macc ! Could you give me an email adress where i could contact you in order to show/explain you what i've done with your script. The whole soft is quite huge (50 MB) so i would like to send you a cd-rom.

Thx !

Posted by: Julien on April 14, 2004 04:57 PM

I really like the page flip effect but need it to work in Flash 5, I've been working on the mods to get it in line with flash 5 ie no setmask() or moving of mask objects. I have got most of the way there but I'm stuck on replicating the movement of the gradient which creates the curl effect on the page, and its associated mask. For the most part I'm moving movieclips containing the pages complete with their masks using figures similar to the original code, and then moving subclips of just the pages in the opposite direction to achieve the appearance of the mask moving whilst the pages remain static. I'm then using a separate function to move the pages as per the original code. In case of the gradient, the original code has the mask moving and then the subclip of the mask moving also which Flash 5 won't do. Anyone managed to figure out the alterations to the math to get the movement right so that the mask for the gradient will move along the same path as the page without the need for this nested mask clip movement?

Thanks

Posted by: Ian on April 14, 2004 10:15 PM

Page resizing question:

I've been reading about and playing with this issue for some time now.
I can't figure out how to make a page size of 600x900 work without throwing the layer masks and such all out of whack... Does anyone have any definitive ideas?

I've also noticed that imput text fields (and dynamic ones as well I think) leave a 10-15 px trace of themselves on the underlying frame while the page is being turned.

Thanks

Posted by: Wes on April 15, 2004 04:33 AM

Great stuff this, and version 2 is highly impressive. As with others on here I'm hoping to implement this in either a final project or my portfolio when I get around to doing it in the summer. Keep up the good work and I look forward to haveing a look at the V2 .Fla version when it is released.

Dave

Posted by: Big Dave on April 15, 2004 04:00 PM

Tryed to download the file but it wont open.
Flash says it's in an unexpected format.
hmmm.

Good work!
Thanks Robert

Posted by: Robert Singleton on April 17, 2004 05:12 AM

Yohh Macc can you put external files on the pages in v2 like swfmovie on the pages if this is possible...

Posted by: esogut on April 17, 2004 12:23 PM

Will this be available soon either for free or for $$$? I could REALLY use a version that could incorporate JPEGs from an external directory with a simple next page/ prev page navigation method.

Posted by: Scott Griebel on April 17, 2004 06:28 PM

Incredible! Great job, guys. This thing has it all.

One little suggestion/request, if that's not being too demanding, since I don't know you, but:
Is it possible to give the hardcover an edge, some dimension when it turns, so as to look more like a book cover? Either way, it's great. Just a little thing.

Posted by: Joel on April 20, 2004 12:05 AM

You have did a wonderful job compared to the other book tutorials are clips that I've seen.

Great job!

Posted by: Pamela on April 20, 2004 05:27 PM

Hi Macc! I'm really impress with your work, count me as one of your fans. :)
I just learned you now have a new version and It's more cool, I saw it a while ago. Can you pls share the fla to us.
Thanks for sharing your work.

Posted by: Cecil on April 21, 2004 07:39 AM

Just a heads up on the PageFlip v2.
My company decided to fund the development of v2 so it would come out faster.
Macc tells me that it will be avaliable for us all to play with by Monday.

Not looking for a pat on the back but I know a lot of you (myself included) were very interested in the second version coming out as soon as possible.
I do urge everyone who uses this in a commercial capacity (or if you just particularly like it) to send Macc money (he preferrs Western Union but I'll let him give you the address of where to send it).

-Wes

Posted by: Wes on April 23, 2004 04:50 AM

Hi,
Earlier today I downloaded the source code for the page flip, which by the way is incredible. Thank you so very much Macc. I have been playing around with it all day. I'd like to add a few more pages, but I'm having trouble. I have read through all of the above posts and tried to firgure it out. I successfully added a 9th page but it is only on the reverse side. It's like I skipped a page. Can someone help me figure out where I'm going wrong? Thank you...

Posted by: Amanda on April 23, 2004 07:10 AM

Thanks Macc!

tis' beautiful.

Kurt Dommermuth

Posted by: Kurt Dommermuth on April 23, 2004 07:06 PM

Thanks Wes ... thanks Macc ... when i use it commercially i will defintely send some money to Macc.

I will check back Monday to see if it's available.

Posted by: Lawro on April 23, 2004 07:36 PM

can¨t wait till it's monday,
it's gonna be a good day :)
(can't wait can't wait :)

Posted by: Christian on April 25, 2004 06:41 PM

whats your address MACC
i'll have my hungaryan aunt drop by and give you i big kiss and maby head massage, this one must have been a headhurt:)

Christian Rajkai / DENMARK

Posted by: Christian on April 25, 2004 06:45 PM

Has anyone else experienced this. When I embed the flash swf into an HTML file and then run the HTML the flash doesn't work correctly - The pages do not flip. Only the first page flips but it doesn't stay put. Once you move your cursor to the right in preparation to flip the next page, it doesn't release the first page and so the first page comes back to the right side.

Thanks
James

Posted by: James on April 25, 2004 08:00 PM

I tried to load image externally with:
pages.p1.page.pf.ph.createEmptyMovieClip("pag1", 1);
pages.p4.page.pf.ph.createEmptyMovieClip("pag4", 2);
pages.flip.p2.page.pf.ph.createEmptyMovieClip("pag2", 3);
pages.flip.p3.page.pf.ph.createEmptyMovieClip("pag3", 4);
pages.p1.page.pf.ph.pag1.loadMovie("page"+p1+".jpg");
pages.flip.p2.page.pf.ph.pag2.loadMovie("page"+p2+".jpg");
pages.flip.p3.page.pf.ph.pag3.loadMovie("page"+p3+".jpg");
pages.p4.page.pf.ph.pag4.loadMovie("page"+p4+".jpg");

but everytime i click, the images load again and the page flick.
How can i correct it to load external images?
Tnx.
P.S. Congratulations!!! Veeeery good project!!

Posted by: Mr.Dongle on April 25, 2004 10:06 PM

I think Derik Lolli and Mario Klingemann had the answer to the problem of the pages "sticking" and it was that you should set it to 100% and stage.scale="noscale". I'm sorry but I'm a newbie so can either one of you explain what this means. Where do I set the 100% and where do I add the "Noscale" statement.

Thanks, Much appreciated.

Posted by: James on April 26, 2004 03:58 AM

is it monday yet...?

:)

Posted by: christian on April 26, 2004 01:50 PM

I await the fla with great anticipation ... :)

Posted by: lawro on April 26, 2004 02:48 PM

Macc finished v2 this weekend (Sunday to be exact). Now I'm trying to coordinate with him where to host the v2 zip.

Posted by: Wes on April 26, 2004 03:46 PM

Macc still wants to add a preloader and working buttons on the pages.
He tells me he will post it tonight. He is GMT+3 whereas I am EST or GMT-5.
Just keep a close eye on his site http://www.iparigrafika.hu/ for him to post it.

Posted by: Wes on April 26, 2004 04:14 PM

AHHHHHHHHHH

Your killing me. The antisipation is just killing me!!

I know it will be worth the wait.

Posted by: wilber on April 28, 2004 07:04 AM

Hey Macc,

Just watched the demo version.......WOW !!!! That looks great. Thanks for taking the time to create such an awesome feature. I'll be checking back for the source code.

Posted by: Hananya on April 28, 2004 09:17 AM

'llo there,
this is fantastic work, I'm frankly gob-smacked.
I made a page-turner for myself but fell back on a timeline controlled by script as I couldn't figure out the fully scripted version! Its not as smooth or elegant, or as clever!, but it can be dragged around and depth-swapped and all the elements are loaded externally. Its at www.andyfoulds.co.uk in 'webdesign' in the 'samples' section, 'coffe table books'. You can toggle between rollover operation and click-and-drag as well.

Posted by: Andy Foulds on April 29, 2004 04:48 AM

Agree...love to book.

My question is regarding V2...will it include the ability to load exteral objects like swfs, jpgs, flvs.

I was successful in modifying size and pages but when I try to add flvs using the media componant the reload. I've noticed others are having the same issue.

Is there a work-around or fix in V2 or the current version.

Peace.

Posted by: Berryb on April 29, 2004 05:55 PM

Sorry yall for not posting the link, Macc wants to post that himself. But as one who has seen and played with the v2 source, I think I can answer a few questions about it:
You can externally load anything that Flash can render as an object.
It explicitly supports loading any image file type that flash knows how to deal with without an external converter (i.e. no .tiff or .psd files). It also is able to load .swf files as well (which Macc has included scripting support to let the page know when it is loaded and turning and setteled...
I haven't tried loading .flv or any other movie flie but I imagine they would work the same as an image, provided Flash dosen't need an external converter to understand it.

There is a dynamic and a non-dynamic version of v2. The dynamic version takes a bit longer to load than it's counterpart, and Macc is working on the preloading animation for that.

Posted by: Wes on April 30, 2004 01:20 AM

Thanks for the update. That's good to hear! Any idea when the source is available?

Posted by: Berryb on April 30, 2004 02:45 PM

"will be ready FOR ALL by the 25'th"
and then COMPLETLY silence for a week...
humm, this does smell right...

Posted by: kylie Minouge on May 1, 2004 03:39 PM

this guy uses the page flip really well in his portfolio.
http://www.ds03.de/

click on projects

Posted by: vince on May 2, 2004 06:38 AM

Yes the site looks good, only the page flip is just the keyframed version.

Posted by: Mario Klingemann on May 2, 2004 11:19 AM

antother page turner http://dirtypaper.cruz.be

Posted by: brent valskur on May 2, 2004 05:52 PM

I'm sorry to be awkward, but i'm getting a bit confused with the stuation here. I've been interested in this code from a very early stage and i was led to believe that v2 would be available free, however Wes has paid money for the code and has recieved the source for V2 ... do I now need to pay money in order to recieve the source? I don't want to appear ungratefull as i think what Macc is doing is utterly fantastic, but i just want to know the situation so i can make a judgement call ... if it does cost money then how much ?
Once again i will stress that I'm not someone who expects to benefit off other peoples hard work for nothing ... but i just want to understand where i stand with this.
Thanks

Posted by: lawro on May 3, 2004 04:51 AM

Hi everybody!
What a nice day!!!
PageFlip V2 is online at http://www.iparigrafika.hu/pageflip/
The sourcecode is available for download in the book's page 3. Just click the link.

Posted by: Macc on May 3, 2004 03:32 PM

a good day indeed :)

Posted by: lawro on May 3, 2004 03:34 PM

Great Job Macc
I've been waiting to see the updated version of your PF.

Isn't there a way to show (even if static) more pages in the background so that i can create the effect of a dye cut pages. (i.e. when a book is cut to show indices like in a dictionary).
I layered a couple of pages and only the nearest two pages are shown and new ones pop abruptly.
where can i increase the number of pages to be attached so that there depth is below the current top most page.

thanx man

Posted by: Basel on May 3, 2004 04:16 PM

Basel: it is possible.. but it can be very very slow if you have a 100 pages book.... Now you have only one page hidden behind the visible one...

Posted by: Macc on May 3, 2004 04:37 PM

Haven't had a chance to fully check out the source, but just wanted to say thanks for keeping it open source and for all the time you've spent, Macc. We really appreciate it (and it looks amazing).

It's going to be a long day.

Posted by: Greg on May 3, 2004 06:14 PM

Agreed, thanks for all your hard work!

One question: is it possible to turn the pages faster. For example, if I'm on page 3 and want to get to page 20. Can I flip through the pages quickly or is it just one at a time?

Thanks again for the great work!!

Posted by: Lynch on May 3, 2004 06:26 PM

nice job. thanks for your hard work. I hate to be the first newbie to enter into the ring, and risk getting my hand slapped, but if someone could clue me in as to best ways to customize w/o destroying the thing, that would be great.

Adding pages?

Changing size (is masking still a problem)

Moving nav off page, etc.

Thanks again Macc. World class code (and just world-class class, in sharing your code)

Posted by: tom on May 3, 2004 08:16 PM

Thanks for posting v2.

I read that this version allows for loading exterals...jpgs, swf, that sort of stuff. As soon as I downloaded v2 I tried exactly what I had tried with v1.x...bring a custom video player that plays .flvs into a given page. My player works and I've tested it online. However, when I bring the player (which is a self-contained movie clip) on to a page or try to load the player using loadMovie I still have the reloading of the loaded MC or flv.

In addition, with v2, however, the clip reloads even when I roll over th page edge(the corner).

Any Ideas as to why this is happening? You indicated, "dynamic page content"...am I missing something?

Thanks again for getting v2 up.

B

Posted by: Berryb on May 3, 2004 09:25 PM

I'm not understanding the loader or the how to load in external jpgs into the book... Anybody care to enlighten me?

Posted by: Greg on May 3, 2004 09:25 PM

Wonderfull code Macc and what a great thing to do by making it opensource. Thank You

Does anyone out there know how to load an external image in a page on V2 ???

Posted by: Lawrence on May 3, 2004 09:26 PM

Bloody marvellous!!
And an act of supreme generousity to opensource all this work. I expect to see alot of it about!

Posted by: Andy Foulds on May 3, 2004 09:47 PM

This is good stuff. Am really impressed with your work. It looks good and it works good. A brilliant job!

Posted by: Martijn on May 3, 2004 09:57 PM

I believe Wes mentioned there was a dynamic and non-dynamic version of V2 ... i guess this must be the non-dynamic source code.
Will the dynamic V2 be available soon?

Posted by: lawrence on May 3, 2004 11:14 PM

Macc, you can be rest assured that every time I use this you will get credit for it. This is just the best!! Great work m8!

Posted by: agro on May 3, 2004 11:33 PM

Finally !!! Congratulations!!!!! And now...some questions:
1) How can i load external swf or jpgs ?
2) How can i load dynamic content or use it trougth a XML code?

Posted by: Mr.Me on May 3, 2004 11:53 PM

About the loader :
Embed the loader to your web pages and it's him that will load automatically the pageflip

Posted by: Laurent on May 3, 2004 11:59 PM

maybe it is because i am a coding idiot, but how do you get the gotoPage( destinationPageNo ); function to work? i can't seem to get it working properly

Posted by: matt on May 4, 2004 12:34 AM

Mac..

About loading more pages in the background... if the book is only 10 pages... it won't be so heavy... i can try and mess with the code, but i wanted to see if this feature is already built in the code.

All the credit will be given to you whenever i use this code.


Opensource rules!

Posted by: Basel on May 4, 2004 07:43 AM

Hey this is really SUPERB!!

One little question: Is it possible to use real text in the book?? so that I don't need to break the text apart every time. I need it for lot's of text that changes regularly.
It would be fantastic if there is a way to get the text trough a txt file!
Thanks for all this great work !!!!!!!!!!!!!!!!!

Posted by: JPX on May 4, 2004 10:41 AM

Hi!

I just uploaded the dynamic version of the pageflip_v2. But it is not so perfect i hoped... It loads 8 times every page, and don't want to load them from the browser's cache:((( I have plans for a totally recoded version, but it is time to finish it:) well, to be continued...

the URL of the dynamic loader version:
http://www.iparigrafika.hu/pageflip/pageflip_v2dyn.zip

Posted by: Macc on May 4, 2004 01:37 PM

JPX: real text is supported, but non system fonts!!! it can't be masked... You can use any FlashMX content on a page, whatever is it: Texts, JPGs, Animations, Movie (imported MOVs or AVIs, etc...)

One more thing: i removed old versions.

Posted by: Macc on May 4, 2004 01:40 PM

CompUSA has some version of a page flipping catalog on their site at http://compusa.dailyshopper.com/

It looks similar to some of the examples posted here but I can't really place it.

Posted by: Wes on May 4, 2004 04:33 PM

ok thanks Mac it works excelent now!
Is there a way that you or someone else makes a litle guide with the possibilitys and help with using these??
I know how to use most of the functions with the actionscript but there is one thing i need and i don't know how to use it.
How do i use a external txt file?
I need a book with lot's of text that comes out of a text file.
Can anyone help me with this?
And if it's possible i also want to give the txt file tags like bold and so on

Thanks JP

Posted by: JPX on May 5, 2004 11:12 AM

Wes: the compusa looks like the a version of the kinbook.fla

Macc: I am trying to load dynamic text inside page2.swf but it always reloads everytime the page is flipped ... is there any way i can stop this ??

P.S. I'm having great fun with this code ... :)

Posted by: lawrence on May 5, 2004 05:53 PM

JPX:

You can load variables from an external source that can spit out variable=value pairs (text files require newlines between the variables so they are all on seperate lines).
if you have database content, you might consider using XML (but if you are new to it like me, you might run away screaming).

For formatting, you want to make the dynamic text region able to render HTML. I think it does it by default in the pre 2004 versions of Flash. From there you just use HTML as nessacary.

Posted by: Wes on May 5, 2004 11:22 PM

Thank You Wes and Mac!! you've been great help for me!!

Posted by: JPX on May 6, 2004 09:38 AM

Ya know, I am supprised that nobody has mentioned an actionscript (.as) file for loading external data. At lease I think nobody has. I have a .as file that loads external data, and anybody can edit it. You can even use notepad to edit it.

Posted by: AGRO on May 6, 2004 02:22 PM

AGRO: I'd like to take a look at that .as file if it is avaliable.

Anyone else here working on a gotopage() function that flips to the target page without flipping through all the pages in between?

Posted by: Wes on May 6, 2004 03:19 PM

Hi Everybody,

Has anyone figured out how to make the page turn on a click instead of dragging the mouse accross? I noticed that if I drag that page slowly, the page likes to follow my mouse back over to the right again.

thanks
Shaun

Posted by: Shaun Roos on May 6, 2004 11:30 PM

I got the resizing issue resolved. From Macc:
no problem. you have to increment the size of 4 element:
(manually or from a script)

pages.mask: from 800x1500 to 1200x2500
pages.pageGrad: from 150x1500 to 150x2500
pages.flip.p3Shadow: from 100x1500 to 100x2500
pages.flip.flipGrad: from 400x1500 to 400x2500

This sets the gradients and some of the masks to be the right height, but the code resizes the width. What I ended up doing was changing 2 lines in the calcx() function, in the flip forwards and flip backwards if blocks to:
pages.mask._xscale = 150; // if
pages.mask._xscale = -150; // else

This allows me to use 600x900 page sizes without badly hurting Macc's code.

Next up is making that gotopage() function work without flipping through all the intermediate pages.

Posted by: Wes on May 7, 2004 12:56 AM

Ok...
1. So, opened it in MX04Pro and trying to publish with player 7 and AS 2.0 or 1 and says the script is running slowly and may cause my compter to lock.

2. I took my custom flv player (self-contained MC) and put it on page three.(opened page three .fla and added it). Then uploaded the book to my server and ...video does not play. If I access page3.swf directy by typing in the url it plays fine.

I'm going to re-download the source and start from scratch, but if there are any suggestions in the meantime, please advise.

Posted by: Berryb on May 7, 2004 02:01 PM

Re-downloaded, started from scratch and same thing happened. page3.swf worked fine.

This time something new happened, and it happened more than once. When accessing the book, it never loads but I hear the Video's audio, then another instance of the video must load because I hear it again, and no book. Very strange? I've been trying everything I can think of.

Posted by: Berryb on May 7, 2004 02:32 PM

One more thing...if I play it locally, off hard drive, I get the following results:

Book always loads fine, but page three, which has the flv player, does not play or load the flv. If I just open page3.swf the video player is there and the video plays fine!

I am viewing this all throgh a brower, not the standalone player.

Posted by: Berryb on May 7, 2004 02:37 PM

hi,
it was a great stuf i have a little query i am loading the images dynamicly for the image folder and it is running perfactly but when i put it on the server it is not displaying the images

pls can u help me

bye

Posted by: pawan shekhawat on May 7, 2004 03:05 PM

Great stuff... however, I have a problem. I am loading 4 of the book swfs on to the main stage of a new movie, and want to make it so that depending on which book you click to turn the page, swapDepths of that movie to the top most level so that the pages go above the other 3 books. I know how to do this, however, what happens is that when you fist click on the movie to swap the depths, the main page turns invisible for a split second, then everything works fine after that. Any ideas how to prevent the pages from disappearing when you swap the depth of the MCs upon clicking them?

Posted by: Steve on May 8, 2004 12:05 AM

hey guys... i've added some code that shows the pages below so i can simulated die-cuts in paper.. ie, u can see indicies for pages. I optimized the clips so that when not in use they only show borders and what ever part that superimposes.


i'm now gonna work on page-tearing that will submit a form upon tearing the filled form. i'll add something like a listener and event broadcasting.

by the way macc, how do u get a teared page back in place without reseting the whole book?

Thanx macc...
Open source rules!

Posted by: Basel on May 8, 2004 10:20 AM

one more thing macc...
I am working on multiple page sizes (ie.. an insert in the middle) and want to change shaddows and other stuff based on the current moving page size... is that easy or shall i dig deep?

Posted by: Basel on May 8, 2004 10:23 AM

Hi folks, I am working on a Flash-CD and want to use the flash-bookV.2.(nonDynamic) The problem is to link the book in flash. I made a new scene with a movieclip, which contents the book and the script.
(I made the same with pageflipV.1 and there it works fine!!!)
But with V.2 it doesn`t work. On test it loads after the link-click nothing and then there came an alert that the code slows down the flash player and the computer will lock when i decide the script goes on...
@Berryb: it seems you have a similar trouble(?)
´
Has Anybody a Idee to fix the problem ????

I am only a grafik-designer not an Action-Script-Profi, so Thx for your help all the profis there and
sorry for my bad english ;)

Thx for sharing your excellent work @Maac

Posted by: LinuX on May 8, 2004 02:02 PM

Oh, forget the problem on top:)
Founded out: In Flash MX04 there is in the release settings standard Flash Player 7.0 marked,
with marked Flash Player 6.0 it works absolut fine.
Sorry for that stupid question ;)

Posted by: LinuX on May 8, 2004 05:51 PM

At http://www.ls-grafik.de/lived.htm
you can see my finished work:
A Book that i made 2003 with my best Photos.
How can i "show" the loader?
Actually you can't see how long it loads:(

Posted by: LinuX on May 9, 2004 02:44 PM

LinuX, probably the easiest way is to add a scene to your movie. Make your new scene the first played and add a loader to that scene.

Posted by: AGRO on May 9, 2004 05:00 PM

Hi everybody,

Thanx Macc and Wes for this amazing code.
But i've got a problem with resizing the pages to 490 x 600 in v2.
When i publish the swf and turn the pages, some pages are turned incomplete, sometime they do sometimes they don't:(
I resized every thing like Wes said in the comment up here, but still no luck. Anyone have a sollution?

Thanx a bunch

Posted by: Marshall on May 10, 2004 05:53 PM

AGRO: I'm interested in your external script!

Posted by: elgallo on May 10, 2004 07:45 PM

For my recent flashconference session I have started from scratch and created another page turn component. It is not as feature-packed as Maccs, but you can choose any pageformat you like. The current version is here:

http://www.quasimondo.com/archives/000376.php

I will try to add more features in the future, but perhaps for some people the current might be sufficient.

Posted by: Mario Klingemann on May 10, 2004 07:50 PM

Can i have a look at that actionscript agro ... or does anyone else know how to use dynamic text inside the pages without the text reloading everytime the page is turned ??
Macc .. can you help out?

Posted by: lawrence on May 10, 2004 09:46 PM

Hey great script - thanks very much for the post and script - one of the most eye catching flash scripts about !

I have seen a few posts on this (but alas not a solution) but I am trying to 'stack' the pages so that any tabs on the first page will still be visible once you reach page 4 or 5.

I think Macc had said (on post 3rd May 04) that it was possible but you wouldn't want 100 pages as it would become tediously slow - but is there a simple amendment to the actionscript to remove the deletion of the pages ??????

Again thanks !

Posted by: dc on May 10, 2004 10:07 PM

As far as the external .as file, (refering to the dynamic .fla) it is just the text in the first frame that you can edit. I just copy and paste that in the .as file, then deleted them in the .fla. It is really nothing special at all.

One of the bad things about having an .as file is that you need to republish your .swf when ever you make .as changes. Not alot of people know this who don't work with .as files, but when you publish a .swf, the .as file becomes part of the .swf.

So, .swf files DO NOT load .as files at runtime, they load the .as at publish time. Very important to know.

I have had a thought of having the .as file load from an .txt or .xml file. Not sure if that would work. Have to try something...

For the ones who would like the link:

http://www.ericvision.com/pageflip/pageData.as

Posted by: AGRO on May 11, 2004 12:45 AM

Wes, I'm trying to get exactly that. Sorry, I tuned out for a few days and didn't see your post. The good news is you're not alone, the bad news is I'm not very far in the process.

Let me know how you progress.

Posted by: lynch on May 11, 2004 05:29 AM

great code! Could use some suggestions on resizing pages, and also, I'd like to rotate the whole thing 90°. I tried making the whole thing a movie clip, but that just ended up in Flicker Land.

I've reviewed resizing tips from v 1, but not sure they apply.

From the sounds of it, the dynamic fla is less stable. Is this correct.

Thanks, all.

Posted by: tom on May 11, 2004 04:56 PM

Does anybody know how to make animations or movies only start playing when the page is openened (and possibly let them stop when the next page is openened). Thanks

Posted by: Martijn on May 12, 2004 11:02 AM

Just to see! Great Great Great! Thx a lot for the dynamic version...

Posted by: Cop on May 16, 2004 10:16 PM

u guys should check this site out
www.stovila.com using MACC code.

i couldnt download the code from the website anyway. As a matter of fact, i couldnt open the site :(

Can anyone offer me an alternative site to download MACC actionscript?

Awesome job by the way, i am a big fan of actionscript and cant wait to get my hand on your codes. Open source rocks!

Posted by: alvin on May 17, 2004 01:38 AM

Hey I played with the program, the only problem i have is that i want a nice preloader with % end an progress bar.
I already have these scripts and they are working fine on other flashes but not on this flash the scene with the progress bar and % is invisible untill it's loaded for 95% does anyone know a way to get something like this working??
I also tried mac's preloader but it didn't really show anything during the load procedure and i don't want a external file.

Thanks JP

Posted by: JPX on May 17, 2004 04:01 PM

Has anyone come across problems adding more than 10 pages? I'm trying to do a resturant menu and it has 22+ pages and i'm getting errors where the pages are not turning but you get a "ghost" page turn, also is there a way to get the current page to know what page it is (eg pass it a variable?)

see my pages query a database which populates the text of the pages, and the file will be even smaller if the same page could be used to populate the 22+ pages that where needed,

Thanks in advance.

Posted by: Kal El of Krypton on May 17, 2004 11:00 PM

Hi to all, this demo looks amazing!

When I try to download the source fla it is gone though. Does anyone have a link to it still?

Thanks

Posted by: Matt on May 18, 2004 07:18 PM

Oh... one question! Mario...
I need to use an interface with the flipbook like this page : www.makro.be

I suppose that I can use the clickarea to use a next/previous buton?

Thx in advance

Posted by: Richard on May 18, 2004 08:02 PM

where is the source file? page is gone.....

Posted by: mike on May 18, 2004 08:44 PM

Macc had removed the old pageflip. I've updated the link now, it points to the new sourcecode.

Posted by: Mario on May 18, 2004 09:10 PM

Hey i'm making really great things whit this pageflip!!

I only have 1 problem....
My complete book works fine only the hard cover has a big problem when i look at it online.
When i click on the cover to turn it it disappears fot a second like a flicker this is not nice...
He only does this when i visit the book for the first time so to see it you need to clean your browsers cache.
The book also has this problem at ipagrafika's site.

Can anybody help me with this problem or is it just this way and do i need to accept it.

Thanks JP!

Posted by: JPX on May 19, 2004 11:41 AM

richard-- next page forward is simple

buttonnamehere.onRelease = function ()

gotoPage(No. here);
[or ]
autoflip();


However, haven't figured out going backwards. Anyone?

Is there a variable that stands for current page, so we could use gotoPage (variable-1) ?

Posted by: tom geary on May 20, 2004 09:00 PM

Hello Jpx.. thx but i have found the solution. For the backwards direction (gdir), see below...

Mario, your code is great. Preloading version??

To go to the previous page :
on (release) {
aflip=false;
flip=false;
flipoff=false;
canflip=true;
gdir=-1;
gflip = true;
autoflip();
}


To go to the next page :
on (release) {
aflip=false;
flip=false;
flipoff=false;
canflip=true;
gdir=1;
gflip = true;
autoflip();
}

To go to the end, begin of the flipbook :
on (release) {
gotoPage(XX);
}


Posted by: Richard on May 23, 2004 09:42 PM

Hey i've got one (hopefully) last problem......
I've set the size of the swf in my html site in 100% because i want the book to resize to the max of the screensize.
This won't work, when i load the page it's still the original size.
When I F5 or Refresh it does go 100%
lokk here for the example: http://www.pannenhuis.nl/paginas/menukaart.html
i've been thinking of a automated refresh but this is'nt an option because of the refresh loop it get's when i do this.

Does anyone know a way to deal with this????

TNX!!!
JPX

Posted by: JPX on May 24, 2004 09:56 AM

anyone figured out a way to print a page???
I'm stuck on this feature i can't get it done

Posted by: Janpieter on May 24, 2004 02:21 PM

Richard, thanks for the forward / back code, above.

Here's a question, people: what's the variable used for the page displayed on the right?

I'm trying to link some text dynamically to the pages.

Or, if I add a counter, it seems like there are a few places where the pages flip forward / back.

Posted by: tom on May 24, 2004 07:49 PM

Great code and it will defintely save me time... Question???
It seems like everyone is looking to resize larger but what about smaller. I'm looking to use this is a smaller area of a bio page for a model site I'm creating. How would I make things smaller on this???

Posted by: Seanc on May 25, 2004 04:05 PM

thanks for sharing, excelent job.

Posted by: william Mora on May 28, 2004 07:36 PM

anyone figure out the preloader issue?!

Posted by: elgallo on May 31, 2004 06:08 AM

Never mind - got it!

Posted by: elgallo on June 1, 2004 05:17 PM

Hi,
I wanted to know how you can rip a page off using only a button. Anyone tried this. I'd like to to this feature on a message page where the a onpress action will send the message but at the same time also tear of the page.

Thks,
Smalco

Posted by: smalco on June 3, 2004 01:38 PM

Hi all,

I'm also having the same resize problem