Maybe I'm going at this in the wrong direction. Here what I'm trying to
accomplish. When a user selects char[20..30] and presses the BOLD button
it makes the text in member "editable Text" bold and saves this to a
database ("member("aaa").char[20..30].fontstyle = [#bold]).
Later the user opens the shockwave movie and
reads("member("aaa").char[20..30].fontstyle = [#bold]) from the database
and do(database Text) gets back what they did before. Works Good :)
The Problem: When they select italic this code overwrites the bold (vice
versa) member("aaa").char[20..30].fontstyle = [#italic] so I can only
have one or the other. Not good.
So when a user selects the char for each I need to know which chars so,
I can write this (member("aaa").char[20..30].fontstyle = [#italic,
#bold])
--So I build the list for BOLD
on insertBoldText me
myTextSel = the selection of member "editable Text"
sel1 = getAt(myTextSel, 1)
sel2 = getAt(myTextSel, 2)
repeat with x = aa to ab
boldListC.add(x)
end repeat
end
--I build the list for Italic
on insertItalicText me
myTextSel = the selection of member "editable Text"
sel1 = getAt(myTextSel, 1)
sel2 = getAt(myTextSel, 2)
repeat with x = aa to ab
ItalicListC.add(x)
end repeat
end
--I have two list lists so I join them
matchList = []
nItemsInListA = count(boldListC)
repeat with i = 1 to nItemsInListA
itemFromListA = boldListC[i]
where = getOne(ItalicListC, itemFromListA)
if where > 0 then
append(matchList, itemFromListA)
end if
end repeat
-- all is good but when they select the same chars it enters it twice
-- and you get a list like this
-- [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 15, 15, 16, 16, 17, 17, 18, 18,
30, 30, 31, 31]
-- need one like this
-- [0, 1, 2, 3, 4, 5, 15, 16, 17, 18, 31]
-- So I need to get rid of the duplicates
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL
PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping
with programming Lingo. Thanks!]