FORUMS: list search recent posts

as2-pageflip

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Richard Williams
as2-pageflip
on Sep 21, 2008 at 9:57:48 pm

Hi,
Ok, so not to worry about the page flip actions, i have all of that down to a fine art now, but can you see how this website is doing what it is doing with its book? I am thinking it is a pre-page running actions to keep contents central, but i have no idea how to do this... anyone got any ideas? http://echopathy.com/jjc_pageflip.html
i have a .swf fully working with the page flip actions, its the centralization i am interested in only. my site http://www.rossfriday.com (takes a bit of loading beacause of its size. I can post link to sources if required...?

Thanks.

Richard



Return to posts index

Pieter Helsen
Re: as2-pageflip
on Sep 21, 2008 at 10:17:29 pm

I'd use the setInterval function to constantly check the position of the book movieclip and use that to keep it centered.

Your code would look something like this:
var myInt:Number = setInterval(centerPos, 50);

function centerPos(){
book_mc._x = Stage.width / 2;
// or book_mc._x = Stage.width / 2 + book_mc._width / 2;
// depends on your positioning
}

This, of course, all depends on what your flash looks like, but that's how I'd do it.

Kind regards,
Pieter

General notice: from now on, I would like to ask everyone to put [AS2] or [AS3] (corresponding to the version of actionscript you are using on your project) in front of their post titles when the question is actionscript related! Please help us help you faster. Thank you.


Return to posts index

Richard Williams
Re: as2-pageflip
on Sep 21, 2008 at 10:28:07 pm

thanks pieter, but i'm not as clever as you unfortunately... The thing i am using, open is an open source, dynamic version of pageflip. http://76design.com/shiftcontrol/wp-content/uploads/2006/03/pageflip_v213_d...
if there is any chance ofchecking it out and seeing if it is possible to insert this function, the only problem is that i wouldn't know what frame to insert it into...? I really would appreciate it if you could find a solution, i have literally been online ALL day trying different things and its getting to me now... you know when you just become obsessed with something!!!

:s



Return to posts index


Richard Williams
Re: as2-pageflip
on Sep 21, 2008 at 10:40:26 pm

i aught to add, that the creator of the site with the effect wrote that they did the following


if(page == 0 && pageN._x>(pw*-1)){
pages._x = ((pageN._x/2)*-1)+closedPagesX;
}
if(page == 2 && pageN._x<(pw*-1)){
pages._x = ((pageN._x/2)*-1)+pagesOrigX-pw;
}
if(page == maxpage-2 && pageN._x>(pw*-1)){
pages._x = ((pageN._x/2)*-1)+pagesOrigX;
}
if(page == maxpage && pageN._x<(pw*-1)){
pages._x = ((pageN._x/2)*-1)+closedPagesX;
}

2 variables I added after pages load were:
pagesOrigX ... equal to initial value of pages._x
closedPagesX... equal to pages._x-(pw/2);

but still, i can't get it to work by doing this




Return to posts index

Richard Williams
Re: as2-pageflip
on Sep 22, 2008 at 10:09:13 pm

Ok, so i have sussed it! It is FAR too complicated to explain how, but i sussed it! If anyone wants to take a look at the code then i can upload the fla to my server, but will only do this if its requested right now because my current server is lacking in space...



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]