Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Consig1iere

Simple Text scrolling with ThrowProps on iPhone/iPad.

Recommended Posts

Hello everyone, I am very new to Flash, AS3 and Greensock. I've used basic movement animation with TweenLite and I'm really content for its ease of use. I thought I'd give Greensock a try (i've heard great things about it). Whatever examples including the textscroll example I've found are too complex for me. I'm trying to make a movieclip container (static text inside) scroll up/down with a frame mask with the famous "elasticity" effect exactly like the example shown in Throwprops page. I've watched the video on the ThrowProps page but that only shows how to animate but not touch and flicking. Can someone please give me a simple code? Thanks a lot.

 

ps. Here is my simple example file: http://goo.gl/3KvQG

Link to comment
Share on other sites

Hello,

 

Welcome to the GreenSock Forums.

I don't know that there is really a simpler way to explain what you need to do than what has been provided already. ThrowProps uses a very advanced algorithm to achieve realistic throwing from any starting velocity. Also accurately detecting that starting velocity based on a drag can be kind of intense. Fortunately GreenSock did that thinking for us and has provided those files.

 

As for the more simple panel flick scroll example that GreenSock provides on the ThrowProps page that doesn't require ThrowProps, I don't know how that can be simplified either;(

 

In the past I did convert that file to use assets in the library instead of loading them externally. This file may make it easier for you to implement your own artwork. I have attached it below.

I haven't done any implementation of actual TOUCH or SWIPE events as I don't really do any AIR for mobile dev at the moment.

 

Carl

PanelScroll_noLoad_CS4_source.zip

Link to comment
Share on other sites

Hello,

 

Welcome to the GreenSock Forums.

I don't know that there is really a simpler way to explain what you need to do than what has been provided already. ThrowProps uses a very advanced algorithm to achieve realistic throwing from any starting velocity. Also accurately detecting that starting velocity based on a drag can be kind of intense. Fortunately GreenSock did that thinking for us and has provided those files.

 

As for the more simple panel flick scroll example that GreenSock provides on the ThrowProps page that doesn't require ThrowProps, I don't know how that can be simplified either;(

 

In the past I did convert that file to use assets in the library instead of loading them externally. This file may make it easier for you to implement your own artwork. I have attached it below.

I haven't done any implementation of actual TOUCH or SWIPE events as I don't really do any AIR for mobile dev at the moment.

 

Carl

Hi Carl, thanks a lot for your response, Air for mobile registers Mouse clicks/drags and touch/swipe gestures as far as I know. I've got a question, the file that you've provided, since it is one big movieclip container so for example although Panel2 is not visible at first but isn't the whole container loaded in the memory or is it just Panel1 is loaded or whatever the view is? The reason I ask because if I make a book with lots of pages all in one container, wouldn't that effect the performance? Thanks.
Link to comment
Share on other sites

Sure there could definitely be a performance hit based on the number of panels or the complexity of nested movie clips within each panel. Using the file I sent, yes, all those panels would be in active memory.

 

You could configure your app so that only 3 panels are ever available at 1 time. The panel you are on, the panel to the left, and the panel to the right. Or maybe after testing you find that your app performs ok with up to 10 panels at a time. Will probably take a bit of work to find a system that works best for you.

 

You may want to look into GreenSock's Blitmask which makes scrolling very long display objects very efficient as well.

Link to comment
Share on other sites

Carl, thanks for the info (knowledge is power)! Sorry to bug u again but going back to my original post...I'll try not to be repetitive, I am trying to do exactly something like this: http://goo.gl/70Fo6 except my Movieclip is a container with static text inside. So far I somehow managed to modify one of the file from another post according to my needs, but whenever I click on the MC, it slightly shifts couple pixels to the left and it cuts a bit of the text. So basically I'm trying to keep the masking same scale as the mc container.

 

Here is the file if someone can fix that little issue I'd really appreciate it: Scroll_Test.fla (Flash CS5)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×