Scrolling Ticker Tape Help (loading text from JSON)


(Jeremy Anderson) #1

I’m trying to teach myself Hype and have been stumbling around a bit. Working on a new project to add an HTML widget for a digital signage screen. I need to output the Title and Description from the following JSON url feed.

https://www.menloschool.org/live/json/news/group/digital%20signage/tag/Athletics

Ideally, it will read through and then return to the first item again. I want to set the display area to 1800 wide x 100 tall pixels (so it will scroll across the bottom of my page in the designated area).

Would welcome any advice on how to accomplish this. Thanks all!


Get the width in pixels of a Dynamic text string
Parsing JSON for Calendar Feed
(Hans-Gerd Claßen) #2

https://forums.tumult.com/search?q=json

you may also attach your hype-attempts which makes it easier for someone to help …


(Mark Hunte) #3

This great example by the legend @h_classen :grinning: should work with slight changes

And there is probably one way to skin this cat for the actual ticker tape…

tickertape.hype.zip (13.3 KB)


(Jeremy Anderson) #4

Hi Mark,

Thanks for posting this, I am very appreciative! I downloaded and tried to run it but it doesn’t appear to do anything (neither with Hype or in browser preview). Are there some setup steps I need to run in order for this to load? Very thankful that you took time to put this together and look forward to trying it out:)


(Jonathan Deutsch) #5

The loading is being restricted by the browser’s security policy not allowing cross-domain XMLHttpRequests. You can get around this problem by choosing Develop > Disable Cross-Origin Restrictions in Safari and then reloading the page. You’ll then see the scrolling behavior.

I definitely recommend changing the setting back when you’re done!


(Mark Hunte) #6

The problem is with the json file being on a server at a different domain. In Safari you can disable cross domain restrictions to see it working. I assume you will have control over the actual access to the file…?

More info you actual setup and where the real file will be coming from. is needed for further help

In the mean time here is the same example that use a local file

http://markosx.com/hypeTests/tickerTape/


(Jeremy Anderson) #7

Question: If I plan to zip this up as an HTML widget, are there any special steps I need to do in order for it to play correctly?

I am planning on running this on a PC which uses a digital signage playback engine. The software I use accepts and plays .wgt files. I usually zip up the website directory and rename .zip to .wgt and then publish the widget to the local machine. Not sure if there are any steps I need to do in order to accomplish this goal. I appreciate your assistance Tumult community!


(Mark Hunte) #8

knowing nothing how this signage engine works and it setup I can not say for sure but the one thing that you have not told us is how you really are accessing the json file?

So as I said before you may run into security issues related to cross domain access. i.e your widget on a local machine or server and the file on another.

One way to avoid that is to put the son file in the project and set the path for the request to post to it like so:

request.open('GET', '${resourcesFolderName}/Athletics.json', true);

tickertape2.hype.zip (19.2 KB)