youssefsherif
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2022
04:16 PM
Re: impoting data from a json file
x = 10
for j = 0 to json.Count() - 1
m.tile[j] = createObject("roSGNode", "Tile")
m.tile[j].width = 300
m.tile[j].height = 200
m.tile[j].translation = [x, 300]
m.tile[j].titleText = json[j].title
m.tile[j].descriptionText = json[j].description
m.tile[j].posterUrl = json[j].poster
m.top.appendChild(m.tile[j])
m.tile[j].setFocus(true)
x += m.tile[j].width + 10
end for
hello im sorry but i cant figure out why the code keeps crashing, the reason im doing this in an array is to use it later in the code
renojim
Community Streaming Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022
11:00 AM
Re: impoting data from a json file
What error are you getting on the console?
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.
youssefsherif
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022
03:56 PM
Re: impoting data from a json file
renojim
Community Streaming Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022
10:11 PM
Re: impoting data from a json file
You need to create the m.tile array before you start using it. Before the for loop try adding
m.tile = []
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.
youssefsherif
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2022
04:19 AM
Re: impoting data from a json file
worked perfect thank you so much again!!!
- « Previous
- Next »