IT S WORK!!! IN MY DEVICE !!
Two last questions, and i have finish.
My text is normally on my page ‘Pronostics’ ONLY and he display on all pages like you see on photos.
i think is a problem of groupe:insert in my view2.
and second problem, like you can see on photo, my text have 3 lines but the original file 14 lines…
Do you have ideas and thank you very much again…
It looks like these
ligne[i] = display.newText( ligne[i], 10, 10*i, native.systemFont, 24)
are not getting inserted into the scene’s view (group). Add this line just after your function call:
local function networkListener ( event )
local group = scene.view
then after your display.newText, do this:
ligne[i] = display.newText( ligne[i], 10, 10*i, native.systemFont, 24)
group:insert(ligne[i])
Then storyboard will manage those text items.
Hello rob, i did what you said, and it work, more preciasly, the text is not on all pages only in the good page so one problem resolv.
The second problem is always here! My device display 3lines instead of all the text, you can see my problem in my image : http://www.hostingpics.net/viewer.php?id=512964Screenshot20130720103807.jpg
It’s the last problem…
Are you talking about the text overlapping each other? This one is pretty simple:
for i = 1,nbr_pronos do
ligne[i] = display.newText( ligne[i], 10, _ 10*i, _ native.systemFont, 24)
ligne[i]:setTextColor(0,0,0)
end
See the 10 * i ? You are moving your text down 10px for each line. Your font size is 24, which roughly means 24 pixels high. You need to be multiplying your i variable by at least 24, perhaps more to get you more line spacing.
Maybe:
for i = 1,nbr_pronos do
ligne[i] = display.newText( ligne[i], 10, _ 36*i, _ native.systemFont, 24)
ligne[i]:setTextColor(0,0,0)
end
to give you a 1.5 line spacing…