Oriente Mario Arreseygor wrote:
              Hi all:
I have a text in a member and want that each word appears one
to one. For example with this text: “My question is:” I want that fist
appear “I” later “Want”, later “that” and so on. I made this: 1 – The color initialy is the same that the BackColor of the member 2 - I change the color of each word and the words would be appear. But the text appear at the end of the script quickly and joined. My scripts are this: ----------------------------------------------------------------
       Property pColorVis,pMiembro,pNumSprite
on getPropertyDescriptionList description = [:] addProp description,\
         #pColorVis, \
        [#default:rgb(000,000,000),\
         #format:#list,\
         #comment:"¿Qué color produce el efecto de visibilidad?"\
        ]
return description
       end
on beginSprite me
         pNumSprite = me.spriteNum
         pMiembro = sprite(pNumSprite).member.name
         palabras = member(pMiembro).text.words.count
         repeat with i = 1 to palabras
           member(pMiembro).word[i].color = pColorVis
           updatestage
           startTimer
           repeat while the timer < 10
             nothing
           end repeat
         end repeat
end ----------------------------------------------------------------- What is wrong? Or which is the way? Thank you in advanced Oriente Mario Arreseygor

¡Hola, Mario!

You might want to set up a timer that trigger the color change in your words. Right now your approach it´s not the best because it freezes the movie until you get out of the loop. Try this behavior ;)

Property pColorVis,pMiembro,pNumSprite
property pMaxTimeBetweenChanges, pStartTime, pActualWordNum

on beginSprite me
  pNumSprite = me.spriteNum
  pMiembro = sprite(pNumSprite).member
  pMaxTimeBetweenChanges = 1000 --1 second between each color change
  pStartTime = the milliseconds
end

on enterFrame me
  elapsedT = the milliseconds - pStartTime
  if elapsedT >= pMaxTimeBetweenChanges then
    if pActualWordNum <= pMiembro.text.word.count then
      pActualWordNum = pActualWordNum + 1
      pMiembro.word[pActualWordNum].color = pColorVis
      pStartTime = the milliseconds
    end if
  end if
end

on getPropertyDescriptionList

  description = [:]

  addProp description,\
  #pColorVis, \
  [#default:rgb(000,000,000),\
  #format:#list,\
  #comment:"¿Qué color produce el efecto de visibilidad?"\
  ]

  return description
end

Saludos,
--
Agustín María Rodríguez

www.onwine.com.ar > Macromedia Director demos & code
[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!]

Reply via email to