-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I use this scroll? #4
Comments
https://github.com/fljot/Gestouch PanGestureEvent At 2014-10-23 21:37:45, "soniko" [email protected] wrote: Hi, Pavel! Yesterday, I'm started to use your TouchScrolling library, but I still can't understand, how to work with it correctly. Could you help, please? I have a Sprite in a FlashDevelop project and I want to scroll it. private var touchScroller:TouchScrollModel; What should I do next? How to link sprite with touchScroller? I've also tried to use TouchScroller class as follows: private var touchScroller:TouchScroller; and have few errors: TouchScrollManager.as(1797): col: 57 Error: Please, support me, how can I correctly use your TouchScroller library? Thanks in advance! — |
@Soniko @fykyx521 Will speak only for this branch https://github.com/fljot/TouchScrolling/tree/features/decoupled-architecture So there's this model TouchScrollModel, which does all the calculations based on your input. So you need to configure it:
2, Specify callbacks to be executed when scroll position will be recalculated (during dragging or throw):
I'm sorry, but you will need to dig into code a bit as I don't have documentation or examples. So the first part – configuration – is done. Now you need to update model when you interact with your interactive object. This way this model is totally independent from rendering (e.g. you can use it for regular sprites, for flex or custom components, for Stage3D engines – whatever). |
Feel free to share your progress and help each other. I'm busy, but could help you in case you stuck. |
Hi, Pavel!
Yesterday, I'm started to use your TouchScrolling library, but I still can't understand, how to work with it correctly. Could you help, please?
I have a Sprite in a FlashDevelop project and I want to scroll it.
I use the code:
private var touchScroller:TouchScrollModel;
...
touchScroller = new TouchScrollModel();
touchScroller.setViewportSize(stage.stageWidth, stage.stageHeight);
What should I do next? How to link sprite with touchScroller?
I've also tried to use TouchScroller class as follows:
private var touchScroller:TouchScroller;
...
touchScroller = new TouchScroller();
addChild(touchScroller);
and have few errors:
Type was not found or was not a compile-time constant: PanGestureEvent.
Please, support me, how can I correctly use your TouchScroller library?
Thanks in advance!
The text was updated successfully, but these errors were encountered: