Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
tyridge78
tyridge78's Profile
1
Posts
0
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
How to simulate 'typing' text?
[1 Reply]
08-Sep-2013 12:56 AM
Forum:
Programming Questions
I've tried this. I'm aiming for a function that types text individually with a .5 second wait time.
This doesn't work at all, and merely shows 'Hello' as a full character after the loop ENDS. :/
void type(String str)
{
println("\tTYPING");
String typed;
typed = "";
for(int i = 0;i<str.length();i++)
{
delay(500);
size(displayWidth, displayHeight, P2D);
background(0);
Character character = str.charAt(i);
typed+=character;
text(typed,40,40);
}
}
type("Hello");
«Prev
Next »
Moderate user : tyridge78
Forum