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




Replicating Pages Turning



I'd like to replicate the turning of pages of a book, to show different information. I would either like (A) when you click on the lower right corner the page flips, flowing across the screen as if turning in real life or (b) *favorite* that when the lower right corner is dragged towards the left side, the page turns to the next. is this even possible? any help would be greatly appreciated (ps kinda new but my confidence and understanding is growing quickly)



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 07-30-2004, 06:36 PM


View Complete Forum Thread with Replies

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

Replicating Pages Turning
I'd like to replicate the turning of pages of a book, to show different information. I would either like (A) when you click on the lower right corner the page flips, flowing across the screen as if turning in real life or (b) *favorite* that when the lower right corner is dragged towards the left side, the page turns to the next. is this even possible? any help would be greatly appreciated (ps kinda new but my confidence and understanding is growing quickly)

Pages Turning?
hey,

does anyone know how this could be accomplished??

http://www.ae.com/aestyle/

it looks like it could be pretty complex, i mean with all the shadows and stuff. plus, the turning pages and all that crap. thanks to anyone who could help me out. ive seen this done a couple times, but this was the fastest loading. thanks.

-jake

Turning Pages
Anyone know of a good tute on turning pages of a book forward AND backward??????

Turning Pages
I've got this fla where you can turn the pages of the book. When the movie loads, instead of it going to the front cover I want it to autimatically go to the first page but I can't figure out which bit of the actionscript to change. Can anyone help me?

Turning Pages
I am looking for a tutorial or advice on how to animate a book to give the impression of turning pages.

The concept is a photo album that will have different photos on each page, as it's flipped.

If anyone can help, or direct to where I might find help, it would be much appreciated.

Many thanks,

Jenny.

Turning Pages
I am looking for a tutorial or advice on how to animate a book to give the impression of turning pages.

The concept is a photo album that will have different photos on each page, as it's flipped.

If anyone can help, or direct to where I might find help, it would be much appreciated.

Many thanks,

Jenny

Turning Pages
Hi,

Can anyone help me? I would like to make a page turn really smootly, by the cursor dragging the top corner of each page and if You let go the page will fall back into position or if it has been turned over half way it will fall over to the next page. I have seen it done and it looks really effective.

Thanks.

Cb1

Turning Pages
hey. I was wondering if you could help me out a little with some flash I'm doing for a school project.

What I am trying to do is create a flash book. I know the basics with flash and everything, but im having trouble with one little thing and it is incredibly annoying every time i try to get the page to 'turn' , it just glides across. I have the book, and then a individual page on two layers. the individual page is no different than the book page. so, when it moves, it still looks like theres a page behind it, etc. So, its a movie clip, and i have 30 frames long, 30 fps. on the first frame, the page is idle, and on the 30th frame, I flipped it horizontally and moved it to the right side so it looks like the right side of the page. but, it just glides accross. then i put on rotate: auto. then it ALMOST did it, but it like rotated the wrong way i guess. if you could help, i would greatly appreciate it!


btw, heres what i have. its just the prototype to get the page turning down:
gdesigns.postmyfolio.com/flash/book.html


thanks,
gianni

Turning Pages In Flash
Hello all,

Yet amazed again by this awesome trick.

Does anyone know how to make a turning page Flash movie? Like this on?

http://helloreality.com/flash/PageFlip_D.html

Book With Turning Pages
this site: http://www.pepfx.com/flash_applications/book/
has a book that u can drag the pages and they turn. I have found one tutorial but it wasnt muh help. Can anyone tell me if they know of a tutorial that explains how to produce it yourself. Or does anyone know how to?
Cheers, Mark

Turning Pages In Flash
Does anyone know how to have the turned page effect look in flash?

like this: http://www.templatemonster.com/flash...ates/9328.html

Thanks

Brochure Turning Pages
Could some one please help or suggest some code to create something similar to this link: http://www.eccogolf-digibrochure.co.uk/

Brochure Turning Pages
Could some one please help or suggest some code to create something similar to this link: http://www.eccogolf-digibrochure.co.uk/

HELP....turning Pages In Flash.
can any 1 help me turn pages. like this any help or advise is greatly apreciated.http://www.mastermindproductionz.com/

Animated Turning Pages
I’ve seen a few examples like this popping up on the net – animated pages you can ‘grab’ and turn.
I’m guessing there is some technology/script available to aid in producing it. Anyone know how it’s done?

Pages Not Turning/flipping
I've got a flipper page book (from http://www.iparigrafika.hu/pageflip). It all works fine, but when I add my own pages and follow the instructions for doing so it doesn't work proberly. If I roll over the right top corner then bottom left corner turns up as well and vice versa. (I've uploaded the file to: http://www.lucyohara.talktalk.net/pageflip.swf) I've looked at the code, but don't really understand which bit would control it. I've attached the code that was in the file.
Thanks

Code:
pw = 397;//page width in pixel
ph = 842;//page height in pixel
//pages in the library must have the same size, the script will not resize them!

//page data... (export names/tearing flag)
addPage("start");//Always start with "start"!!!
addPage("page1");
addPage("page2");
addPage("page3");
addPage("page4");
addPage("page5");
addPage("page6");
addPage("page7");
addPage("page8");
addPage("end");//always end with "end"!!!

page=0;//first page (normally it is 0 = the page before the cover = blank page)
hcover = false;//hard cover on/off

clickarea = 64;//pixel width of the click sensitive area at the edges..
afa = 36;//width of the autoflip starter square.

gs = 2;//goto page flip speed
ps = 5;//mouse pursuit speed
es = 3;//flip speed after mouse btn release

canflip = true;//page flipping enabled

transparency = false;//use transparent pages or not (1 level transparency)

lcover = false;//large cover on/off
lcaddx = 0;//width difference
lcaddy = 0;//height difference on top/bottom

SoundOn = false;//use page sounds


//do not change these values: ---------------------------------------------------------------------------------------------------------------------

_global.mcnt = 0;//counter (used on a page where is an animation)
gpage = 0;//gotoPage No
gflip = false;//gotoPage flip
gdir = 0;//goto direction...
gskip = false;//skip pages***
gtarget = 0;//target when skipping

aflip = false;//auto flip
flip = false;//pageflip
flipOff = false;//terminateflip
flipOK = false;//good flip
hflip = false;//hardflip (the cover of the book)
rotz = -30;//hardflip max y difference

preflip = false;//corner flip status
ctear = false;//actual page status
tear = false;
teard = 0;
tlimit = 80;
removedPages = new Array();//list of removed pages!

mpx = 0, mpy = 0;//mousepos at click
sx = sy = 0;//startpoint when flipping
x = 0;//mouse x,y
y = 0;
ax = 0;//auto x,y
ay = 0;
acnt = 0;
aadd = 0;
aamp = 0;

AM = Math.PI/180;

//pageflip code by Macc ---------------------------------------------------------------------------------------------------------------------------
function addPage(ename,tear) {//defining pages... -------------------------------------------------------------------------------------------
if(ename=="start") {
pageOrder = new Array();
pageCanTear = new Array();
page=0;
ename="blankpage";
}
if(ename=="end") {
maxpage = page-1;
ename="blankpage";
}
tear = tear==undefined? false: tear;
pageOrder[page] = ename;
pageCanTear[page] = tear;
page++
}

function reset() {//initializing pages... ---------------------------------------------------------------------------------------
pages.p4.page._x = -pw;
pages.p4._x = pw;
pages.p1.page._x = -pw;
pages.p1._x = 0;

pages.flip.p2.page._x = -pw;
pages.flip.p2._x = pw;
pages.flip.p3.page._x = -pw;
pages.flip.p3._x = 0;

pages.p0.page._x = -pw;
pages.p0._x = 0;
pages.p5.page._x = -pw;
pages.p5._x = pw;

pages.pLL.page._x = -pw;
pages.pLL._x = 0;
pages.pLR.page._x = -pw;
pages.pLR._x = pw;


pages.pgrad._visible = pages.mask._visible = pages.flip._visible = false;
pages.flip.p3mask._width = pages.pgmask._width = pw*2;
pages.flip.p3mask._height = pages.pgmask._height = ph;
pages.center._height = ph+2*lcaddy;
pages.flip.fmask.page.pf._width = pw;
pages.center._width = 6;
pages.flip.fmask.page.pf._height = ph;

pages.mask._height = pages.pgrad._height = pages.flip.p3shadow._height = pages.flip.flipgrad._height = 2*Math.sqrt(ph*ph+pw*pw);

pageNumber = new Array();
for(i=0;i<=(maxpage+1);i++) pageNumber[i] = i;
}

mousecontroll = new Object();//initializing mouse click handler ---------------------------------------------------------------------------
mousecontroll.onMouseDown = function() {
if(flip && !aflip) {// && !preflip) {
flipOK = false;
if(sx<0 && pages._xmouse>0) flipOK = true;
if(sx>0 && pages._xmouse<0) flipOK = true;
flipOff = true;
flip = false;
} else if((flipOff || aflip || !canflip) && !preflip) {
trace("donothing");
} else {
var oox = ox;
var ooy = oy;
var osx = sx;
var osy = sy;
var hit = hittest();//hittest
if(hit) {
startsnd(1);//Sound
anim._visible = false;
flip = true;
flipOff = false;
tear = false;//not tearing yet...
ox = sx = hit*pw;
if(preflip) {
aflip = preflip = false;
ox = oox, oy = ooy;
sx = osx, sy = osy;
}
pages.flip.setMask(pages.mask);
mpx = pages._xmouse, mpy = pages._ymouse;
oef();
//_quality = "MEDIUM";//it is the place to degrade image quality while turning pages if the performance is too low.
}
}
}
mousecontroll.onMouseUp = function() {
if(flip && !tear) {
if((Math.abs(pages._xmouse)>(pw-afa) && Math.abs(pages._ymouse)>(ph/2-afa) && Math.abs(pages._xmouse-mpx)<afa) || preflip) {
flip = false;
preflip = false;
autoflip();
startsnd(2);//sound
} else if(!preflip) {
preflip = false;
flipOK = false;
if(sx<0 && pages._xmouse>0) flipOK = true;
if(sx>0 && pages._xmouse<0) flipOK = true;
flipOff = true;
flip = false;
if(flipOK) startsnd(2);//sound
}
}
}

function hittest() {//hittest at mouse clicks, if click is over the book -> determining turning direction ------------------------------------
var x=pages._xmouse;
var y=pages._ymouse;
var pmh = ph/2;

if(y<=pmh && y>=-pmh && x<=pw && x>=-pw) {//ha a megadott intervallumban klikkelunk, akkor lapozhatunk
var r = Math.sqrt(x*x+y*y);
var a = Math.asin(y/r);
var y = Math.tan(a)*pw;
if(y>0 && y>ph/2) y = ph/2;
if(y<0 && y<-ph/2) y = - ph/2;
oy = sy = y;
r0 = Math.sqrt((sy+ph/2)*(sy+ph/2)+pw*pw);
r1 = Math.sqrt((ph/2-sy)*(ph/2-sy)+pw*pw);

pageN = eval("pages.flip.p2.page");
pageO = eval("pages.flip.p3");
offs = -pw;
pages.flip.fmask._x = pw;

if(x<-(pw-clickarea) && page>0) {//>-----> flip backward
pages.flip.p3._x = 0;
hflip = checkCover(page,-1);
setPages(page-2,page-1,page,page+1);
ctear = pageCanTear[page-1];
return -1;
}
if(x>(pw-clickarea) && page<maxpage) {//<-----< flip forward
pages.flip.p3._x = pw;
hflip = checkCover(page,1);
setPages(page,page+2,page+1,page+3);
ctear = pageCanTear[page+2];
return 1;
}
} else return 0;//wrong click
}
function checkCover(p,dir) {
if(hcover) {
if(dir>0) {
if(p==(maxpage-2) || p==0) return true;
} else {
if(p==maxpage || p==2) return true;
}
}
return false;
}
function corner() {
var x = Math.abs(pages._xmouse);
var y = Math.abs(pages._ymouse);
if(x>(pw-afa) && x<pw && y>(ph/2-afa) && y<(ph/2)) {
return true;
}
return false;
}


function oef() {
_global.mcnt++;//main counter incrase (need for some page effect);

if(!flip && corner()) {//corner mouseover
preflip = true;
if(!autoflip()) preflip = false;
}
if(preflip && !corner()) {
preflip = false;
flip = false;
flipOK = false;
flipOff = true;
}
getm();
if(aflip && !preflip) {
y = (ay += (sy-ay)/(gflip? gs: ps ));
acnt += aadd;
ax -= aadd;
if(Math.abs(acnt)>pw) {
flipOK = true;
flipOff = true;
flip = false;
aflip = false;
}
}
if(flip) {//page turning is in progress...
if(tear) {
x = tox;
y = (toy += teard);
teard *= 1.2;
if(Math.abs(teard)>1200) {
flipOff = true;
flip = false;
}
} else {
x = (ox += (x-ox)/(gflip? gs: ps ));
y = (oy += (y-oy)/(gflip? gs: ps ));
}
calc(x,y);//positioning pages and shadows
}
if(flipOff) {//terminating page turning effect... (comlplete turning... dropped on the other side)
if(flipOK || tear) {
x = (ox += (-sx-ox)/(gflip? gs: es ));
y = (oy += (sy-oy)/(gflip? gs: es ));
calc(x,y);
if(x/-sx > 0.99 || tear) {//we are done with turning, so stop all turning issue...
flip = false;
flipOK = flipOff = false;
pages.pgrad._visible = pages.flip._visible = false;
//_quality = "BEST";//if quality is decrased during turning effect, you must reset its default value!

if(tear) {//if tear: remove page!!!
removePage((sx<0)? page: page+1);
page += (sx<0)? -2: 0;
} else {
page += (sx<0)? -2: 2;//and tourning pages at pagenumber level...
}
if(gskip) page = gtarget;
setPages(page,0,0,page+1);
tear = false;

if(gpage>0 && !gskip) {//gotoflip active -> is there another flipping left?
gpage--;
autoflip();
startsnd(0);//sound
} else gflip = gskip = false;
}
} else {//terminating page turning effect... (incomlplete turning... dropped on the dragged side)
x = (ox += (sx-ox)/3);
y = (oy += (sy-oy)/3);
calc(x,y);
if(x/sx > 0.99) {//we are done with turning, so stop all turning issue...
flip = false;
flipOff = false;
aflip = false;
pages.pgrad._visible = pages.flip._visible = false;
//_quality = "HIGH"; //if quality is decrased during turning effect, you must reset its default value!
setPages(page,0,0,page+1);//no change at pagenumbers..
}
}
}
}

function calc(x,y) {//positioning pages and shadows by x,y reference points --------------------------------------------------
if(hflip) {//hardflip...
var xp = (sx<0)? -x: x;
if(xp>0) {
sp2._visible = false;
sp3._visible = true;
scalc(sp3,x);
} else {
sp3._visible = false;
sp2._visible = true;
scalc(sp2,x);
}
pages.flip.setMask(null);
pages.flip._visible = true;
pages.flip.fgrad._visible = false;
pages.flip.p2._visible = pages.flip.p3._visible = false;
return;
} else pages.flip.fgrad._visible = true;

//normal flipping process---------------------------------------------------------------------
var rr0 = Math.sqrt((y+ph/2)*(y+ph/2)+x*x);
var rr1 = Math.sqrt((ph/2-y)*(ph/2-y)+x*x);
if((rr0>r0 || rr1>r1) && !tear) {// we can tear off pages now:)
// so reference points must be recalculated!
if(y<sy) {// k1-gyel kell osszehasonlitani!
var a = Math.asin((ph/2-y)/rr1);
y = (ph/2-Math.sin(a)*r1);
x = (x<0)? -Math.cos(a)*r1: Math.cos(a)*r1;
if(y>sy) {
if((sx*x)>0) y = sy, x = sx;
else y = sy, x = -sx;
}
if((rr1-r1)>tlimit && ctear) {
teard = -5;
tear = true;
tox = ox = x;
toy = oy = y;
}
} else {// k0-val kell osszehasonlitani!
var a = Math.asin((y+ph/2)/rr0);
y = Math.sin(a)*r0-ph/2;
x = (x<0)? -Math.cos(a)*r0: Math.cos(a)*r0;
if(y<sy) {
if((sx*x)>0) y = sy, x = sx;
else y = sy, x = -sx;
}
if((rr0-r0)>tlimit && ctear) {
teard = 5;
tear = true;
tox = ox = x;
toy = oy = y;
}
}
}
if((sx<0 && (x-sx)<10) || (sx>0 && (sx-x)<10)) {
if(sx<0) x = -pw+10;
if(sx>0) x = pw-10;
}
//calculating flipping process
pages.flip._visible = true;
pages.flip.p3shadow._visible = pages.pgrad._visible = !tear;
pages.flip.p2._visible = pages.flip.p3._visible = true;
//equation of the line
var vx = x-sx;
var vy = y-sy;
var a1 = vy/vx;
var a2 = -vy/vx;

cx = sx+(vx/2);
cy = sy+(vy/2);
//trigonometriai szamitasok
//calculating rotation of the page, and the masks
var r = Math.sqrt((sx-x)*(sx-x)+(sy-y)*(sy-y));
var a = Math.asin((sy-y)/r);
if(sx<0) a = -a;
ad = a/AM; //in degree
pageN._rotation = ad*2;
r = Math.sqrt((sx-x)*(sx-x)+(sy-y)*(sy-y));
rl = (pw*2);
if(sx>0) { //flip forward
pages.mask._xscale = 100;
nx = cx-Math.tan(a)*(ph/2-cy);
ny = ph/2;
if(nx>pw) {
nx = pw;
ny = cy+Math.tan(Math.PI/2+a)*(pw-cx);
}
pageN.pf._x = -(pw-nx);
pages.flip.fgrad._xscale = (r/rl/2)*pw;
pages.pgrad._xscale = -(r/rl/2)*pw;
pages.flip.p3shadow._xscale = (r/rl/2)*pw;
} else { //flip backward
pages.mask._xscale = -100;
nx = cx-Math.tan(a)*(ph/2-cy);
ny = ph/2;
if(nx<-pw) {
nx = -pw;
ny = cy+Math.tan(Math.PI/2+a)*(-pw-cx);
}
pageN.pf._x = -(pw-(pw+nx));
pages.flip.fgrad._xscale = -(r/rl/2)*pw;
pages.pgrad._xscale = (r/rl/2)*pw;
pages.flip.p3shadow._xscale = -(r/rl/2)*pw;
}
pages.mask._x = cx;
pages.mask._y = cy;
pages.mask._rotation = ad;
pageN.pf._y = -ny;
pageN._x = nx+offs;
pageN._y = ny;
pages.flip.fgrad._x = cx;
pages.flip.fgrad._y = cy;
pages.flip.fgrad._rotation = ad;
pages.flip.fgrad._alpha = (r>(rl-50))? 100-(r-(rl-50))*2: 100;
pages.flip.p3shadow._x = cx;
pages.flip.p3shadow._y = cy;
pages.flip.p3shadow._rotation = ad;
pages.flip.p3shadow._alpha = (r>(rl-50))? 100-(r-(rl-50))*2: 100;
pages.pgrad._x = cx;
pages.pgrad._y = cy;
pages.pgrad._rotation = ad+180;
pages.pgrad._alpha = (r>(rl-100))? 100-(r-(rl-100)): 100;
pages.flip.fmask.page._x = pageN._x;
pages.flip.fmask.page._y = pageN._y;
pages.flip.fmask.page.pf._x = pageN.pf._x;
pages.flip.fmask.page.pf._y = pageN.pf._y;
pages.flip.fmask.page._rotation = pageN._rotation;
}

function scalc(obj,x) {//hardflip calc
if(x<-pw) x=-pw;
if(x>pw) x=pw;
var a = Math.asin( x/pw );
var rot = a/AM/2;
var xs = 100;
var ss = 100*Math.sin( rotz*AM );
x = x/2;
var y = Math.cos(a)*(pw/2)*(ss/100);
placeImg(obj, rot, ss, x, y)
pages.pgrad._visible = pages.flip._visible = true;
pages.pgrad._xscale = x;
pages.pgrad._alpha = pages.flip.p3shadow._alpha = 100;
pages.flip.p3shadow._xscale = -x;
pages.flip.p3shadow._x = 0;
pages.flip.p3shadow._y = 0;
pages.flip.p3shadow._rotation = 0;
pages.pgrad._x = 0;
pages.pgrad._y = 0;
pages.pgrad._rotation = 0;
}

function placeImg(j, rot, ss, x, y) {
var m = Math.tan( rot*AM );
var f = Math.SQRT2/Math.sqrt(m*m+1);
var phxs = 100*m;
var phRot = -rot;;
var xs = 100*f;
var ys = 100*f;
j.ph.pic._rotation = 45;
j.ph.pic._xscale = (phxs<0)? - xs: xs;
j.ph.pic._yscale = ys*(100/ss);
j.ph._rotation = phRot;
j.ph._xscale = phxs;
j._yscale = ss;
j._x = x;
j._y = y;
j._visible = true;
}

function setPages(p1,p2,p3,p4) {//attach the right page "image" at the right place:)
p0 = p1-2;//pages for transparency...
p5 = p4+2;
if(p0<0) p0=0;
if(p5>maxpage) p5=0;

if(p1<0) p1=0;//visible pages
if(p2<0) p2=0;
if(p3<0) p3=0;
if(p4<0) p4=0;
trace("setpages ->"+p1+","+p2+","+p3+","+p4);

pleft = pages.p1.page.pf.ph.attachMovie(pageOrder[p1],"pic",0);
pages.p1.page.pf.ph._y = -ph/2;

if(transparency) {
pleftb = pages.p0.page.pf.ph.attachMovie(pageOrder[p0],"pic",0);
pages.p0.page.pf.ph._y = -ph/2;
} else pages.p0._visible = false;
if(hflip) {//hardflip pages are specials!!!
var tm = pages.flip.hfliph.attachMovie("sph","sp2",0);
sp2 = tm.ph.pic.attachMovie(pageOrder[p2],"pic",0);
sp2._y = -ph/2, sp2._x = -pw/2;
sp2 = eval("pages.flip.hfliph.sp2");
var tm = pages.flip.hfliph.attachMovie("sph","sp3",1);
sp3 = tm.ph.pic.attachMovie(pageOrder[p3],"pic",0);
sp3._y = -ph/2, sp3._x = -pw/2;
sp3 = eval("pages.flip.hfliph.sp3");
} else {
pages.flip.hfliph.sp2.removeMovieClip();
pages.flip.hfliph.sp3.removeMovieClip();
sp2 = pages.flip.p2.page.pf.ph.attachMovie(pageOrder[p2],"pic",0);
pages.flip.p2.page.pf.ph._y = -ph/2;
sp3 = pages.flip.p3.page.pf.ph.attachMovie(pageOrder[p3],"pic",0);
pages.flip.p3.page.pf.ph._y = -ph/2;
}
pright = pages.p4.page.pf.ph.attachMovie(pageOrder[p4],"pic",0);
pages.p4.page.pf.ph._y = -ph/2;
if(transparency) {
prightb = pages.p5.page.pf.ph.attachMovie(pageOrder[p5],"pic",0);
pages.p5.page.pf.ph._y = -ph/2;
} else pages.p5._visible = false;
if(lcover) {
var lpl = transparency? p1-4: p1-2;
var lpr = transparency? p4+4: p4+2;
var limit = transparency? 0: -2;
if(lpl>limit) {
pages.pLL.page.pf.ph.attachMovie(pageOrder[2],"pic",0);
pages.pLL.page.pf.ph._y = -ph/2;
pages.pLL._visible = true;
} else pages.pLL._visible = false;
if(lpr<(maxpage-limit)) {
pages.pLR.page.pf.ph.attachMovie(pageOrder[maxpage-1],"pic",0);
pages.pLR.page.pf.ph._y = -ph/2;
pages.pLR._visible = true;
} else pages.pLR._visible = false;
}
}

function resetPages() {
setPages(page,0,0,page+1);
}

function autoflip() {//start auto flip!
if(!aflip && !flip && !flipOff && canflip) {//only when all conditions fits our needs...
acnt = 0
var pmh = ph/2;
aamp = Math.random()*pmh-(ph/4);
var x= gflip? (gdir*pw)/2: ((pages._xmouse<0)? -pw/2: pw/2);

var y= pages._ymouse;

if(y>0 && y>pmh) y = pmh;
if(y<0 && y<-pmh) y = - pmh;

oy = sy = y;
ax = (pages._xmouse<0)? -pmh: pmh;
ay = y*Math.random();//page turnig style randomizing

offs = -pw;
var hit = 0;
if(x<0 && page>0) {
pages.flip.p3._x = 0;
hflip = (hcover && gskip)? (page==maxpage || gtarget==0): checkCover(page,-1);
if(!(preflip && hflip)) {
if(gskip) setPages(gtarget,gtarget+1,page,page+1);
else setPages(page-2,page-1,page,page+1);
}
hit = -1;
}
if(x>0 && page<maxpage) {
pages.flip.p3._x = pw;
hflip = (hcover && gskip)? (page==0 || gtarget==maxpage): checkCover(page,1);
if(!(preflip && hflip)) {
if(gskip) setPages(page,gtarget,page+1,gtarget+1);
else setPages(page,page+2,page+1,page+3);
}
hit = 1;
}
if(hflip && preflip) {
hit = 0;
preflip = false;
return false;
}
if(hit) {
anim._visible = false;
flip = true;
flipOff = false;
ox = sx = hit*pw;
pages.flip.setMask(pages.mask);
aadd = hit*(pw/(gflip? 5:10 ));//autoflip takes 10 frames to be done!!!
aflip = true;
pages.flip.fmask._x = pw;
if(preflip) {
oy = sy = (pages._ymouse<0)? -(ph/2): (ph/2);
}
r0 = Math.sqrt((sy+ph/2)*(sy+ph/2)+pw*pw);
r1 = Math.sqrt((ph/2-sy)*(ph/2-sy)+pw*pw);
pageN = eval("pages.flip.p2.page");
pageO = eval("pages.flip.p3");
oef();
return true;
}
} else return false;
}

function getm() {//get x,y reference points depending of turning style: manual/auto
if(aflip && !preflip) {
x = ax;
y = ay;
} else {
x = pages._xmouse;
y = pages._ymouse;
}
}

function gotoPage(i,skip) {//quickjump to the page number i
i = getPN(i);//i = target page
gskip = (skip==undefined)? false: skip;//skip pages

if(i<0) return false;
var p = int(page/2);
var d = int(i/2);
if(p!=d && canflip && !gflip) {//target!=current page
if(p<d) {//go forward
gdir = 1;
gpage = d-p-1;
} else {//go backward
gdir = -1
gpage = p-d-1;
}
gflip = true;
if(gskip) gtarget = d*2, gpage = 0;
autoflip();
startsnd(0);//sound
} else gskip = false;
}
function getPN(i) {//get the right page number
if(i==0) return 0;
var find = false;
for(j=1;j<=maxpage;j++) {
if(i==pageNumber[j]) {
i=j;
find = true;
break;
}
}
if(find) return i;
else return -1;
}
function removePage(i) {
trace("remove page "+i);
i = (Math.floor((i-1)/2)*2)+1;
removedPages.push(pageNumber[i], pageNumber[i+1]);

for(j=(i+2);j<=(maxpage+1);j++) {
pageOrder[j-2]=pageOrder[j];
pageCanTear[j-2]=pageCanTear[j];
pageNumber[j-2]=pageNumber[j];
}
trace("removed pages "+i+","+(i+1));
trace(removedPages.join(", "));
maxpage -= 2;
}

//-------------------------------------------------------------------------------

snd0 = new Sound();//adding sound objects
snd1 = new Sound();
snd2 = new Sound();
snd0.attachSound("pf1");
snd1.attachSound("pf2");
snd2.attachSound("pf3");


function startsnd(i) {//Sound starter
if(SoundOn) {
if(i==0) {
snd0.start(0,0);
snd0.onSoundComplete = function () {
startsnd(2);
delete snd0.onSoundComplete;
}
} else {
i--;
this["snd"+i].start(0,0);
}
}
}

//------------------------------------------------------------------------------------------------ PUT YOUR CODE HERE --------------


/*you can use these functions:

gotoPage( destinationPageNo, skip );//quick jump to the page number: destinationPageNo; values = 0-maxpages; skip: boolean; if true, pages will be skipped to the destination!

canflip//it's a variable. setting its value to false disables flipping

other functions of page turning is automatic;

WARNING!!!
if you want to unload/reload tha pageflip, before unloading call function: removeML(); to remove mouse listener!
*/

function startAutoFlip () {
intervalID = setInterval(nextPage,2000); //2 seconds
}
function stopAutoFlip () {
clearInterval(intervalID);
}
function prevPage() {
gotoPage(page-2);
}
function nextPage() {
gotoPage(page+2);
}

Pages Turning Effects
Anyone tell me where I can find out how to do a page turning effect?

Turning Pages Of A Book (Flash 5)
Hi All,

Hopefully this is not beyond my capabilities, but I am using Flash 5 and would like to create a movie in which a book is lying on the shelf initially. I would like for it to rotate and open, face the viewer, and allow the viewer to turn its pages.

Does anyone know of a fairly comprehensive tutorial dealing with manipulating a book and/or its pages?

Thanks in advance!

Turning Pages Of A Book Effect
Hi all

I'm wondering, does anyone ever come across a cool way of animating turning/flipping pages of a book?

I would like to use the mouse to "drag and flip to next page" effect...

Any suggestions please?

thnks
Jess

Turning Pages Of A Book....how Is This Done Guys?
I have seen many sites with books that the pages turn seemlessly. One in particular was a book that you click and drag the pages but it looks like real pages turning. I want to do the same for a project Im doing at work, but I have such a tight deadline. Im wondering do any of you out there know if such a source file exists that I might learn from? Or a tutorial or something? Please help!

thanks

[f8]Pages Not Working/turning Properly
I have an opensource flipper page book (from http://www.iparigrafika.hu/pageflip). It all works fine, but when I add my own pages and follow the instructions for doing so it doesn't work proberly. If I roll over the right top corner then bottom left corner turns up as well and vice versa. I've looked at the code, but don't really understand which bit would control it. I've attached the code (in three parts) that was in the file.

Code:
pw = 397;//page width in pixel
ph = 842;//page height in pixel
//pages in the library must have the same size, the script will not resize them!

//page data... (export names/tearing flag)
addPage("start");//Always start with "start"!!!
addPage("page1");
addPage("page2");
addPage("page3");
addPage("page4");
addPage("page5");
addPage("page6");
addPage("page7");
addPage("page8");
addPage("end");//always end with "end"!!!

page=0;//first page (normally it is 0 = the page before the cover = blank page)
hcover = false;//hard cover on/off

clickarea = 64;//pixel width of the click sensitive area at the edges..
afa = 36;//width of the autoflip starter square.

gs = 2;//goto page flip speed
ps = 5;//mouse pursuit speed
es = 3;//flip speed after mouse btn release

canflip = true;//page flipping enabled

transparency = false;//use transparent pages or not (1 level transparency)

lcover = false;//large cover on/off
lcaddx = 0;//width difference
lcaddy = 0;//height difference on top/bottom

SoundOn = false;//use page sounds


//do not change these values: ---------------------------------------------------------------------------------------------------------------------

_global.mcnt = 0;//counter (used on a page where is an animation)
gpage = 0;//gotoPage No
gflip = false;//gotoPage flip
gdir = 0;//goto direction...
gskip = false;//skip pages***
gtarget = 0;//target when skipping

aflip = false;//auto flip
flip = false;//pageflip
flipOff = false;//terminateflip
flipOK = false;//good flip
hflip = false;//hardflip (the cover of the book)
rotz = -30;//hardflip max y difference

preflip = false;//corner flip status
ctear = false;//actual page status
tear = false;
teard = 0;
tlimit = 80;
removedPages = new Array();//list of removed pages!

mpx = 0, mpy = 0;//mousepos at click
sx = sy = 0;//startpoint when flipping
x = 0;//mouse x,y
y = 0;
ax = 0;//auto x,y
ay = 0;
acnt = 0;
aadd = 0;
aamp = 0;

AM = Math.PI/180;
Thanks

Turning Pages Action Script
I am looking for a good source to help me create a specific type
of Flash animation. There are some great downloads available, but
I need the book to have a specific binding and able to custom
change the cover, verbage and insert artwork.

I'm a beginner in Flash, but love it and a quick study. Any ideas?

Thanks!

Script For Turning Book Pages?
Hi everyone,
I am working on a presentation, of a book.
I want the user to be able to turn the pages like in real life. I bet you know this stuff where one clicks on the edges of the book and is able to turn the leaf in a relatively real manner, with the same co-ordinates as in a REAL book.
Anybody ready to give me clues..cos i am only a beginner in as. I am ready for charged tutorials too because this project is very important to me.
On the other hand, I will be very appreciative of all your tips in here.

Thanks
Aris.

Update: 17.21pm: I am working with Flash 8 Professional

Create Pages Of A Book Turning?
Does anybody know of good tutorials for creating the page turning effect? here is a good example of what I want:
http://www.dawnoffantasy.com/

Thank you

How To Make Pages Turning/Flipping Effect.
I was wondering if anyone could tell me how to do this or possibly give me an example ( is that alot to ask?) I am kinda of a new to flash, so any help would be appreciated.

Thanks

Animation For E-book, Turning Back Pages.
I have an e-book I have been working on,

However, all motion tweens etc are setup much like a typical linear flash document. The way you turn a page is to hit a button that simply

on (release) {play();
}

until it hit's stop frames.

However, now I want to go back pages WITH the page animation, how can I do this?

(I know I could use gotoandstop and edit each individual back page button but this doesn't show the pages flipping back.

Is there anyway to cut to a 4 frame animation after clicking a button or some such?

Please help =)

"Turning Pages" Effect
I am using Flash MX 2004 Professional and I'm looking to find out how to create an effect that looks like turning pages of a book. The project that I'm working on requires me to show a box from bird's eye view, and then show the sides of the box folding out. I can imagine I need to use "Rotate" in some way, (I have actually created a "flipping" action before unintentionally), but I have not yet figured out how to manipulate this technique to a great degree to achieve what I want.

Any help would be MUCH appreciated!

~Terri

"Turning Pages" Effect
I'm looking to find out how to create an effect that looks like turning pages of a book. The project that I'm working on requires me to show a box from bird's eye view, and then show the sides of the box folding out. I can imagine I need to use "Rotate" in some way, (I have actually created a "flipping" action before unintentionally), but I have not yet figured out how to manipulate this technique to a great degree to achieve what I want.

Any help would be MUCH appreciated!

Replicating An Effect
say there's one particular "effect" i want to use on several different symbols, what's the best way to go about reproducing it? for example, let's say i find a particular way of affecting color and size with lots of tweens that makes a really nice "shine" effect, and want to use the same settings on 30 or 40 different text and/or image links - how should i go about it?

tyia

Help In Replicating Menu
Hi,
I am working on a website and want to integrate a Flash menu, with the same type layout as the one used here (http://www.islandrecords.com/thekillers/site/home.las). I'd like a menu list where you get sub-menu items when you roll over the buttons. I'm just getting into learning Flash, and could use some help. I've got my main image and my buttons created on seperate layers. But I don't know how I should put the sub-menu items in, or how to get them to appear when you roll over the buttons. Any assistance in how to properly set this up is much appreciated. Thanks in advance. - Eric

Replicating An Applet
Hi,
I saw this applet that basically had heaps of points arrange in columns and rows, that when u clicked and held the left mouse button down they would move towards the mouse, and move away if the right button was clicked.

so the question is how do i make this code 4 making the points arrange on stage simpler I am sure there is a better way.


Code:
a = 0;
j = 1;
for (i=1; i<11; i++) {
peete = [i, j];
_root.attachMovie("point", peete, 1+i);
a = a+60;
b = 60;
_root[peete]._x = a;
_root[peete]._y = b;
}
a = 0;
j = 2;
for (i=1; i<11; i++) {
peete = [i, j];
_root.attachMovie("point", peete, 20+i);
a = a+60;
b = 120;
_root[peete]._x = a;
_root[peete]._y = b;
}
a = 0;
j = 3;
for (i=1; i<11; i++) {
peete = [i, j];
_root.attachMovie("point", peete, 40+i);
a = a+60;
b = 180;
_root[peete]._x = a;
_root[peete]._y = b;
}
a = 0;
j = 4;
for (i=1; i<11; i++) {
peete = [i, j];
_root.attachMovie("point", peete, 60+i);
a = a+60;
b = 240;
_root[peete]._x = a;
_root[peete]._y = b;
}
a = 0;
j = 5;
for (i=1; i<11; i++) {
peete = [i, j];
_root.attachMovie("point", peete, 80+i);
a = a+60;
b = 300;
_root[peete]._x = a;
_root[peete]._y = b;
}
a = 0;
j = 6;
for (i=1; i<11; i++) {
peete = [i, j];
_root.attachMovie("point", peete, 100+i);
a = a+60;
b = 360;
_root[peete]._x = a;
_root[peete]._y = b;
}
a = 0;
j = 7;
for (i=1; i<11; i++) {
peete = [i, j];
_root.attachMovie("point", peete, 120+i);
a = a+60;
b = 420;
_root[peete]._x = a;
_root[peete]._y = b;
}
a = 0;
j = 8;
for (i=1; i<11; i++) {
peete = [i, j];
_root.attachMovie("point", peete, 140+i);
a = a+60;
b = 480;
_root[peete]._x = a;
_root[peete]._y = b;
}
a = 0;
j = 9;
for (i=1; i<11; i++) {
peete = [i, j];
_root.attachMovie("point", peete, 160+i);
a = a+60;
b = 540;
_root[peete]._x = a;
_root[peete]._y = b;
}
a = 0;
j = 10;
for (i=1; i<11; i++) {
peete = [i, j];
_root.attachMovie("point", peete, 180+i);
a = a+60;
b = 600;
_root[peete]._x = a;
_root[peete]._y = b;
}
also i am using a mouse down clip event to make the points move to the mouse how do i make this happen for the whole time the mouse is down not just the click?

Help Replicating Effect
Hi all,
just wondering if anyone could give any help... I am trying to copy the effect on this page.


www.bbc.co.uk/radio1

when you hover over a picture, info pops up from the bottom.

Any clues?

Many thanks :-)

Self Replicating Program
Can anyone use AS3 (or AS2 I suppose) to write a script that can reproduce itself? Successful program should export code (into a TF or the output panel) that can be copied into a new flash file and run to repeat the same output indefinitely.

I've seen this posed for other languages but I'm not sure how to tackle it in AS3...yet.

Replicating A Pattern
This time round i need to get the pattern drawn on the drawing board to be repeated on another area of the stage.I need it to be repeated 4x4 tile. Any idea??

Replicating A Pattern
This time round i need to get the pattern drawn on the drawing board to be repeated on another area of the stage.I need it to be repeated 4x4 tile. Any idea??

Replicating MM Search Input Box
Hi Guys,

I have tried this - only have flash 5

Here is the fla - I have it working except when I roll on and off the textbox it fades in an out.


I only want it to fade when I click on it and click off it.


onClipEvent (load) {
this._alpha = 100;
alpha = no;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (alpha == no)) {
this._alpha -= 13;
// this._alpha++ // very slow
// this._alpha*= 10 //a bit faster
alpha = yes;
} else if (alpha == yes) {
this._alpha += 13;
}
}
onClipEvent (load) {
}

http://www.actionscript.org/forums/a...=&postid=50155

Cheers,
SuzyQ

Replicating Website + Flash
Okay. Here is my predicament. My Father's company (Natural Herbal Prodicts) is paying some people a large sum of money to design a website. The design that they are stuck with is mediocre and not very functional and I could do a much better job, and would like to do so, except for this obstable. They are making a replicating website, that would be plugged into the already existing database system. Let me explain...


The original domain name will be www.entreneteam.com
Say I ordered, then a site would automatically be created after the order at the url
www.entreneteam.com/eric.html
Now say I give my card to someone with my url on it and they will get the same frontpage as anybody else, but when they order, they will be put under me in the distributor line so that their orders benefit me.
So these frontpages would be replicated like a tree and tied into the distributor database. Now, he already has a programmer that can take care of the database part, and tying the database into it, but I would still personally have to do the replicating webbsite part of it myself.

Now I have no idea how to do that, and will gladly research, but is this possible to do in Flash MX or in Flash MX and Cold Fusion, so that I could include the funtionability of a replicating website, with a good flash design?
I would really be helping my father out of a situation if I could do so.
Thanks for your time.

Replicating Website + Flash
Okay. Here is my predicament. My Father's company (Natural Herbal Prodicts) is paying some people a large sum of money to design a website. The design that they are stuck with is mediocre and not very functional and I could do a much better job, and would like to do so, except for this obstable. They are making a replicating website, that would be plugged into the already existing database system. Let me explain...


The original domain name will be www.entreneteam.com
Say I ordered, then a site would automatically be created after the order at the url
www.entreneteam.com/eric.html
Now say I give my card to someone with my url on it and they will get the same frontpage as anybody else, but when they order, they will be put under me in the distributor line so that their orders benefit me.
So these frontpages would be replicated like a tree and tied into the distributor database. Now, he already has a programmer that can take care of the database part, and tying the database into it, but I would still personally have to do the replicating webbsite part of it myself.

Now I have no idea how to do that, and will gladly research, but is this possible to do in Flash MX or in Flash MX and Cold Fusion, so that I could include the funtionability of a replicating website, with a good flash design?
I would really be helping my father out of a situation if I could do so.
Thanks for your time.

Replicating OnDragOver In Flash 5
Hi every1. First post, wondering if you can help me.

The deal is I've got an MC that I am dragging around my scene and I need other MC's to be highlighted as I drag over them, i.e. the mouse is still down. Buttons don't work, onClipEvent only runs once whilst mouseDown (so I can't do a continuous position check) and the only thing I can think of working is the onDragOver and onDragOut events in MX but I am using flash 5?

Any feedback welcome. Can't help feeling like am being very stupid, am sure this is possible, but can't for the life of me think how.

Cheers,
Sir.

Replicating Flash, Am Stuck :(
Hey,

I seen this flash thing. And i want to learn how the computer gets brought into it. Take a look here http://www.clipitsolutions.co.uk/flash/flashmovie.swf .. As soon as it starts, the computer comes in with like a cirle being tweened over it. But i dont understand how to do this?

If anyone could help, would be most greatful. I really wana learn this technique but its fryin my brain lol

Thanks,
Paul

[CS3] Efficient Way Of Replicating MovieClips?
On my main timeline I have two dynamic text boxes and an input box that represent a math problem. I wanted there to be three problems on the screen at a time. Since I don't know much about classes and making packages I just copied and pasted the problem twice so that I have three instances of each text box. Next I basically just tripled my lines of code, one block for each of the three problems.

I'm assuming the proper way to handle something like that is to make the problem a MovieClip and then make a class for it. However, when I attempted to do that I got errors [possible undefined function] because code that still remained on the Main Timeline was referencing functions that had been moved from the Timeline into the mcProblem class. Could I change the code on the Timeline so that I won't be getting these referencing errors? If not, could you please provide some detailed information about what I should do regarding classes? Currently I am not using a document class.

If anyone understands what I'm trying to do, please guide me in the right direction. This is my first attempt at a solo project (for fun) and while I can achieve the desired swf sloppily I prefer to learn to do it the clean and efficient way.

Replicating Files On A Desktop In AS
Can i replicate files and create folders on a users desktop through actionscript?

Im creating a template builder that will have to replicate my swf's, write a variable to a html page where my flash is embeded, write a xml file, and create a folder on a users desktop with all the files above?

Is this possible in as or as3? Do I need to write my application in VB or flex instead?

Replicating HTML Forms
I am trying to put a HTML form into flash that has hidden fields. How can I put these in flash? Do I just set a variable value under the submit button function? Thanks!

Indications On Replicating Effect
Hello. I would like some indications on how to replicate the transition effect between the images on this site: link (the transition effect with the squares). Please offer some ideas on how to do that effect. As many indications as possible are welcomed. Thanks.

Replicating Left And Right Mouse Clicks
Was wondering whether anyone knows if it is possible to replicate a left and right mouse click in flash.

Need to distinguish between whether the user has right clicked their mouse or left clicked....also any ideas on replicating a double click?

Cheers....

Replicating The Menu On ERAIN Homepage.
The header bar of the Electric Rain webpage has a very nice effect when you rollover the buttons. I am just wondering if anyone knows how to re-create this effect. Also how to make the little pop-up bubble when rolled over the logo.

http://www.erain.com

Replicating This Effect With Bitmapfilter (Effects)
Hey there all, I'm just trying to replicate this effect

http://www.reactiondynamics.com/sd2.swf

using flash. So far, using Senoculars blurred trails example on his website, I've got this: blurtrail2.fla

Only, it doesn't look right and I'm not sure how I can get it looking better. For instance, how can I remove the spacing that appears as dots spin, and also, how do I elongate the trail, and make the blur falloff ? If it can't be done in flash, what program can I do it in?

Any help appreciated

Help Needed On Styling And Replicating Text Field
As a new AS3 coder I'm at a little bit of a loss on the most efficient way to replicate a styled text field.

I would like to use the following styled text info and load some text from an array. Do I need to create all this styling for every instance of the text in the array or can I create several new instances of the field in my function?

Thank you in advance for your help.


ActionScript Code:
var headlines:TextField = new TextField();var headline:TextFormat = new TextFormat();headline.size = 20;headline.font = new HelvBlack().fontName;headlines.alpha = 0;headlines.setTextFormat(headline);headlines.embedFonts = true;headlines.autoSize = TextFieldAutoSize.LEFT;

Replicating Photoshop Text Tool Antialiasing Settings In Flash 8?
Does anyone have any custom antialiasing settings to match up with the 4 settings: smooth, sharp, crisp and strong?

Thanks

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