Menu
  • HOME
  • TAGS

ROKU: Associative Array with multiple values

arrays,roku,brightscript

You don't need to do any of that. Just send the JSON array and Roku will parse it: BrightScript Debugger> myJSON = "[1998,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014]" BrightScript Debugger> ? type(myJSON) String BrightScript Debugger> arr = parseJSON(myJSON) BrightScript Debugger> ? type(arr) roArray It's perfectly valid to have array as top-level element of the json...

Change default font roFontRegistry in Roku

fonts,roku,brightscript

Use Font=FontInterface.Get("Univers",36,false,false) FontSmall=FontInterface.Get("Univers",15,false,false) Insted of Font=FontInterface.GetFont("Univers",36,false,false) FontSmall=FontInterface.GetFont("Univers",15,false,false) ...

Roku animation using animated sprites, how to create the tedious xml

xml,animation,sprite-sheet,roku,brightscript

Actually, you don't have to use XML files for sprite animations. Just be aware that frame's dimensions must be set. Follow the example bellow for a loading sprite with 128x128 dimensions and 12 frames: compositor = CreateObject("roCompositor") compositor.SetDrawTo(screen, &h80) compositor.NewAnimatedSprite(576, 296, GetLoadingSpriteRegions()) Function GetLoadingSpriteRegions() as Object arr = [] bitmap=createobject("robitmap","pkg:/images/loader_sprite.png")...

roUrlTransfer in BrightScript

xml,json,roku,brightscript

Yes, as long as the url is accessible to the Roku, you can host it as a static json or xml file. You don't need a full blown web service. In fact, a significant number of the channels available on the Roku are driven by static MRSS feeds....

No response from Vimeo API on GET request

json,vimeo,vimeo-api,roku,brightscript

To make HTTPS/SSL requests in BrightScript, you need to explicitly set the certificates file. Try this: req = createObject("roUrlTransfer") req.setCertificatesFile("common:/certs/ca-bundle.crt") req.setUrl("https://vimeo.com/api/v2/user17146517/albums.json") response = req.getToString() print "response: "; response ...

Roku - page not loading

roku,brightscript

My guess is your computer and Roku are connected to different networks and Roku is unreachable from the PC. Note one is on 192.168.2, the other - on 192.168.3 network. Either you have multiple routers (maybe cascaded) or one router but one of the devices is connected to "guest" WiFi...

Brightscript plugin: How to access user variables in processEvent

brightscript

They should be in m, which is the BrS equivalent of self/this. I.e. when for a PizzaBuilder's instance pb the method (or event; "member function" really) pb.processEvent() is called, inside it a magic variable m points to pb. So what you asked for - based on PDF sample - is...