Blog Post
PreethiR-45f9fe
5 years agoCommunity Member
A conversation style example for this week's scrolling panel challenge.
Depending on the position of the scrolling panel, the text on screen changes, and finally when the viewer reaches the end of the scrolling panel, a pop-up opens.
Demo:
https://preethiraviswork.s3.ap-south-1.amazonaws.com/Scrolling+Panel+%23273/story_html5.html
Source File:
https://1drv.ms/u/s!Au1gvyveDBYQumrQOj2lJvphwdLa?e=Sab1U0
Depending on the position of the scrolling panel, the text on screen changes, and finally when the viewer reaches the end of the scrolling panel, a pop-up opens.
Demo:
https://preethiraviswork.s3.ap-south-1.amazonaws.com/Scrolling+Panel+%23273/story_html5.html
Source File:
https://1drv.ms/u/s!Au1gvyveDBYQumrQOj2lJvphwdLa?e=Sab1U0
- RemaMerrick-aa05 years agoCommunity MemberPreethi - simple but very practical design. I'm going to find a way to use this type of scrolling panel with the phone on one of my upcoming projects. Thanks. Great job!
- Jonathan_Hill5 years agoSuper HeroThis makes great use of that very familiar act of scrolling through a WhatsApp conversation.
Would be interested to learn more about the variables that power this. Impressive.- PreethiR-45f9fe5 years agoCommunity MemberThanks, Jonathan. It's the power of javascript + variable. Here is the javascript that captures the scrollbar movement.
var x = document.getElementsByClassName("scrollarea-area");
x[0].scrollTop = 0;
var height = x[0].scrollHeight - x[0].offsetHeight;
x[0].onscroll = function(){
var player = GetPlayer();
player.SetVar("num",x[0].scrollTop);
};
I had created trigger in storyline for the variable 'num'. Everytime, the scrollbar moves, the variable 'num' value changes. Based on the 'num' value, the text state i changed.- Jonathan_Hill5 years agoSuper HeroThanks for sharing! Good to know!
- alexjinca5 years agoCommunity MemberBrilliant example, Preethi! Thank you very much for providing the JS script and thanks for sharing! I've used the JS code in my example to make the announcement at the end pop up after the scroll ends.
- RichardMulcahy5 years agoCommunity MemberLoved it!
- PaolaRattu-ea2f5 years agoCommunity MemberVery nice. The javascript + varaible trigger is really a useful tip!!
- BernieTremblay5 years agoCommunity MemberI need to learn more JS!! Brilliant!!
- CatalinaSandor3 years agoCommunity MemberPreethi - this seems awesome, even if it's going over my head a bit. I was wondering if maybe you can help with a question: I would want setup the course navigation through scrolling using scrolling panels. Would it be possible that your code would work for me so that when the panel reaches the end it would go to the next slide, when it's in the first position it would take the users to the previous slide and middle position would be the automatic starting point?