Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
saracern
saracern's Profile
1
Posts
1
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
Random Image Generator Array
[2 Replies]
16-May-2012 06:39 AM
Forum:
Programming Questions
I've had a look at the other topics and have followed a few tutorials however im still stuck!
I can't see any images when the script loads up? And not sure where im going wrong any help would be appreciated.
int num = 4;
PImage[] myImageArray = new PImage[num];
void setup () {
size(1300,800);
background(255);
for (int i=0; i<myImageArray.length; i++){
loadImage( "0" + i + ".png");
loadImage( "1" + i + ".png");
loadImage( "2" + i + ".png");
loadImage( "3" + i + ".png");
}
}
void draw() {
image(myImageArray[(int)random(num)],0,0);
}
«Prev
Next »
Moderate user : saracern
Forum