Show popup from text

Hi guys

I’m trying to insert text in popups that display on the screen, where throughout the text some words are like buttons to call the popup 

for example 

blablablablablablablablablabla 

blablablablablablablablablabla 

blablablablablablablablablabla 

blablablablablablablablablabla 

blablablablablab [POPUP] home 

blablablablablablablablablabla 

anyone know how to do this?

Hi @isac.a2soares,

You won’t be able to add links to specific words within one large block of multi-line text, so you’ll need to output the words individually and make certain words touch-able. Or, you’ll need to find some way to calculate the location of these words and place an invisible touch object over the bounds of that word.

Best regards,

Brent

Thank you Brent, I think I did not explain right. 

I have a code that is getting the txt file, and inserting line by line, can also isolate each word. 

The idea is even assign a function preceded by the word “POPUP” 

example 

if (string.find (word, “popup”) ~ = nil) then 

… 

end 

  • After treatment and preceded by the word “POPUP” 

localstr = string.gsub (localstr, “popup”, “”) 

'Where localstr is variable with the stored text 

think that’s it, I need help assembling this logic. 

thanks for listening

I’m not sure that I still understand what you’re trying to do. 

A community user came up with a way to do HTML type text.  You  might find this library a bit useful.  It is of course not supported:

http://forums.coronalabs.com/topic/36617-here-is-my-styled-text-html-parsing-textwrapping-module/

Rob

Hi @isac.a2soares,

You won’t be able to add links to specific words within one large block of multi-line text, so you’ll need to output the words individually and make certain words touch-able. Or, you’ll need to find some way to calculate the location of these words and place an invisible touch object over the bounds of that word.

Best regards,

Brent

Thank you Brent, I think I did not explain right. 

I have a code that is getting the txt file, and inserting line by line, can also isolate each word. 

The idea is even assign a function preceded by the word “POPUP” 

example 

if (string.find (word, “popup”) ~ = nil) then 

… 

end 

  • After treatment and preceded by the word “POPUP” 

localstr = string.gsub (localstr, “popup”, “”) 

'Where localstr is variable with the stored text 

think that’s it, I need help assembling this logic. 

thanks for listening

I’m not sure that I still understand what you’re trying to do. 

A community user came up with a way to do HTML type text.  You  might find this library a bit useful.  It is of course not supported:

http://forums.coronalabs.com/topic/36617-here-is-my-styled-text-html-parsing-textwrapping-module/

Rob