Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Vertical Page Flip



I've seen a lot of examples on page flipping, and they appear to be too complicated for what I want. I don't necessarily need an actionscript- driven page flipping engine with dragging and all that.
I'm just having a bit of trouble visualizing how a vertical page flip would look like (assume the spiral is on top of a notebook) because of the whole non-existent z-axis thing.
The functionality that triggers the animation is simple. Click on a button, the page flips vertically and goes 'behind' the notebook.
Has anyone tried this, or has seen anything like it? Can anyone point me in a direction regarding particular animation techniques to achieve this effect?

Thanks,
Chris.



Ultrashock Forums > Flash > Flash Professional
Posted on: 2004-02-02


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Vertical Page Flip
Does anyone know how to create the effect that organic.com used in their portfolio section? Thanks for any and all help!!

Organic.com

Flip Horizantol And Flip Vertical Problem
hi to all
i have a movieclip (rectangle converted into symbol) then i add a uiloader to it and load dynamic image to uiloader at runtime then i have two buttons.
flip horizantol button and flip vertical button. both works fine but after flipping the x and y position of movieclip changes when i view the flipped image to next frame it moves to left if i flipped vertical and moves to upside if i flipped horizontal.. how can i change the flipped movieclips x and y to original x and y of unflipped movieclip?


regards
..maani

Looking For Page-Flip/Flip-book With Spiral Binding?
Hi there,

I'm wondering if anyone has come across a Page Flip application (like this: www.iparigrafika.hu) that uses a Spiral ring binding, like a notepad?

Pixelwit Page Flip - CLICK To Flip Instead Of Drag
I love pixelwit's page flip script, but I'm hoping someone could teach me how to modify it so that instead of having to drag the page across the screen, the user only has to click the corner of the page in order to get the page to turn.

Here's an example: http://www.luckymag.com/magazine/flipbook

It may be too much of a departure from the current script, but I thought I'd put it out there.

You can download my test file here: http://www.jessicaberardi.com/pageflip/test.zip

I know there are pre-made scripts out there that do this, but I hate the way they look (too high-tech and over designed). I'd really like to use the script I have or find another one that also has a simple, clean and modern look.

I'd really appreciate any help on this.

Piece Of Paper Flip, Not Page Flip In A Book
Could any body direct me to a tutorial or just give me advice on how to go about doing this: i want to make a letter come out of a envelope and flip around and then show what is on it, i am not sure how to create the paper flipping around , i did see some page flip tuturoials but i dont think that is what i want technically, any help will be greatly appriecated, thx

Flip Vertical
Is it possible to flip a letter vertical, as in a full 360degree flip.

If you type a T and create a new keyframe at frame 20 and then another one at frame 10. Now on frame 10, you can click modify, transform, flip vertical. However, from frame 10 to frame 20, it reverts back to the original position. It does not continue to flip.

Vertical Flip
Hello,

re:
http://ptonline.ca/

Right now this word flips down vertically, but does so in a somewhat slanted fashion. Is there a way to make this word flip vertically so that it appears to be flipping straight down rather than in this slanted manner?

Thank You

Tom

Flip Vertical Actioscript
Hello!

Is it possible to flip a movieclip vertically on stage with actionscript?

darth

Rotating A Movieclip To Flip Vertical
Imagine the movie clip is a business card. The text and images are dynamic

I want to 'flip the card' (bring the top of the card towards me and the bottom away) to rotate the card around to see the back of the card

I would really like to do this in actionscript. Can anyone point me in the right direction?

Page Flip Won't Flip On Revisit.
Here's the test link:

http://www.dfhdesign.com/routt_testsite/home.html

On this page click the link at the bottom right that will take you to the wedding albums page.
This page loads fine, the page flips....
Then click the weddings link, engagements link, or bridals link. (either one will work)
On either of these pages click on the albums link, this will take you back to the wedding albums page.

Here's the problem:
On the revisit of the albums page, the page won't flip.

I can't figure out why.
Thanks for any help you can offer.

Dave

Flip Effect - NOT PAGE FLIP
I've searched for tutorials on this but I can't seem to find anything on how to create simple flip effects. I'm not sure if it's some other program than flash or just someone with awesome animation skills - here are a few pages I found on Monster that has this effect.

This looks like its done straight in flash:
http://www.templatemonster.com/flash...tes/15402.html

This looks more like some kind of 3d program:
http://www.templatemonster.com/flash...ates/9369.html

Either way, I'd like to learn - Any Ideas?

Page Flip Won't Flip On Revisit.
Here's the test link:

http://www.dfhdesign.com/routt_testsite/home.html

On this page click the link at the bottom right that will take you to the wedding albums page.
This page loads fine, the page flips....
Then click the weddings link, engagements link, or bridals link. (either one will work)
On either of these pages click on the albums link, this will take you back to the wedding albums page.

Here's the problem:
On the revisit of the albums page, the page won't flip.

I can't figure out why.
Thanks for any help you can offer.

Dave

Flip Horizontal / Vertical In Actionscript (flipping MovieClip)
I need to know how to flip a movieclip vertically / horizontally like in

modify - flip horizontal
modify - flip vertical

But in actionscript, and i've tried ._rotation, and it doesnt work properly, it messes it up

Actionscript To Horizontal/vertical Flip Loaded Movies
i need to make a button that flips a movie i've loaded, then flips it back. so basically, a command that toggles the horizontal and vertical flip. please let me know if you know how to do this. thanks.

Page Turning Effect (NOT Page Flip)
Hi,

Anyone know how to emulate this page turning effect on http://artpartner.com/? I've investigated the various page flip effects but the client wants it super simple and without the page curl touches.

Thanks.

Page Turning/Page Flip
Hi,

I need help on this page flip, i mean i can't just go directly to the desired page when clicking a button....let say for instance,page 5 as in the attached file. I dont know the script that enable to go to page 5 directly when clicking on the button.

Thanks!

Page Flip, Reset Page Help
I have been working with this beautiful pageflip script kindly provided (opensource) by Macc (http://www.iparigrafika.hu/pageflip/)

My problem is this...

Every time you mouseover a corner of the page, the pages are reset, therefore resetting any animtion that is within the page.

I was wondering if anyone would like to take a shot at making it so that the movie clip on a page doesnt play until it lands, and once the page has landed the animation plays through, and then stops at the end... and STAYS stopped even if you mouseover a corner (instead of being reset).

I have a stripped down version of the code supplied here. I took out all the inbetween pages so it will be easier to work with.

ANY help would be appretiated, and please repost the fixed FLA file for everyone else to see.

Thanks Again,
Danny

Page Flip
I need lots of help, I'm trying to find a tutorial where I can learn how to make a page flip. Can anyone help me?


Xanthos:

Flip Page WTF?
I stumbled on a site aboout 3 weeks or so ago, and it basicly has a section for a online catalog... and you litterly flip thru it like a book, you click and drag the bottom right cornor of it and it gos thru to the next page... well I am having a hell of a time trying to re-make this idea, and ideas on how they have done that or ways and samples on how i can do that?

More Page Flip
After reading the answers about topics "page flip" and "page turning" I ask for you experts of scripting that help people like me (a poor mortal):

I need a pege flip more like the Volvo XC90 presentation: page turning in one click (i.e. to attach a link to especific pages with especific content - like a menu functionality).

Thanks for all answers.

Corda

Hello, Who Can Help About Page Flip
i'm looking http://www.actionscripts.org/showMovie.php?id=459, i want ask how can i make "onRelease" auto page flip ?
like http://www.esol-group.com/client/mcd...4/project.html
just click to do page flip ~ please help me, Thank !!

Page Flip Help
I am using the Page flip open source from this site http://www.iparigrafika.hu/pageflip/
Fantastic script and completely free.
I am only having one issue.

I am trying to load the book into another movie clip. When i unload it and try to load it again it does not work.
It has something to do with removing the mouse listener.
If anyone can take a look and let me know the actionscript for this particular file.. please let me know.
Thanks alot
Mark

Page Flip In AS3?
Hi all, PageFlip v2.25 is an open source Actionscript 2 flip book application (http://pageflip.hu/free.php). I can't seem to find any open source Actionscript 3 flip book apps, so I was going to convert the AS2 environment in PageFlip 2.25 into an AS3 one if no one knew of any such applications. Does anyone know of any free/open AS3 flip book apps? Thanks.

[F8] Page Flip
Hi all

I need some code or component for a page flip effect. Does not need to scroll, just flip over ie, hard cover. The problem is that I pull the images via an xml doc from an external website by the use of specific identifier number. Is this possible at all?

I would be grateful for any help, as this is quite urgent.

Page Flip
Dear All,

I have tried adding page to the attached script, but ends up - Shadow is flipping not the page.

Can someone please assist? Thanks in advance

Page Flip AS3
How can i make a page flip animation in cs3 with as3

Page Flip
Hi everyone,

I've been searching the web for page flips. The thing is, I'm a JAVA programmer with little knowledge in actionscript. I had a page flip that was fast enough to load, but it was not practical, cause I had to open the .FLA every time I wanted to change the content.

So I did a new search for page flip with XML, I found and was able to add some stuff I wanted, but it is very slow to load. The flip:

http://www.oab-rj.org.br/swf/flip.swf

So, if anyone can show me a better one, that loads the pages when it comes to the screen, instead of before, or show me how to do it, I would very much apprecciate it!

Thank you,
Guilherme.

Page Flip
I found this fla on this site and I was wondering what I would need to change in the code so when the movie loads it starts on the first page rather than the front cover?

http://www.actionscript.org/showMovie.php?id=459

Page Flip
I posted a message a couple of days ago about a movie I found on this website of pages flipping and asked how you could get the movie to load from the first page rather than the front page.

I found the section of code about hiding pages before page 1 and after the last page and found that after getting rid of the code to hide the page before page 1 then it shows opens on the first page opened. But it's a clear page, not the same colour as the rest and I can't put anything on it. I've been looking at the script all day and can't figure out what else to change because I'm not a very strong actionscripter. Can anyone help me please?

The link to the movie I found on this site is:

http://www.actionscript.org/showMovie.php?id=459

Page Flip Help
Hi--

I wondering how to do a few things with the page flip fla from http://www.triquitips.com . I searched some other threads and found some useful info, but, what if I need the pages an irregular shape (ie not rectangular) and to be able to see the second, third, etc pages from the first. Also how to flip it so it opens vertically and automatically flips at a given time rate. This is a lot, I know. I'd also need to have it done by today, so you can get back to me with any answers or to tell me that that's not possible(to finish that by today).

Any help would be appreciated.

Thanks

Page Flip
hi guys!
i have a little problem in modifying a move downloaded here:
http://www.actionscript.org/showMovie.php?id=459

it's the quite famous pageflip. nice, useful and everything but can anybody tell me how to insert some new pages?

i know i have to change the value of variable "maxPages" and that "print clips must have same linkage identifier as instance names" but nothing - i add the pages, create clips for new pages as explained and... i can see the pages but not the clips attached on them.

i also noticed thath when i go after the 9th page, in the output panel a message that sounds like this (i'm actually working with the italian version):
"Error: a 'with' action failed because the specified object doesn't exist"

i hope in someone who can help me with this...
thanks yuo all

Flip Page
Hi.

I want to build a flip page with a few more features then you usually encounter. And because i'm not keen with starting from scratch i would appreciate if anyone know a good source to start on. Execept from the many links on Google that lead to the same thing.

Thank you a lot.

Page Flip V2....Help....
Does anyone know how to get a movieClip to play on one of the pages within PageFlip V2, without it restarting when you mouse over to flip the page....What i want is a MovieClip to play and then stop at that position no matter what page you flip to....Instead it reloads the second you mouse over one of the sides to flip the page....Any help would be great....thanks....

Page Flip
Hi.

Im making a site out of the wonderful page flip code, and I want to add some things. Mainly I want to add a sound when you flip the pages. Also I need to do some kind of a menu, so that you wouldn't have to flip all of the pages to get to the other side. Similiar to: http://www.iparigrafika.hu/pageflip/ at the very end.

Thx for all of the help, and here's my fla:

http://bohner.asdf.pl/darek/asdf3.fla
http://bohner.asdf.pl/darek/asdf3.html

The thing is still in progress, I want to do the code first.

Page Flip
Hi Guys,

I am looking for a page flip in flash kinda like an album through which you flip through right to the end. I came across a couple of them but all of them needed the user to drag the corner and turn the page. Can I get the same thing but where the pages automatically turn after a period of time. I need this urgently.

thanks in advance.

Page Flip
I want to create a book with four flip page with Flash MX2004
as I ama compete begginer in action script
i would like a step by step guide of how to do it and the relevant action scripts

Thanks

Page Flip?
Ok I got the page flip .fla from here: iparigrafika ...
My question is this:

How do you resize the pages without everything getting screwed up?

I want to have it as an external .swf that I can load into a emptymovieclip but I don't know how to get everything in a certain size??

Thanks for any help!

Page Flip
Hi there, i have a flash movie, one of my friend created it for me, now i have to edit it, the original file is loacted at www.indigopublishers.com/demo/car
now i want to add extra pages to this and add another feature to zoom so the people can read the actual content of this file, can anybody help please.

If ()?:; And Page Flip
Hey!
My first question is using the short hand if ?: what is the "proper" way of terminating the else statement eg:
(x==1)?trace("A"):; //returns and error because no else statement defined
(x==1)?trace("A"):null; //no error but is it correct?

My second question is about the page flip
http://www.iparigrafika.hu/pageflip/
http://www.page-flip.com/
In england we have these exams called GCSEs which are the first and only nationally compulsory exams in england (14>16). I am doing art graphics and I was looking into the page flip experiments. Above are the links. I got the source code but I honestly can not understand it. There are so many randomly named variables and so much random stuff that I cant understand it. For me it is not good enough to just copy and paste. I need to understand the script and make it my own. I tried creating some things using trigonometry and I think I have the basic idea but I just can't get it working exactly right. Is there ANYWHERE that explains the code/concept of the page flip? Please help me

Thanks for your help again,
Dan

Page Flip V2....Help....
Does anyone know how to get a movieClip to play on one of the pages within PageFlip V2, without it restarting when you mouse over to flip the page....What i want is a MovieClip to play and then stop at that position no matter what page you flip to....Instead it reloads the second you mouse over one of the sides to flip the page....Any help would be great....thanks....

Page Flip
Hi.

Im making a site out of the wonderful page flip code, and I want to add some things. Mainly I want to add a sound when you flip the pages. Also I need to do some kind of a menu, so that you wouldn't have to flip all of the pages to get to the other side. Similiar to: http://www.iparigrafika.hu/pageflip/ at the very end.

Thx for all of the help, and here's my fla:

http://bohner.asdf.pl/darek/asdf3.fla
http://bohner.asdf.pl/darek/asdf3.html

The thing is still in progress, I want to do the code first.

Page Flip
Hi Guys,

I am looking for a page flip in flash kinda like an album through which you flip through right to the end. I came across a couple of them but all of them needed the user to drag the corner and turn the page. Can I get the same thing but where the pages automatically turn after a period of time. I need this urgently.

thanks in advance.

Page Flip
Hi
Can anyone suggest me a way preferably using Actionscript to achieve what is done in the following URL ?

http://media.greenfieldonline.com/me...ip_loader.html

Thanks.

Page Flip
I've downloaded the pageflip from here as i think it would be pretty usefull for the guides/brochures we make at work. The only thing im usure of is, obviously as the page can only be made to a certain size, to fit in the majority of windows, is there a way i can zoom in on each page? for instance if i use this to display a brochure of our the text will be un readble, is there a way the user can then click on the page, the page is then enlarged so the text can be read?

Page Flip Help
so i downloaded this cool page flip book from

http://www.iparigrafika.hu/pageflip/

when you click on the bottom of the pages they flip over to the next page.

would anyone know how to do this with using the arrow keys? so when i use the left arrow the page flips back and the right moves forward.

Low Fat Page Flip
Hi,

has anyone got any ideas for, or even seen a very low cpu intensive page flip effect?

Thanks!

Page Flip
I did a search on the forum and all I got was a walkthrough... I just want to be sure I understand. Is there a separate component to making a "flip page" look. And if so, do I have to buy it? From my google search that's all I got... Is it possible to have that look without buying components? Is there a ready component for free?

http://www.riverclark.com

this is the look my client wants...

Page Flip Effect?
I'd like to learn how to get the page flip effect in Flash 5. Anyone have knowledge of a .fla with this effect?

This one is in Swish: http://flashkit.com/movies/Effects/E...73/index.shtml but Swish files won't open is Flash.

Thanks!

Rick

Add New Pages To PAGE FLIP
Guys

I have the code for page flip.fla, but cannot add more pages,
have tried everything...

please help, much, much appreciated

code as follows

stop();
//
_________________________V A R I A B L E S
_level0.pagesAbs
_level0.pagesAbs = this;
var pageWi = 305;
var PageHi = 410;
var pageWiHi = pageWi+pageHi;
var pivotY = pageHi/2+pageWi;
var pageColor = 0xffffff;
var dir = 1;
var flipPage = 1.5;
var curPage = .5;
var maxPages = 10;
when auto-closing
var autoStep = .05;
var dragging = false;
//
// ________________________________R U N O N C E
//
this.attachMovie("cornerButton", "RButton", 15);
with (RButton) {
_x = pageWi;
_y = -pageWi;
}
this.attachMovie("cornerButton", "LButton", 14);
with (LButton) {
_x = -pageWi;
_y = -pageWi;
_xscale = -100;
}

pageInit(flipPage, dir);
_y += pivotY;
//
// _____________________B U I L D F U N C T I O N S
//
// Create a left-aligned page-sized solid fill raised one pagewidth
function makePage(targ, xQuadrant) {
with (targ) {
beginFill(pageColor, 100);
moveto(0, -pageWi);
lineto(0, -pageWiHi);
lineTo(xQuadrant*pageWi, -pageWiHi);
lineTo(xQuadrant*pageWi, -pageWi);
endFill();
}
}
//
//
// Create a left-aligned page-sized shadow gradient raised one pagewidth
// Shade is used to add depth to stationary pages
function makeShade(targ, xQuadrant) {
with (targ) {
// Defines gradient used as shadow overlay
var colors = [0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000];
var alphas = [40, 25, 15, 5, 0, 1, 6];
var ratios = [0, 1, 17, 51, 89, 132, 255];
var matrix = {matrixType:"box", x:0, yageWi, w:xQuadrant*pageWi, hageHi, r:0};
beginGradientFill("linear", colors, alphas, ratios, matrix);
moveto(0, -pageWi);
lineto(0, -pageWiHi);
lineTo(xQuadrant*pageWi, -pageWiHi);
lineTo(xQuadrant*pageWi, -pageWi);
endFill();
}
}
//
//
// create a bottom-left aligned shadow gradient
// for animated shadows
function makeShadow(targ, xQuadrant) {
with (targ) {
// Defines gradient used as shadow overlay
var colors = [0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000];
var alphas = [40, 25, 15, 5, 0, 1, 6];
var ratios = [0, 1, 17, 51, 89, 132, 255];
var maxLength = Math.sqrt((pageWi*pageWi)+(pageWIHi*pageWiHi));
var matrix = {matrixType:"box", x:0, y:-maxLength, w:xQuadrant*pageWi, h:maxLength-pageWi, r:0};
beginGradientFill("linear", colors, alphas, ratios, matrix);
moveto(0, -pageWi);
lineto(0, -maxLength);
lineto(xQuadrant*pageWi, -maxLength);
lineTo(xQuadrant*pageWi, -pageWi);
endFill();
}
}
//
//
// Place Stationary Pages
function setStationary() {
// Place the "S"tationary "L"eft "P"age
createEmptyMovieClip("SLPage", 1);
if (flipPage != 1.5) {
makePage(SLPage, -1);
SLPage.attachMovie("print"+(flipPage-1.5), "Print", 1);
with (SLPage.Print) {
_x = -pageWi/2;
_y = -pivotY;
}
}
// Place the "S"tationary "R"ight "P"age
createEmptyMovieClip("SRPage", 2);
if (flipPage != maxPages-.5) {
makePage(SRPage, 1);
SRPage.attachMovie("print"+(flipPage+1.5), "Print", 1);
with (SRPage.Print) {
_x = pageWi/2;
_y = -pivotY;
}
}
// Place shade on page not being revealed
var targ = dir>0 ? SLPage : SRPage;
targ.createEmptyMovieClip("Shade", 2);
makeShade(targ.Shade, -dir);
}
//
//
// Place the Flipping Pages
function setFlipping() {
var targ;
// Place the "F"lipping "T"op "P"age
createEmptyMovieClip("FTPage", 3);
makePage(FTPage, dir);
with (FTPage) {
attachMovie("print"+(flipPage-dir*.5), "Print", 1);
with (Print) {
_x = dir*pageWi/2;
_y = -pivotY;
}
}
FTPage.createEmptyMovieClip("Shade", 2);
makeShade(FTPage.Shade, dir);
// Place the "F"lipping "B"ottom "P"age
createEmptyMovieClip("FBPage", 4);
makePage(FBPage, -dir);
FBPage.attachMovie("print"+(flipPage+dir*.5), "Print", 1);
with (FBPage.Print) {
_x = -dir*pageWi/2;
_y = -pivotY;
}
FBPage._rotation = dir*90;
}
//
//
// Creates Shadows which follow edge of transition
function setShadows() {
var targ;
// Place shadow on the "F"lipping page
this.createEmptyMovieClip("FShadow", 5);
makeShadow(FShadow, -dir);
FShadow._rotation = dir*45;
// Place shadow on the "S"tationary page
this.createEmptyMovieClip("SShadow", 6);
makeShadow(SShadow, dir);
SShadow._rotation = dir*45;
}
//
//
// Create Masks to hide everything
function makeMasks() {
// Create mask for Flipping Bottom Page Mask
this.createEmptyMovieClip("FBPageMask", 7);
with (FBPageMask) {
beginFill(0x005500, 100);
lineto(pageWiHi, -PageWiHi);
curveto(0, -2*PageWiHi, -pageWiHi, -pageWiHi);
endFill(); }
// Create mask for Flipping Top Page
FBPageMask.duplicateMovieClip("FTPageMask", 8);
// Create mask for Shadow on the Flipping Page
this.createEmptyMovieClip("FShadowMask", 9);
makePage(FShadowMask, -dir);
FShadowMask._rotation = dir*90;
// Create mask for Shadow on Stationary Page
this.createEmptyMovieClip("SShadowMask", 10);
makePage(SShadowMask, dir);
FBPage.setMask(FBPageMask);
FTPage.setMask(FTPageMask);
FShadow.setMask(FShadowMask);
SShadow.setMask(SShadowMask);
}
//
//
// Hide pages before page1 and after Last Page
function limitBook() {
if (flipPage == 1.5) {
SLPage._visible = 0;
LButton._visible = 0;
SShadow._visible = 0;
if (dir == 1) {
FTPage.Shade._alpha = 67;
SShadow._visible = 1;
} else {
FShadow._alpha = 67;
}
} else if (flipPage == maxPages-.5) {
SRPage._visible = 0;
RButton._visible = 0;
SShadow._visible = 0;
if (dir == -1) {
FTPage.Shade._alpha = 67;
SShadow._visible = 1;
} else { FShadow._alpha = 67;
}
}
}
//
//
// How to position all pages needed for a page flip
// calls all functions listed above
function pageInit(cp, d) {
flipPage = cp;

dir = d;
// trace ("flip page = "+flipPage+" dir = "+dir);
setStationary();
setFlipping();
setShadows();
makeMasks();
limitBook();
}
//
//
//
//
//
// __________________F L I P P I N G F U N C T I O N S
//
// How to adjust position of flipping page
// based on a value between 0 and 1
function flip(curVal) {
var rot = dir*45*curVal;
FBPageMask._rotation = FTPageMask._rotation=-rot;
FBPage._rotation = FShadowMask._rotation=(dir*90)-rot*2;
FShadow._rotation = SShadow._rotation=(dir*45)-rot;
}
//
//
// how to determine position of flipping page
// returns a value between 0 and 1
// zero being no-flip and one being full-flip
function getPageRatio() {
if (dragging) {
// if dragging page position is determined by mouse position
// the 20 helps advance the turning page when the button is pressed
pageRatio = -dir*(_xmouse-startX-dir*20)/(2*pageWi);
} else {
// if not dragging; auto increment page towards final position
pageRatio>2/3 ? pageRatio += autoStep : pageRatio -= autoStep;
}
// if out of bounds
if (pageRatio<=0) {
pageRatio = 0;
if (!dragging) {
flipDone();
}
} else if (pageRatio>=1) {
pageRatio = 1;
if (!dragging) {
flipDone();
}
}
return (pageRatio);
}
//
//
//
//
//
// _____________C O N T R O L I N G F U N C T I O N S
//
// What to do when you press a page flipping button
function startFlip(dir) {
pageInit(curPage+dir, dir);
startX = dir*pageWi;
dragging = true;
RButton._alpha = 0;
Lbutton._alpha = 0;
this.onEnterFrame = function() {
flip(getPageRatio());
};
}
//
//
// what to do when page is released
function flipRelease() {
dragging = false;
if (pageRatio>2/3) {
curPage += 2*dir;
}
}
//
//
// What to do when pages are done flipping
function flipDone() {
this.onEnterFrame = null;
RButton._alpha = 100;
LButton._alpha = 100;
if (curPage != .5) {
LButton._visible = 1;
}
if (curPage != maxPages+.5) {
RButton._visible = 1;
}
// Delete hidden pages to save resources
if (pageRatio == 0) {
FShadow.removeMovieClip();
FShadowMask.removeMovieClip();
SShadow.removeMovieClip();
SShadowMask.removeMovieClip();
FBPage.removeMovieClip();
FBPageMask.removeMovieClip();
if (dir == 1) {
SRPage.removeMovieClip();
} else {
SLPage.removeMovieClip();
}
} else {
FTPage.removeMovieClip();
if (dir == -1) {
SRPage.removeMovieClip();
} else {
SLPage.removeMovieClip();
}
}
FTPageMask.removeMovieClip();
}
//
//
// assign functions to button events
LButton.onPress = function() {
startFlip(-1);
};
LButton.onReleaseOutside = function() {
flipRelease();
};
LButton.onRelease = function() {
flipRelease();
};
RButton.onPress = function() {
startFlip(1);
};
RButton.onReleaseOutside = function() {
flipRelease();
};
RButton.onRelease = function() {
flipRelease();
};
//

Copyright © 2005-08 www.BigResource.com, All rights reserved