Reply LinkBack (2) Thread Tools Search this Thread
Old 17-10-2005, 05:21   2 links from elsewhere to this Post. Click to view. #1 (permalink)
dpc036
Senior Member
 
dpc036's Avatar
 
Join Date: May 2005
Location: St Helens
Posts: 473
Auto page turn in page turn effect

I have been working with a very good page turn effect which i got from here
it is possible to automatically turn the pages using the following actionscript
pageflip.flipForward();
but i only know how to turn every page placing this on the timeline at set intervals of 120 frames. the book i have has 40 pages so to turn every page the timeline would have to be 4800 frames. not really very ideal.

i am sure it would be possible to write some actionscript which would do this dynamically, only my knowledge of actionscript is limited to say the least.

wot i would like to achieve, if anyone can help, is to turn the page every, say, 4 seconds until it gets to the last page, page 40. and then use the following script to return to the start of the book pageflip.gotoPage(1); and do it all over again.

i would be very grateful for any help.
thank you
  Reply With Quote
Old 17-10-2005, 05:30   #2 (permalink)
Alexanda
European Champions 2008
 
Join Date: Feb 2005
Location: Amsterdam
Posts: 2,399
  Reply With Quote
Old 17-10-2005, 05:33   #3 (permalink)
dpc036
Senior Member
 
dpc036's Avatar
 
Join Date: May 2005
Location: St Helens
Posts: 473
yes ive seen that. very nice.
doesnt really help though
  Reply With Quote
Old 17-10-2005, 05:41   #4 (permalink)
gray
i still want paying
 
gray's Avatar
 
Join Date: Oct 2003
Location: newcastle, uk
Posts: 4,713
frame 1 as:
Code:
count = 0;

new blank movieclip with onclipevent:
Code:
onClipEvent(enterFrame){ _root.count ++; // assuming a framerate of 31fps if(_root.count == 124){ pageflip.flipForward(); _root.count = 0 } }

then youd need to test for the last page but i dont know what functions are provide for outputting a pagenumber

Code:
if(pageNumber == 40){ pageflip.gotoPage(1); count=0; }

something like that

Last edited by gray : 17-10-2005 at 05:51.
  Reply With Quote
Old 17-10-2005, 06:04   #5 (permalink)
dpc036
Senior Member
 
dpc036's Avatar
 
Join Date: May 2005
Location: St Helens
Posts: 473
Gray thanks for your help.
the page flip is a componet, which sits on the stage and drags in each page, which are movieclips in the library which are exported at the start.
  Reply With Quote
Old 17-10-2005, 06:17   #6 (permalink)
dpc036
Senior Member
 
dpc036's Avatar
 
Join Date: May 2005
Location: St Helens
Posts: 473
I have tried your suggestion Gray, but it doesnt seem to work.
would a copy of the file help?
  Reply With Quote
Old 17-10-2005, 06:18   #7 (permalink)
gray
i still want paying
 
gray's Avatar
 
Join Date: Oct 2003
Location: newcastle, uk
Posts: 4,713
aye that'd help
  Reply With Quote
Old 17-10-2005, 06:27   #8 (permalink)
dpc036
Senior Member
 
dpc036's Avatar
 
Join Date: May 2005
Location: St Helens
Posts: 473
whats the best way to get it to you?
  Reply With Quote
Old 17-10-2005, 07:05   #9 (permalink)
gray
i still want paying
 
gray's Avatar
 
Join Date: Oct 2003
Location: newcastle, uk
Posts: 4,713
just attach it here

you could actually use something like

setInterval(flipForward, 4000);
  Reply With Quote
Old 17-10-2005, 07:17   #10 (permalink)
dpc036
Senior Member
 
dpc036's Avatar
 
Join Date: May 2005
Location: St Helens
Posts: 473
thanks for this i really appreciate it.

ok. ive taken out alot of the pages, to reduce the size of the file. so there are only 4 of the 40 pages but you should get the idea.
the file will be used as a stand alone projector.

Last edited by dpc036 : 10-08-2007 at 10:59.
  Reply With Quote
Old 17-10-2005, 07:49   #11 (permalink)
gray
i still want paying
 
gray's Avatar
 
Join Date: Oct 2003
Location: newcastle, uk
Posts: 4,713
put this in the first frame

Code:
function turnPage() { pageflip.flipForward(); } pageflip.onLastPage = function() { pageflip.directGotoPage(0); }; setInterval(turnPage, 4000);
  Reply With Quote
Old 17-10-2005, 07:54   #12 (permalink)
dpc036
Senior Member
 
dpc036's Avatar
 
Join Date: May 2005
Location: St Helens
Posts: 473
thats brilliant. thanks very much for that.
just so i can fully understand, what is the 4000?
im guessing the higher the number the longer the page will be viewed for before the turn.
  Reply With Quote
Old 17-10-2005, 07:55   #13 (permalink)
gray
i still want paying
 
gray's Avatar
 
Join Date: Oct 2003
Location: newcastle, uk
Posts: 4,713
its an amount of milliseconds, so 4000 = 4secs
  Reply With Quote
Old 17-10-2005, 08:22   #14 (permalink)
dpc036
Senior Member
 
dpc036's Avatar
 
Join Date: May 2005
Location: St Helens
Posts: 473
Thank you very much
  Reply With Quote
Old 03-11-2005, 11:38   #15 (permalink)
dpc036
Senior Member
 
dpc036's Avatar
 
Join Date: May 2005
Location: St Helens
Posts: 473
Page Turn with embedded Quicktime movie

Following the help i received on here i have been using the following code to automatically turn the page at a set interval:

pageInterval = 6500;

_root.pageFlipInterval = setInterval(turnPage, pageInterval);

function turnPage() {
pageflip.flipForward();
}

function closeLastPage() {
clearInterval(lastPageInterval);
pageFlipInterval = setInterval(turnPage, pageInterval);
}
pageflip.onLastPage = function() {
clearInterval(_root.pageFlipInterval);
_root.lastPageInterval = setInterval(_root.closeLastPage, _root.pageInterval );
_root.gotoAndPlay(81);
}

I have however now been asked to add some quicktime movies to each page, (typical clients always moving the goal posts!) which isnt a problem.
The problem is as the page turn effect is essentially one frame in a movie and loads dynamically using actionscript, the quicktime movie starts as soon as the whole effect loads.
so by the time the book turns to say page 10 the quicktime movie may already have played.

does anyone know of a way to keep the movie from playing until the page has finished turning?
There will be a number of different movies on different pages.

Gray you where a great help last time, maybe you have a suggestion!
  Reply With Quote
Old 04-11-2005, 04:22   #16 (permalink)
dpc036
Senior Member
 
dpc036's Avatar
 
Join Date: May 2005
Location: St Helens
Posts: 473
thinking about it last night.
would it be possible somehow to give each movie an instance name, ie movie1 and add some sort of script which starts each movie at a certain time interval, as the automatic page turn is done on a time bases.

not sure how id do this though.
  Reply With Quote
Reply


LinkBacks (?)
LinkBack to this Thread: http://www.designerstalk.com/forums/flash/11980-auto-page-turn-page-turn-effect.html
Posted By For Type Date
Distance Calculator - calculator distance annuity, math distance This thread Refback 06-09-2007 18:35
Web Link This thread Refback 05-09-2007 21:24

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8