Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Tweening from frame to frame. Greensock or native AS3?

Engaged ,
Feb 11, 2015 Feb 11, 2015

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.

TOPICS
ActionScript
794
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 11, 2015 Feb 11, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 13, 2015 Feb 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 13, 2015 Feb 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 13, 2015 Feb 13, 2015

I haven't started putting the assets into the project so I have a blank slate. So I'm open to suggestions. I am asking for planning purposes.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 13, 2015 Feb 13, 2015
LATEST

make each 'page' a movieclip with its own class.  create class files to control the behavior of each page.

then use the suggestion in message 1 to control the 'creation' of the pages and the 'out' tween of the current page and 'in' tween of the next page.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines