Scrollable Content


#1

Hi,
Is it possible to create scrollable content similar to the functionality of a website…for example, a large amount of content that flows beyond the screen as a screen relative piece of content and when the user slides their finger up the screen the content moves with it?

Thanks for your help!


#2

You should be able to. Just setup a scroll bar and set it to change the position of your content.

Ex. Look at the zapbox example code they have posted for the xylophone and has a slide bar in it that you could probably copy and use for this.

Steve


#3

Thanks so much - I’ll take a look at that :slight_smile:

Thanks again


#4

Hi Luke,

Have you had a chance to experiment with @stevesanerd’s suggestion?

You could use a screen position pointer function within a pointerdown event handler to store the position where the event occurred.

You could then add some code which compares the position of a current pointerdown event with a previous pointerdown event, and edit the position property of your objects accordingly.

Pointer Present Events

Hope this helps.

Thanks,
Seb


Create a line pointer that tracks with a 3d object?
#5

Hi Sebastian,

Thanks so much for your suggestion and link. I am struggling to make this work actually (Im very new to code and come from a design background). I have decided in this case to not worry about the scroll tab on the side and try to have the users finger control the vertical position of the content…like a website on an iphone for example with left and right movements disabled. I will keep experimenting but if you are able to provide a little more info on this for a very basic coder that would be fantastic?? Sorry if this is super basic but I really appreciate your help.

Thanks so much,
Luke


#6

Hi again Luke,

Have you had any luck so far?

Touch functionality is actually a little complex, so don’t worry too much if you don’t get it the first time round.

We do have a 2D photo feature template which works in much the same was as our 3D photo feature symbol, except without z axis functionality.

photofeature2D.zpp (2.1 MB)

With this template you’re able to move an image through touch, which could help you out with your functionality.

Also, we have a few sections on our documentation site which offer an introduction to scripting if you’re looking to dive a bit deeper into Studio’s features.

General Principles

Typescript Primer

Scripting Examples

Once you’ve had a chance to go through a few of these, and some of our tutorial projects, you should find that it’s not as scary as it seems and hopefully you’ll be able to create even more amazing experiences with your new skill.

Hope this helps.

Thanks,
Seb