TOOL
May 26th, 2003, 05:14 AM
I'm just experimenting with some code in MX and thought that this code would loop through 15 times and draw 15 random lines...when I test the movie, nothing appears...what am I doing wrong?
Thanks.
_root.createEmptyMovieClip("clip", 1);
for (i; i>15; i++) {
x1 = Math.floor(Math.random()*(250-2))+2;
x2 = Math.floor(Math.random()*(250-2))+2;
y1 = Math.floor(Math.random()*(250-2))+2;
y2 = Math.floor(Math.random()*(250-2))+2;
clip.lineStyle(3, 0x000000, 100);
clip.moveTo(x1, y1);
clip.lineTo(x2, y2);
}
Thanks.
_root.createEmptyMovieClip("clip", 1);
for (i; i>15; i++) {
x1 = Math.floor(Math.random()*(250-2))+2;
x2 = Math.floor(Math.random()*(250-2))+2;
y1 = Math.floor(Math.random()*(250-2))+2;
y2 = Math.floor(Math.random()*(250-2))+2;
clip.lineStyle(3, 0x000000, 100);
clip.moveTo(x1, y1);
clip.lineTo(x2, y2);
}