hope that someone can help. I am trying to use iScroll5 in Hype. With a simple text block everything is working like a charm. But i would like to use iScroll on more complex structures. Basically i am building a large object and i am grouping this object. This should give a a regular DIV that i can use as a wrapper (just like a simple text block object). I have somehow the feeling that this worked in previous versions of Hype.
Firstly, iScroll only scrolls the first child of your wrapper element. Unfortunately for each element you create in Hype, Hype wraps this in it’s own container so effectively there is nothing that gets scrolled. IF for example you create a rectangle element and then create something inside the innerHTML ( a <ul> list for example) then use the id of that rectangle element as your wrapper then you will see iScroll working.
Secondly, Why don’t you just change the content-overflow to ‘scrollbars’ in the Metrics inspector if you need that ‘wrapper’ group to scroll?
thanks for posting the example – i am just unable to open it. Hype is saying that it is made with a newer version of Hype. I am using 3.0.3 Pro and there are no newer updates. Would love to see your working example. But the fact you are sending this the 3rd time shows the interest in iScroll
FYI the example that @ilkka_kumpunen is offering is not using iScroll
For you to be able to use iScroll you must include (wrap) all your elements in a rectangle element with ID of whatever you want (e.g wrapper) and then you must put all of your scrolling content inside the rectangle using HTML (see attached file) this must also be in it’s own div so it can all scroll together.
ok. Would there be an issue between .hypetemplate and .hype files. I always use templates because when opening the .hype file and making changes it saves them automatically and loses the original info.
first of: thanks for the awesome support! @DBear & @Daniel – got the example working now. Just for clarification for me. In order to get iScroll working, we need following DIV structure:
But if i construct my contents in Hype, i can not achieve this structure no matter how i build and group my objects… Right?
Well, it would be really nice to be able to use iScroll. The possibilities for creating scrolling stuff (like sliders of any type) or parallax effects (even for mobile) would be exciting. Basically we could build some pretty complex stuff without having to manually create timelines etc…
Tanks again!
@ilkka_kumpunen … if you have the chance to convert it, i would LOVE to se your approach
As I said in a previous post I think, iScroll uses the first child of whatever element (ID) you choose to be the wrapper. Unfortunately, because of the way Hype is programmed, each element you create in Hype comes in it’s own wrapper div (Hype_container) so unfortunately iScroll will not work as is with Hype (unless you create your elements like above, in the innerHTML)
Just to clarify the structure
The “wrapper” div is a rectangle created in Hype. Inside this rectangle (Edit->Edit Element’s inner HTML) you create a div and then your content. The div you create here is the one that is scrolling (It is the first child of the rectangle (wrapper) element.
Hope this clarifies things for you.
I’ll upload a copy of @ilkka_kumpunen’s approach for you to be able to open and look at, here…