Vertical & Horizontal scroll view?

I am trying to make a scroll view that can scroll horizontally and vertically but can also hold groups, buttons, objects, etc. I am creating a building where the user can add stores and I want the to be able to move around the building. I would also like them to be able to pinch/zoom so they can navigate the building a lot easier. I looked at a few parallax examples on the forum but none of them support pinch/zoom or momentum scrolling.

The scroll view will basically hold every object in my game so I would like to keep it as efficient as possible. Is this something that is readily available in Corona or would I have to make my own module for this? A game called Tap Pet Hotel is exactly the “scroll view” that I am trying to achieve.

Thanks in advance [import]uid: 63320 topic_id: 14412 reply_id: 314412[/import]

For that sort of thing you would likely have an easier time looking at this; http://developer.anscamobile.com/code/parallax-scrolling-module

Peach :slight_smile: [import]uid: 52491 topic_id: 14412 reply_id: 53343[/import]

Peach,
That is what I originally started to implement but it doesn’t support momentum scrolling or pinch to zoom. Those are two features I would really like to include with my app. Are these things that I would be able to add on to the module? Also, the scene is going to contain multiple buttons and event handlers, will this run smoothly or be supported?

Thanks! [import]uid: 63320 topic_id: 14412 reply_id: 53448[/import]

Whether or not you can implement them will depend largely on your skill level. Although for the pinch zoom you can look at this to get you started; http://developer.anscamobile.com/code/pinch-zoom-xl

For performance, it should - unless you’re using a very weak device or have a ridiculous amount of objects, listeners and Runtime listeners :wink:

Peach [import]uid: 52491 topic_id: 14412 reply_id: 53521[/import]

Thanks Peach! What about scrolling with momentum? Just like the scrollview handles it’s scrolling. [import]uid: 63320 topic_id: 14412 reply_id: 53854[/import]

There are a few examples around but this might be code you could work with; http://developer.anscamobile.com/forum/2011/07/13/gap-when-drag-scrolling-background

It was originally posted due an issue with a gap, but that was remedied - you’d want to tweak the settings a bit so it “flicked” more easily, probably - but maybe a starting point?

Peach :slight_smile: [import]uid: 52491 topic_id: 14412 reply_id: 53885[/import]