How do I make scrollable content ?

0 favourites
  • 5 posts
From the Asset Store
Template for scrollable list, fully documented in comment and video
  • Hi there,

    I have just started using construct 2, it looks very nice and we are considering using it for our new game. However one feature we need and I didn't find how to achieve is "scrollable content". What I mean by "scrollable content" is the same thing you can do in an HTML page on a DIV with the CSS property overflow set to scroll. For example .

    I have found an attempt with construct described here: but it seems to only works with lines of text. What we need is to have any kind of content to be scrollable (sprites, buttons, etc.). It must also work on touch devices.

    Any ideas on how we can implement this?

    Thanks a lot.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Sorry the 2 links I had in my previous message were automatically removed....

    Search google for "css overflow scroll example" to see what i am trying to describe.

    Search this forum for "[Behavior] scrolling (for text/sprite font plugin)" to see the example with text only.

  • Hey,

    So I tried to build such a widget myself.

    I used a sprite with a DragDrop behavior attached set axes vertical only, pinned some other sprites on it to scroll with and added two sprites above and under with a blend mode set to source out to hide the scroll pan where you should not see it.

    Better than words please look at the attached project to understand the trick I used.

    There are still several problems :

    • using the builtin DragDrop there is no momentum scrolling as you are used to see on touch devices
    • scrolling doesn't end at the end of the pan
    • having to add 2 sprites to hide content rather than 1 to make content visible is rather tedious. I dindn't find how to do the other way
    • there is no scroll bar

    I'd greatly appreciate comments on this and ideas on how to fix the above issues

    Thanks a lot.

  • nemoidstudio

    This is what i've got so far:

    You're gonna need the Boundary behavior to open it.

    [attachment=0:3kn94ziw][/attachment:3kn94ziw]

    in your capx you could use the Boundary behavior to bound ScrollPan to a certian point where you can't scroll up or down.

  • Wisdoms

    Thanks for the Boundary behavior, one problem solved!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)