Slowly beginning to do some basic stuff with Hollywood again ...
I would like to fade in a text, have it shown for x seconds and fade it out afterwards. I thought I could use "DisplayTextObjectFX()" but with the #FADE operation it fades the text in and out in a loop which I cannot control:
Code: Select all
SetFontColor(#RED)
SetFont("times.font", 18)
readyMessageID = CreateTextObject(Nil, "Ready")
Function p_MainLoop()
DisplayTextObjectFX(readyMessageID, #CENTER, #CENTER, {Type = #FADE, Speed = 5, Parameter = #BLACK})
EndFunction
SetInterval(1, p_MainLoop, 40)
While quit = False
WaitEvent
Wend
1. Speed is a bit unclear. I can't control exact seconds/milliseconds/ticks
2. I cannot set a time where the text stays displayed. And as there is no event when the fade in anim is completed I cannot simply delete this TextObject and replace it by a new one with no FX
3. How to stop the fade in/fade out process after one iteration. It does not help to call it outside the main loop
Any ideas/best practices?
Thanks in advance!