Skip to main content
Mr. Baker the Shoe Maker
Inspiring
February 11, 2015
Question

Tweening from frame to frame. Greensock or native AS3?

  • February 11, 2015
  • 1 reply
  • 862 views

I have a book project in which I would like the use to swipe left or right from page to page (frame to frame). In the book, each page is a frame so as the user swipes left or right they will move from page to page. I want to add some visual interest when the user swipes. This could be the content on the page moving left as the use swipes. I don't want the page to just appear when the user swipes left of right.

The problem I'm having is figuring out how to add Greensock functionality (e.g. Throwpops, FrameLabel plug-in etc.) without triggering a movieclip. In my case I want the user to be able to swipe left or right to go to the next frame. I also want to add some visual interest as they swipe from frame to frame.

I've been researching Greensock solutions that tween frames. I've found the FramePlugin, FrameLable, etc. However, each of those requires the trigger to be the movieclip. However, I would like for a swipe to be the trigger instead of touching or interacting with a movieclip.

Is this possible with Greensock? Or is there a tweening solution (tween class) native to adobe that will allow the pages to animate. Or is my approach to this wrong? Help appreciated.

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
February 12, 2015

having your pages on frames is problematic for achieving a seamless transition from page-to-page.

your pages should be movieclips with class names so you can create instances using the 'new' constructor and then you can tween your pages using greensocks tweenlite.

Mr. Baker the Shoe Maker
Inspiring
February 13, 2015

kg,

How would you propose I go about this give the following:

  • It’s a book with 14 chapters. In this case the chapters are the scenes.
  • It has over 230 pages and each page has graphics (movie clips). The pages are represented in the frames.
  • When the user comes to the initial screen they click a button to go to a chapter (scene).

You are saying I should put everything in movieclips and use “new” and add them to the stage. I understand this, however, with so many chapters and pages, are you saying:

I should work from one frame and one scene and not use any additional frames or scenes? If so or not, how do you think I should move forward?

kglad
Community Expert
Community Expert
February 13, 2015

when starting your project, you should have done what i suggested if you wanted a seamless transition from page to page.

at this point it sounds like you've already invested a significant amount of time/effort to set up your project using frames and scenes and are unwilling to redo the entire project.

if that's so, you'll just have to make do with what you've got which means you should forgo the seamless page transitions.

you might be satisfied with something like fading out a current page and then fading in the next page.  cross-fading is not possible with your current setup.  or you might be satisfied by tweening the current page off-stage and tweening the next page on-stage, but again doing both at that same time is not possible with your current setup and will be more difficult than the page fades.