Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Changing scrolling speed of marquee programmatically

I'm struggling the change the "value" attribute which sets the scroll speed of the marquee. In my widgets.gui I have 

<use value="1" id="marquee" href="#marquee-text"  font-size="32" y="50%-40" width="100%"
    height="80" fill="white" mode="1">
    <rect width="100%" height="100%" fill="white" opacity="0.2" />
    <set href="group/text" attributeName="text-buffer"
         to="Hit the scramble button!" />
    <set href="group/separator" attributeName="width" to="150" />
      </use>

and in my index.js I am trying to adjust the speed with button pushes. 

const marquee = document.getElementById("marquee");
marquee.state = "enabled";

const increase_button = document.getElementById("increase");
increase_button.onactivate = function(evt) {
  marquee.value = 25
  console.log("Increase Button Pushed")
}

the speed isn't changed when the button is pressed. The console outputs "Increase Button Pushed".When I try 

console.log(marquee.value)

 It logs "undefined". I am very confused on how to change the speed of the scrolling of the marquee

 

Best Answer
0 REPLIES 0