When I run the below code my roku has a black screen and eventually crashes.I think the issue is the while true loop but I haven't figured out how to have a wait or sleepI found sleep() but it did not do anything to stop the crashNeither did a thing with wait(0,port) (I may have implemented it wrong)
Here are all my files, their names and locations are designated by "FILE pkg:/*****/****.***"
Yeah, you can't do stuff like that on the UI thread - i.e. not in any visual component.
You could create a 'Task' node which updates its ballXPos field on an interval, and have the UI code watch that field and update the x position when it changes.
Or if you don't want to bother with tasks, you can use a Timer node set to repeat and run your game loop code in that:
View solution in original post
Thank you! This works really well!A few things about their example for others who might find this thread :Make sure to change the "extends" thing from "Group" to "Scene"And you can also set the timer to really low values like 0.01