home *** CD-ROM | disk | FTP | other *** search
- on loadTextFile aPath
- t = getNetText(aPath)
- if netDone(t) then
- txt = netTextResult(t)
- member("popup_title").text = txt.line[1]
- member("popup_info").text = txt.line[2..txt.line.count]
- parseFormatInfo(member("popup_info"))
- sprite(2).pFormat()
- end if
- end
-
- on parseFormatInfo aTxt
- greenStart = 0
- i = 1
- aTxt.fontSize = 14
- aTxt.antialias = 1
- aTxt.antiAliasThreshold = 1
- aTxt.font = "WeddingSans Medium *"
- aTxt.color = rgb(0, 0, 0)
- repeat while i <= aTxt.char.count
- if aTxt.char[i] = "<" then
- greenStart = i
- end if
- if aTxt.char[i] = ">" then
- if greenStart > 0 then
- aTxt.char[greenStart..i].color = rgb(255, 255, 255)
- delete aTxt.char[greenStart]
- delete aTxt.char[i - 1]
- greenStart = 0
- end if
- end if
- i = i + 1
- end repeat
- end
-