This is an old Khan academy project that I made. I'm wondering how I can convert this to work on an external website.
It was a small magic 8 ball project. I think that how you put things into Khan Academy's editor doesn't read outside their environment very well.
fill(0, 0, 0);
ellipse(200, 200, 375, 375);
fill(60, 0, 255);
triangle(200, 104, 280, 280, 120, 280);
fill(255, 255, 255);
var answer = floor(random(1, 6));
if (answer === 1) { // response one
fill(235, 9, 9);
textSize(30);
text("NOT", 171, 202);
text('A',190,233);
text("CHANCE", 137, 267);
}
else if (answer === 2) // response two
{
fill(76, 199, 14);
textSize(23);
text('FOR',176,207);
textSize(40);
text('SURE',144,250);
}
else if (answer === 3) // response three
{
fill(245, 245, 12);
textSize(30);
text('ASK',170,197);
text('AGAIN',154,230);
text('LATER',153,261);
}
else if (answer === 4) // response four
{
fill(204, 138, 25);
textSize(20);
text('ANSWER',157,214);
textSize(24);
text('UNCLEAR',145,251);
}
else // response five
{
fill(218, 12, 237);
textSize(19);
text('MAGIC',170,198);
text('8 BALL',170,232);
textSize(19);
text('MALFUNCTION',132,268);
}