How do I scroll a layout?

Get help using Construct 2

Post » Tue Dec 13, 2016 3:20 pm

Hi! I´m trying to make an App that allows you to scroll up/down (like in the YouTube App, where you can scroll on one layer when you touch the screen and move your finger up/down), but I can't find any action that changes the position of a layer. Is there any option, or do I have to change the position of every single object whenever I want to scroll? Thank you for your reply!
B
21
S
6
Posts: 155
Reputation: 1,717

Post » Wed Dec 14, 2016 6:44 am

Invisible panel > add behavior (drag and drop) > set it on horizontal or vertical (which ever you want) > pin all the object on the invisible panel
B
79
S
31
G
7
Posts: 148
Reputation: 9,179

Post » Thu Dec 15, 2016 6:32 pm

Thank you :) I'm going to try now.
B
21
S
6
Posts: 155
Reputation: 1,717

Post » Fri Dec 16, 2016 2:02 am

You're welcome :D Enjoy!
B
79
S
31
G
7
Posts: 148
Reputation: 9,179

Post » Tue Dec 20, 2016 3:48 pm

clarkkentnicdao wrote:You're welcome :D Enjoy!

Sorry, how can I make that the invisible panel doesn´t go out of the layout limits in the x-direction? (The scrolling is only in the y-direction)
I´ve tried making the panel solid and putting solid objects on the left and on the right side, but it didn´t work. I also tried comparing the X of the invisible panel, and if it was not equal to 0 it had to set its X to 0. This did almost work, the problem is everything moves outside the layout (when dragging) and once you finish dragging, it jumps to the correct position.
Once again, thank you :D
B
21
S
6
Posts: 155
Reputation: 1,717

Post » Thu Dec 22, 2016 11:06 am

clarkkentnicdao wrote: set it on horizontal or vertical (which ever you want)

@clarkkentnicdao Sorry, how can I make that the invisible panel doesn´t go out of the layout limits in the x-direction? (The scrolling is only in the y-direction)
I´ve tried making the panel solid and putting solid objects on the left and on the right side, but it didn´t work. I also tried comparing the X of the invisible panel, and if it was not equal to 0 it had to set its X to 0. This did almost work, the problem is everything moves outside the layout (when dragging) and once you finish dragging, it jumps to the correct position.
Once again, thank you :D
B
21
S
6
Posts: 155
Reputation: 1,717


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests