Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
Suki MaltbyDuggan
Suki MaltbyDuggan's Profile
1
Posts
2
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 make array of text moving vertically
[3 Replies]
26-Sep-2013 04:20 PM
Forum:
Programming Questions
I'm trying to make a bunch of vertical lines of text moving upwards across the screen using an array. I made one vertical line, but I'm having trouble figuring out the code to make an array for text. Any help would be much appreciated!
String[] headlines = {
"Golconde",
};
String[] headlines2 = {
"Golconde",
};
PFont f;
float x;
float y;
int index = 0;
void setup() {
size(600,600);
f = createFont("Arial",16,true);
y = height;
}
void draw() {
background(255);
fill(0);
textFont(f,16);
text(headlines[index],180,y);
y = y - 5;
float w = textWidth(headlines[index]);
if (y < -w) {
y = width;
index -= (index + 1) * 0;
}
}
«Prev
Next »
Moderate user : Suki MaltbyDuggan
Forum