Scrolling Ticker

How to create a scrolling ticker of text

 

Ever watched the news and seen a scrolling text banner at the bottom of the screen, showing headlines or sports results, or stock market data? This is how to create that effect in Project Spark

Instructions

(I am going to use the short form vector assignment – see Using Vectors)

WHEN DO [vectorvar:ticker][=][world up][multiplied by][-0.8][+][east][multiplied by][numvar:x pos]
WHEN [once] DO [numvar:start pos][=][1.5] 1
WHEN [once] DO [numvar:xpos][=][numvar:start pos]

WHEN [until][numvar:x pos][<=][negative][numvar:start pos] DO [numvar:x pos][decrement by][0.01] 2
WHEN [numvar:xpos][<=][negative][numvar:start pos] DO [numvar:x pos][=][numvar:start pos]

WHEN DO [display][text:Your text here][at screen position][vectorvar:ticker][x large font]

To go left to right you make the start pos a negative number, increment instead of decrement the x pos, and change the [less than or equal to] tiles to [greater than or equal to].

Add a background to the tape like this

WHEN DO [display][square][width][20][at screen position][vectorvar:ticker]

 


Footnotes:

  1. This number will be determined by the length of your text string, it may be bigger or smaller than this – experiment until you see the text appear moving in from the right
  2. This will determine the speed of the ticker

Comments are closed.

Powered by WordPress.com.

Up ↑

%d bloggers like this: