home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
3D World 142
/
3DW_142.iso
/
mac
/
Interface
/
POPUP.dir
/
00004_Script_ouid
< prev
next >
Wrap
Text File
|
2009-03-18
|
943b
|
41 lines
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
--put "formatting: " & aTxt
aTxt.fontSize = 14
aTxt.antialias = true
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 )
aTxt.char[ greenStart ].delete()
aTxt.char[ i-1 ].delete()
greenStart = 0
end if
end if
i = i + 1
end repeat
end