Hi,
Thank you for your enquiry.
benoit wrote:
without scripting of course
You can achieve this with only a few lines of script and can attach this script action directly to the text object so that the object can be saved in the component gallery for future use.
All you need to do is add a text object to the page, then apply an
On Show trigger to the text object, followed by a script action. In the script pane, copy and paste the following:
Code:
mytext = "typewritertext"
textlength = String.length(mytext)
for (n=1;n<=textlength;n++) {
display = mytext.substring(0,n)
this.SetSelection(0,-1)
this.ReplaceSelection(display)
wait(0.3)
}
Simply change the string "typewritertext" to the text you wish to display and change the value of the wait() action to the time delay you wish to leave between letters.
Now apply the changes and preview the publication. The contents of the mytext string will appear letter-by-letter with the text object.
You can now simply save this text object to a component gallery. Whenever you need to use a typewriter effect, simply drag this component onto the page and edit the script actions to the required string and time delay.
Kind regards,