Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #17449

No Function Google Script

Newsgroups comp.lang.javascript
Date 2012-12-03 21:19 -0800
Message-ID <e4354d0c-6035-437c-9bb4-fe138c989387@googlegroups.com> (permalink)
Subject No Function Google Script
From k <kalezwe@gmail.com>

Show all headers | View raw


I am trying to save this as a web app to attach to Google sites but it says I need a function can some one please help me understand and change my code to make it work.

var y=178;
var draw = function() {
    background(133, 142, 245);
    textSize(40);
    text("Snow",70,180);
//cloud
noStroke();
ellipse(93,10,100,100);
ellipse(134,34,100,100);
ellipse(185,24,100,100);
ellipse(249,26,100,100);
ellipse(320,11,100,100);
//ground
rect(0,347,402,56);
ellipse(295,378,368,84);
ellipse(100,359,262,68);
//snow
for (var i = 0; i < 1; i+=1){
ellipse(287,y-140,12,12);
ellipse(249,y-141,12,12);
ellipse(61,y-137,12,12);
ellipse(105,y-165,12,12);
ellipse(170,y-165,12,12);
ellipse(194,y-178,12,12);
ellipse(345,y-180,12,12);
ellipse(287,y-254,12,12);
ellipse(240,y-240,12,12);
ellipse(92,y-225,12,12);
ellipse(79,y-262,12,12);
ellipse(216,y-257,12,12);
ellipse(163,y-259,12,12);
ellipse(363,y-259,12,12);
ellipse(287,y-320,12,12);
ellipse(249,y-338,12,12);
ellipse(61,y-365,12,12);
ellipse(105,y-394,12,12);
ellipse(170,y-334,12,12);
ellipse(194,y-342,12,12);
ellipse(345,y-295,12,12);
ellipse(287,y-374,12,12);
ellipse(240,y-456,12,12);
ellipse(92,y-423,12,12);
ellipse(79,y-413,12,12);
ellipse(216,y-452,12,12);
ellipse(163,y-488,12,12);
ellipse(363,y-469,12,12);
fill(255, 255, 255);
y = y+1;
}
};

Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

No Function Google Script k <kalezwe@gmail.com> - 2012-12-03 21:19 -0800
  Re: No Function Google Script Stefan Weiss <krewecherl@gmail.com> - 2012-12-04 09:35 +0100

csiph-web